Go to the documentation of this file.
28 #define VP9_SYNCCODE 0x498342
42 int chroma_w, chroma_h;
44 if (chroma_w == 1 && chroma_h == 1) {
48 }
else if (chroma_w == 1 && chroma_h == 0) {
50 }
else if (chroma_w == 0 && chroma_h == 0) {
66 return desc->comp[0].depth;
80 if (!frame_rate || !frame_rate->
den)
85 if (picture_size <= 0) {
87 }
else if (
sample_rate <= 829440 && picture_size <= 36864) {
89 }
else if (
sample_rate <= 2764800 && picture_size <= 73728) {
91 }
else if (
sample_rate <= 4608000 && picture_size <= 122880) {
93 }
else if (
sample_rate <= 9216000 && picture_size <= 245760) {
95 }
else if (
sample_rate <= 20736000 && picture_size <= 552960) {
97 }
else if (
sample_rate <= 36864000 && picture_size <= 983040) {
99 }
else if (
sample_rate <= 83558400 && picture_size <= 2228224) {
101 }
else if (
sample_rate <= 160432128 && picture_size <= 2228224) {
103 }
else if (
sample_rate <= 311951360 && picture_size <= 8912896) {
105 }
else if (
sample_rate <= 588251136 && picture_size <= 8912896) {
107 }
else if (
sample_rate <= 1176502272 && picture_size <= 8912896) {
109 }
else if (
sample_rate <= 1176502272 && picture_size <= 35651584) {
111 }
else if (
sample_rate <= 2353004544 && picture_size <= 35651584) {
113 }
else if (
sample_rate <= 4706009088 && picture_size <= 35651584) {
121 int keyframe, invisible;
141 int intraonly = invisible ?
get_bits1(gb) : 0;
161 int vpx_chroma_subsampling =
163 int vpx_video_full_range_flag =
166 if (
bit_depth < 0 || vpx_chroma_subsampling < 0)
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
This struct describes the properties of an encoded stream.
enum AVColorSpace color_space
static int get_vpx_chroma_subsampling(AVFormatContext *s, enum AVPixelFormat pixel_format, enum AVChromaLocation chroma_location)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
@ AVCOL_RANGE_JPEG
Full range content.
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
enum AVColorPrimaries color_primaries
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void parse_bitstream(GetBitContext *gb, int *profile, int *bit_depth)
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
enum AVColorTransferCharacteristic color_trc
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define AV_PROFILE_UNKNOWN
int ff_isom_get_vpcc_features(AVFormatContext *s, AVCodecParameters *par, const uint8_t *data, int len, AVRational *frame_rate, VPCC *vpcc)
int ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb, const uint8_t *data, int len, AVCodecParameters *par)
Writes VP codec configuration to the provided AVIOContext.
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
Rational number (pair of numerator and denominator).
static unsigned int get_bits1(GetBitContext *s)
void avio_w8(AVIOContext *s, int b)
static int get_vpx_video_full_range_flag(enum AVColorRange color_range)
@ VPX_SUBSAMPLING_420_COLLOCATED_WITH_LUMA
int profile
Codec-specific bitstream restrictions that the stream conforms to.
AVChromaLocation
Location of chroma samples.
@ VPX_SUBSAMPLING_420_VERTICAL
enum AVColorRange color_range
Video only.
static int get_bit_depth(AVFormatContext *s, enum AVPixelFormat pixel_format)
enum AVChromaLocation chroma_location
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
void avio_wb24(AVIOContext *s, unsigned int val)
void avio_wb16(AVIOContext *s, unsigned int val)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AVColorRange
Visual content value range.
static int get_vp9_level(AVCodecParameters *par, AVRational *frame_rate)