wppaste
WordPress

getid3_riff::fourccLookup( string $fourcc ): string

Source
wp-includes/ID3/module.audio-video.riff.php:2482

Compatibility

WordPress
core
PHP
7.4–8.6-dev
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.

Parameters

$fourccstring

Return value

string

Performance profile

How much work a call to getid3_riff::fourccLookup() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.

Cost class
Trivial

Touches nothing outside its own arguments.

Scaling
Constant

No loop in the body: the same number of instructions runs whatever you pass in.

Instructions
10

Executed per call on PHP 8.5. The body compiles to 10.

Plugin surface
None

Nothing here hands control to plugin code.

Called by
4

4 places in core call this, so the cost is paid more often than your own code shows.

What one call costs · 1 distinct outcome

One number would be a lie: the work depends on which branch runs. These are every distinct cost getid3_riff::fourccLookup() can have, taken from its control-flow graph on PHP 8.5.

WhenInstructionsCalls it makes
always10::getid3_lib()

Across PHP versions

Compiles the same on PHP 7.4, 8.1, 8.2, 8.3, 8.4, 8.5 and 8.6-dev: 10 instructions, 10 executed per call, 0 branches. The work does not change between versions.

An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.

Uses · 1

Used by · 4

Source code

	public static function fourccLookup($fourcc) { 		$begin = __LINE__; 		/** This is not a comment! 			swot	http://developer.apple.com/qa/snd/snd07.html			____	No Codec (____)			_BIT	BI_BITFIELDS (Raw RGB)			_JPG	JPEG compressed			_PNG	PNG compressed W3C/ISO/IEC (RFC-2083)			_RAW	Full Frames (Uncompressed)			_RGB	Raw RGB Bitmap			_RL4	RLE 4bpp RGB			_RL8	RLE 8bpp RGB			3IV1	3ivx MPEG-4 v1			3IV2	3ivx MPEG-4 v2			3IVX	3ivx MPEG-4			AASC	Autodesk Animator			ABYR	Kensington ?ABYR?			AEMI	Array Microsystems VideoONE MPEG1-I Capture			AFLC	Autodesk Animator FLC			AFLI	Autodesk Animator FLI			AMPG	Array Microsystems VideoONE MPEG			ANIM	Intel RDX (ANIM)			AP41	AngelPotion Definitive			ASV1	Asus Video v1			ASV2	Asus Video v2			ASVX	Asus Video 2.0 (audio)			AUR2	AuraVision Aura 2 Codec - YUV 4:2:2			AURA	AuraVision Aura 1 Codec - YUV 4:1:1			AVDJ	Independent JPEG Group\'s codec (AVDJ)			AVRN	Independent JPEG Group\'s codec (AVRN)			AYUV	4:4:4 YUV (AYUV)			AZPR	Quicktime Apple Video (AZPR)			BGR 	Raw RGB32			BLZ0	Blizzard DivX MPEG-4			BTVC	Conexant Composite Video			BINK	RAD Game Tools Bink Video			BT20	Conexant Prosumer Video			BTCV	Conexant Composite Video Codec			BW10	Data Translation Broadway MPEG Capture			CC12	Intel YUV12			CDVC	Canopus DV			CFCC	Digital Processing Systems DPS Perception			CGDI	Microsoft Office 97 Camcorder Video			CHAM	Winnov Caviara Champagne			CJPG	Creative WebCam JPEG			CLJR	Cirrus Logic YUV 4:1:1			CMYK	Common Data Format in Printing (Colorgraph)			CPLA	Weitek 4:2:0 YUV Planar			CRAM	Microsoft Video 1 (CRAM)			cvid	Radius Cinepak			CVID	Radius Cinepak			CWLT	Microsoft Color WLT DIB			CYUV	Creative Labs YUV			CYUY	ATI YUV			D261	H.261			D263	H.263			DIB 	Device Independent Bitmap			DIV1	FFmpeg OpenDivX			DIV2	Microsoft MPEG-4 v1/v2			DIV3	DivX ;-) MPEG-4 v3.x Low-Motion			DIV4	DivX ;-) MPEG-4 v3.x Fast-Motion			DIV5	DivX MPEG-4 v5.x			DIV6	DivX ;-) (MS MPEG-4 v3.x)			DIVX	DivX MPEG-4 v4 (OpenDivX / Project Mayo)			divx	DivX MPEG-4			DMB1	Matrox Rainbow Runner hardware MJPEG			DMB2	Paradigm MJPEG			DSVD	?DSVD?			DUCK	Duck TrueMotion 1.0			DPS0	DPS/Leitch Reality Motion JPEG			DPSC	DPS/Leitch PAR Motion JPEG			DV25	Matrox DVCPRO codec			DV50	Matrox DVCPRO50 codec			DVC 	IEC 61834 and SMPTE 314M (DVC/DV Video)			DVCP	IEC 61834 and SMPTE 314M (DVC/DV Video)			DVHD	IEC Standard DV 1125 lines @ 30fps / 1250 lines @ 25fps			DVMA	Darim Vision DVMPEG (dummy for MPEG compressor) (www.darvision.com)

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/ID3/module.audio-video.riff.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.