Namespaces

Enumerations

enum JpegMarker
Name Value
JPEG_SOF0 0xC0
JPEG_SOF1 0xC1
JPEG_SOF2 0xC2
JPEG_SOF3 0xC3
JPEG_DHT 0xC4
JPEG_SOF5 0xC5
JPEG_SOF6 0xC6
JPEG_SOF7 0xC7
JPEG_SOF9 0xC9
JPEG_SOF10 0xCA
JPEG_SOF11 0xCB
JPEG_SOF13 0xCD
JPEG_SOF14 0xCE
JPEG_SOF15 0xCF
JPEG_RST0 0xD0
JPEG_RST1 0xD1
JPEG_RST2 0xD2
JPEG_RST3 0xD3
JPEG_RST4 0xD4
JPEG_RST5 0xD5
JPEG_RST6 0xD6
JPEG_RST7 0xD7
JPEG_SOI 0xD8
JPEG_EOI 0xD9
JPEG_SOS 0xDA
JPEG_DQT 0xDB
JPEG_DRI 0xDD
JPEG_APP0 0xE0
JPEG_APP1 0xE1
JPEG_MARKER_PREFIX 0xFF

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
VIDEO_CODEC_PROFILE_UNKNOWN -1
VIDEO_CODEC_PROFILE_MIN VIDEO_CODEC_PROFILE_UNKNOWN
H264PROFILE_MIN 0
H264PROFILE_BASELINE H264PROFILE_MIN
H264PROFILE_MAIN 1
H264PROFILE_EXTENDED 2
H264PROFILE_HIGH 3
H264PROFILE_HIGH10PROFILE 4
H264PROFILE_HIGH422PROFILE 5
H264PROFILE_HIGH444PREDICTIVEPROFILE 6
H264PROFILE_SCALABLEBASELINE 7
H264PROFILE_SCALABLEHIGH 8
H264PROFILE_STEREOHIGH 9
H264PROFILE_MULTIVIEWHIGH 10
H264PROFILE_MAX H264PROFILE_MULTIVIEWHIGH
VP8PROFILE_MIN 11
VP8PROFILE_ANY VP8PROFILE_MIN
VP8PROFILE_MAX VP8PROFILE_ANY
VP9PROFILE_MIN 12
VP9PROFILE_PROFILE0 VP9PROFILE_MIN
VP9PROFILE_PROFILE1 13
VP9PROFILE_PROFILE2 14
VP9PROFILE_PROFILE3 15
VP9PROFILE_MAX VP9PROFILE_PROFILE3
HEVCPROFILE_MIN 16
HEVCPROFILE_MAIN HEVCPROFILE_MIN
HEVCPROFILE_MAIN10 17
HEVCPROFILE_MAIN_STILL_PICTURE 18
HEVCPROFILE_MAX HEVCPROFILE_MAIN_STILL_PICTURE
DOLBYVISION_PROFILE0 19
DOLBYVISION_PROFILE4 20
DOLBYVISION_PROFILE5 21
DOLBYVISION_PROFILE7 22
THEORAPROFILE_MIN 23
THEORAPROFILE_ANY THEORAPROFILE_MIN
THEORAPROFILE_MAX THEORAPROFILE_ANY
AV1PROFILE_MIN 24
AV1PROFILE_PROFILE_MAIN AV1PROFILE_MIN
AV1PROFILE_PROFILE_HIGH 25
AV1PROFILE_PROFILE_PRO 26
AV1PROFILE_MAX AV1PROFILE_PROFILE_PRO
DOLBYVISION_PROFILE8 27
DOLBYVISION_PROFILE9 28
VIDEO_CODEC_PROFILE_MAX DOLBYVISION_PROFILE9

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 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 & lconst 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