Namespaces

Enumerations

enum JpegMarker
Name Value Comments
JPEG_SOF0 0xC0

start of frame (baseline)

JPEG_SOF1 0xC1

start of frame (extended sequential)

JPEG_SOF2 0xC2

start of frame (progressive)

JPEG_SOF3 0xC3

start of frame (lossless))

JPEG_DHT 0xC4

define huffman table

JPEG_SOF5 0xC5

start of frame (differential, sequential)

JPEG_SOF6 0xC6

start of frame (differential, progressive)

JPEG_SOF7 0xC7

start of frame (differential, lossless)

JPEG_SOF9 0xC9

start of frame (arithmetic coding, extended)

JPEG_SOF10 0xCA

start of frame (arithmetic coding, progressive)

JPEG_SOF11 0xCB

start of frame (arithmetic coding, lossless)

JPEG_SOF13 0xCD

start of frame (differential, arithmetic, sequential)

JPEG_SOF14 0xCE

start of frame (differential, arithmetic, progressive)

JPEG_SOF15 0xCF

start of frame (differential, arithmetic, lossless)

JPEG_RST0 0xD0

restart

JPEG_RST1 0xD1

restart

JPEG_RST2 0xD2

restart

JPEG_RST3 0xD3

restart

JPEG_RST4 0xD4

restart

JPEG_RST5 0xD5

restart

JPEG_RST6 0xD6

restart

JPEG_RST7 0xD7

restart

JPEG_SOI 0xD8

start of image

JPEG_EOI 0xD9

end of image

JPEG_SOS 0xDA

start of scan

JPEG_DQT 0xDB

define quantization table

JPEG_DRI 0xDD

define restart internal

JPEG_APP0 0xE0

start of application segment (APP0)

JPEG_APP1 0xE1

start of application segment (APP1)

JPEG_MARKER_PREFIX 0xFF

jpeg marker prefix

It's not a full featured JPEG parser implementation. It only parses JPEG

baseline sequential process (invalid or progressive JPEGs should fail but not

crash). For explanations of each struct and its members, see JPEG

specification at http://www.w3.org/Graphics/JPEG/itu-t81.pdf.

Defined at line 22 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.h

enum VideoCodecProfile
Name Value Comments
VIDEO_CODEC_PROFILE_UNKNOWN -1

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VIDEO_CODEC_PROFILE_MIN VIDEO_CODEC_PROFILE_UNKNOWN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_MIN 0

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_BASELINE H264PROFILE_MIN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_MAIN 1

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_EXTENDED 2

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_HIGH 3

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_HIGH10PROFILE 4

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_HIGH422PROFILE 5

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_HIGH444PREDICTIVEPROFILE 6

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_SCALABLEBASELINE 7

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_SCALABLEHIGH 8

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_STEREOHIGH 9

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_MULTIVIEWHIGH 10

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

H264PROFILE_MAX H264PROFILE_MULTIVIEWHIGH

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP8PROFILE_MIN 11

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP8PROFILE_ANY VP8PROFILE_MIN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP8PROFILE_MAX VP8PROFILE_ANY

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP9PROFILE_MIN 12

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP9PROFILE_PROFILE0 VP9PROFILE_MIN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP9PROFILE_PROFILE1 13

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP9PROFILE_PROFILE2 14

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP9PROFILE_PROFILE3 15

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VP9PROFILE_MAX VP9PROFILE_PROFILE3

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

HEVCPROFILE_MIN 16

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

HEVCPROFILE_MAIN HEVCPROFILE_MIN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

HEVCPROFILE_MAIN10 17

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

HEVCPROFILE_MAIN_STILL_PICTURE 18

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

HEVCPROFILE_MAX HEVCPROFILE_MAIN_STILL_PICTURE

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

DOLBYVISION_PROFILE0 19

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

DOLBYVISION_PROFILE4 20

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

DOLBYVISION_PROFILE5 21

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

DOLBYVISION_PROFILE7 22

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

THEORAPROFILE_MIN 23

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

THEORAPROFILE_ANY THEORAPROFILE_MIN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

THEORAPROFILE_MAX THEORAPROFILE_ANY

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

AV1PROFILE_MIN 24

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

AV1PROFILE_PROFILE_MAIN AV1PROFILE_MIN

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

AV1PROFILE_PROFILE_HIGH 25

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

AV1PROFILE_PROFILE_PRO 26

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

AV1PROFILE_MAX AV1PROFILE_PROFILE_PRO

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

DOLBYVISION_PROFILE8 27

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

DOLBYVISION_PROFILE9 28

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

VIDEO_CODEC_PROFILE_MAX DOLBYVISION_PROFILE9

Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
for example), and keep the values for a particular format grouped
together for clarity.

Video codec profiles. Keep in sync with mojo::VideoCodecProfile (see

media/mojo/mojom/media_types.mojom), gpu::VideoCodecProfile (see

gpu/config/gpu_info.h), and PP_VideoDecoder_Profile (translation is performed

in content/renderer/pepper/ppb_video_decoder_impl.cc).

NOTE: These values are histogrammed over time in UMA so the values must never

ever change (add new values to tools/metrics/histograms/histograms.xml)

GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media

Defined at line 22 of file ../../src/media/third_party/chromium_media/media/base/video_codecs.h

enum class Vp9ColorSpace
Name Value
UNKNOWN 0
BT_601 1
BT_709 2
SMPTE_170 3
SMPTE_240 4
BT_2020 5
RESERVED 6
SRGB 7

Defined at line 45 of file ../../src/media/third_party/chromium_media/media/filters/vp9_parser.h

enum Vp9InterpolationFilter
Name Value
EIGHTTAP 0
EIGHTTAP_SMOOTH 1
EIGHTTAP_SHARP 2
BILINEAR 3
SWITCHABLE 4

Defined at line 56 of file ../../src/media/third_party/chromium_media/media/filters/vp9_parser.h

enum Vp9RefType
Name Value
VP9_FRAME_INTRA 0
VP9_FRAME_LAST 1
VP9_FRAME_GOLDEN 2
VP9_FRAME_ALTREF 3
VP9_FRAME_MAX 4

Defined at line 64 of file ../../src/media/third_party/chromium_media/media/filters/vp9_parser.h

enum Vp9ReferenceMode
Name Value
SINGLE_REFERENCE 0
COMPOUND_REFERENCE 1
REFERENCE_MODE_SELECT 2

Defined at line 72 of file ../../src/media/third_party/chromium_media/media/filters/vp9_parser.h

Records

Functions

  • uint32_t BytesPerSample (fuchsia::media::AudioSampleFormat format)

    Returns the size in bytes of samples of the specified format.

    Defined at line 11 of file ../../sdk/lib/media/audio/cpp/types.cc

  • fuchsia::media::AudioStreamType CreateAudioStreamType (fuchsia::media::AudioSampleFormat sample_format, uint32_t channel_count, uint32_t frames_per_second)

    Creates an |AudioStreamType| for LPCM audio. |channel_count| may not be zero.

    Defined at line 24 of file ../../sdk/lib/media/audio/cpp/types.cc

  • uint32_t H264LevelToMaxMBPS (uint8_t level)

    Get max macroblock processing rate in macroblocks per second (MaxMBPS) from

    level. The abbreviation is as per spec table A-1.

    Defined at line 76 of file ../../src/media/third_party/chromium_media/media/video/h264_level_limits.cc

  • uint32_t H264LevelToMaxFS (uint8_t level)

    Get max frame size in macroblocks (MaxFS) from level. The abbreviation is as

    per spec table A-1.

    Defined at line 80 of file ../../src/media/third_party/chromium_media/media/video/h264_level_limits.cc

  • uint32_t H264LevelToMaxDpbMbs (uint8_t level)

    Get max decoded picture buffer size in macroblocks (MaxDpbMbs) from level.

    The abbreviation is as per spec table A-1.

    Defined at line 84 of file ../../src/media/third_party/chromium_media/media/video/h264_level_limits.cc

  • bool operator== (TimelineRate a, TimelineRate b)

    Tests two rates for equality.

    Defined at line 87 of file ../../src/media/audio/lib/timeline/timeline_rate.h

  • uint32_t H264ProfileLevelToMaxBR (VideoCodecProfile profile, uint8_t level)

    Get max video bitrate in kbit per second (MaxBR) from profile and level. The

    abbreviation is as per spec table A-1.

    Defined at line 88 of file ../../src/media/third_party/chromium_media/media/video/h264_level_limits.cc

  • bool operator!= (TimelineRate a, TimelineRate b)

    Tests two rates for inequality.

    Defined at line 92 of file ../../src/media/audio/lib/timeline/timeline_rate.h

  • bool operator== (const TimelineFunction & a, const TimelineFunction & b)

    Tests two timeline functions for equality. Equality requires equal basis values.

    Defined at line 93 of file ../../src/media/audio/lib/timeline/timeline_function.h

  • std::ostream & operator<< (std::ostream & out, const TimelineRate & rate)

    Defined at line 94 of file ../../src/media/audio/lib/timeline/timeline_rate.h

  • size_t GetEncodeBitstreamBufferSize (const gfx::Size & size, uint32_t bitrate, uint32_t framerate)

    Calculate the bitstream buffer size for VideoEncodeAccelerator.

    |size|: the resolution of video stream

    |bitrate|: the bit rate in bps

    |framerate|: the frame rate in fps

    Defined at line 97 of file ../../src/media/third_party/chromium_media/media/gpu/gpu_video_encode_accelerator_helpers.cc

  • bool operator!= (const TimelineFunction & a, const TimelineFunction & b)

    Tests two timeline functions for inequality. Equality requires equal basis values.

    Defined at line 99 of file ../../src/media/audio/lib/timeline/timeline_function.h

  • TimelineFunction operator* (const TimelineFunction & bc, const TimelineFunction & ab)

    Composes two timeline functions B->C and A->B producing A->C. ASSERTs on precision loss.

    Defined at line 102 of file ../../src/media/audio/lib/timeline/timeline_function.h

  • std::ostream & operator<< (std::ostream & out, const TimelineFunction & func)

    Defined at line 106 of file ../../src/media/audio/lib/timeline/timeline_function.h

  • size_t GetEncodeBitstreamBufferSize (const gfx::Size & size)

    Get the maximum bitstream buffer size for VideoEncodeAccelerator.

    |size|: the resolution of video stream

    Defined at line 125 of file ../../src/media/third_party/chromium_media/media/gpu/gpu_video_encode_accelerator_helpers.cc

  • bool CheckH264LevelLimits (VideoCodecProfile profile, uint8_t level, uint32_t bitrate, uint32_t framerate, uint32_t framesize_in_mbs)

    Check whether |bitrate|, |framerate|, and |framesize_in_mbs| are valid from

    the limits of |profile| and |level| from Table A-1 in spec.

    Defined at line 114 of file ../../src/media/third_party/chromium_media/media/video/h264_level_limits.cc

  • bool VerifySubsamplesMatchSize (const std::vector<SubsampleEntry> & subsamples, size_t input_size)

    Verifies that |subsamples| correctly specifies a buffer of length

    |input_size|. Returns false if the total of bytes specified in |subsamples|

    does not match |input_size|.

    Defined at line 10 of file ../../src/media/third_party/chromium_media/media/base/subsample_entry.cc

  • std::string GetProfileName (VideoCodecProfile profile)

    Defined at line 9 of file ../../src/media/third_party/chromium_media/media/base/video_codecs.cc

  • std::string BuildH264MimeSuffix (VideoCodecProfile profile, uint8_t level)
  • template <class T, class U>
    decltype(fbl::round_up<T, U>(val, multiple)) RoundUp (const T & val, const U & multiple)

    Fuchsia change: Disable custom implementation of RoundUp and instead use

    |fbl::round_up| since callee is expecting the return type to be unsigned.

    Defined at line 127 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc

  • TimelineRate operator/ (TimelineRate a, TimelineRate b)

    Returns the ratio of the two rates. DCHECKs on loss of precision.

    Defined at line 129 of file ../../sdk/lib/media/cpp/timeline_rate.h

  • std::vector<uint8_t> GetFpsAllocation (size_t num_temporal_layers)

    Get the frame rate fraction assigned to each temporal layer.

    |num_temporal_layers|: total number of temporal layers

    Defined at line 129 of file ../../src/media/third_party/chromium_media/media/gpu/gpu_video_encode_accelerator_helpers.cc

  • TimelineRate operator* (TimelineRate a, TimelineRate b)

    Returns the product of the two rates. DCHECKs on loss of precision.

    Defined at line 134 of file ../../sdk/lib/media/cpp/timeline_rate.h

  • int64_t operator* (TimelineRate a, int64_t b)

    Returns the product of the rate and the int64_t. Returns kOverflow on

    overflow.

    Defined at line 140 of file ../../sdk/lib/media/cpp/timeline_rate.h

  • int64_t operator* (int64_t a, TimelineRate b)

    Returns the product of the rate and the int64_t. Returns kOverflow on

    overflow.

    Defined at line 144 of file ../../sdk/lib/media/cpp/timeline_rate.h

  • int64_t operator/ (int64_t a, TimelineRate b)

    Returns the the int64_t divided by the rate. Returns kOverflow on

    overflow.

    Defined at line 148 of file ../../sdk/lib/media/cpp/timeline_rate.h

  • VideoBitrateAllocation AllocateBitrateForDefaultEncoding (const VideoEncodeAccelerator::Config & config)

    Create default VideoBitrateAllocation from |config|. A bitrate of each

    spatial layer (|config.spatial_layers[i].bitrate_bps| is distributed to

    temporal layers in the spatial layer based on the same bitrate division ratio

    as a software encoder. If |config.spatial_layers| is empty,

    VideoBitrateAllocation(0, 0) is set to |config.bitrate.target_bps()| as it is

    a configuration with no layers.

    Defined at line 158 of file ../../src/media/third_party/chromium_media/media/gpu/gpu_video_encode_accelerator_helpers.cc

  • std::optional<uint8_t> FindValidH264Level (VideoCodecProfile profile, uint32_t bitrate, uint32_t framerate, uint32_t framesize_in_mbs)

    Return a minimum level that comforts Table A-1 in spec with |profile|,

    |bitrate|, |framerate| and |framesize_in_mbs|. If there is no proper level,

    returns std::nullopt.

    Defined at line 147 of file ../../src/media/third_party/chromium_media/media/video/h264_level_limits.cc

  • VideoBitrateAllocation AllocateDefaultBitrateForTesting (const size_t num_spatial_layers, const size_t num_temporal_layers, const uint32_t bitrate)

    Create VideoBitrateAllocation with |num_spatial_layers|,

    |num_temporal_layers| and |bitrate|. |bitrate| is the bitrate of the entire

    stream. |num_temporal_layers| is the number of temporal layers in each

    spatial layer.

    First, |bitrate| is distributed to spatial layers based on libwebrtc bitrate

    division. Then the bitrate of each spatial layer is distributed to temporal

    layers in the spatial layer based on the same bitrate division ratio as a

    software encoder.

    Defined at line 179 of file ../../src/media/third_party/chromium_media/media/gpu/gpu_video_encode_accelerator_helpers.cc

  • bool ParseJpegPicture (const uint8_t * buffer, size_t length, JpegParseResult * result)

    Parses JPEG picture in |buffer| with |length|. Returns true iff header is

    valid and JPEG baseline sequential process is present. If parsed

    successfully, |result| is the parsed result.

    Defined at line 545 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc

  • bool ParseJpegStream (const uint8_t * buffer, size_t length, JpegParseResult * result)

    Parses the first image of JPEG stream in |buffer| with |length|. Returns

    true iff header is valid and JPEG baseline sequential process is present.

    If parsed successfully, |result| is the parsed result.

    Defined at line 603 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc

  • bool operator== (const VideoEncodeAccelerator::SupportedProfile & l, const VideoEncodeAccelerator::SupportedProfile & r)
  • bool operator== (const H264Metadata & l, const H264Metadata & r)

    Defined at line 211 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

  • bool operator== (const Vp8Metadata & l, const Vp8Metadata & r)

    Defined at line 215 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

  • bool operator== (const Vp9Metadata & l, const Vp9Metadata & r)

    Defined at line 220 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

  • bool operator== (const Av1Metadata & l, const Av1Metadata & r)

    Defined at line 232 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

  • bool operator== (const BitstreamBufferMetadata & l, const BitstreamBufferMetadata & r)

    Defined at line 241 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

  • bool operator== (const VideoEncodeAccelerator::Config::SpatialLayer & l, const VideoEncodeAccelerator::Config::SpatialLayer & r)

    Defined at line 248 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

  • bool operator== (const VideoEncodeAccelerator::Config & l, const VideoEncodeAccelerator::Config & r)

    Defined at line 256 of file ../../src/media/third_party/chromium_media/media/video/video_encode_accelerator.cc

Variables

const JpegHuffmanTable[2] kDefaultDcTable

Defined at line 38 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc

const JpegHuffmanTable[2] kDefaultAcTable

Defined at line 54 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc

const uint8_t[64] kZigZag8x8

Defined at line 95 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc

const JpegQuantizationTable[2] kDefaultQuantTable

Defined at line 101 of file ../../src/media/third_party/chromium_media/media/parsers/jpeg_parser.cc