38 int chroma_w, chroma_h;
40 if (chroma_w == 1 && chroma_h == 1) {
44 }
else if (chroma_w == 1 && chroma_h == 0) {
46 }
else if (chroma_w == 0 && chroma_h == 0) {
76 if (!frame_rate || !frame_rate->
den)
79 sample_rate = ((int64_t)picture_size * frame_rate->
num) / frame_rate->
den;
81 if (picture_size <= 0) {
83 }
else if (sample_rate <= 829440 && picture_size <= 36864) {
85 }
else if (sample_rate <= 2764800 && picture_size <= 73728) {
87 }
else if (sample_rate <= 4608000 && picture_size <= 122880) {
89 }
else if (sample_rate <= 9216000 && picture_size <= 245760) {
91 }
else if (sample_rate <= 20736000 && picture_size <= 552960) {
93 }
else if (sample_rate <= 36864000 && picture_size <= 983040) {
95 }
else if (sample_rate <= 83558400 && picture_size <= 2228224) {
97 }
else if (sample_rate <= 160432128 && picture_size <= 2228224) {
99 }
else if (sample_rate <= 311951360 && picture_size <= 8912896) {
101 }
else if (sample_rate <= 588251136 && picture_size <= 8912896) {
103 }
else if (sample_rate <= 1176502272 && picture_size <= 8912896) {
105 }
else if (sample_rate <= 1176502272 && picture_size <= 35651584) {
107 }
else if (sample_rate <= 2353004544 && picture_size <= 35651584) {
109 }
else if (sample_rate <= 4706009088 && picture_size <= 35651584) {
123 int vpx_chroma_subsampling =
125 int vpx_video_full_range_flag =
128 if (bit_depth < 0 || vpx_chroma_subsampling < 0)
enum AVChromaLocation chroma_location
static int get_bit_depth(AVFormatContext *s, enum AVPixelFormat pixel_format)
enum AVColorTransferCharacteristic color_trc
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
static int get_vp9_level(AVCodecParameters *par, AVRational *frame_rate)
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)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
int ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par)
Writes VP codec configuration to the provided AVIOContext.
static int get_vpx_video_full_range_flag(enum AVColorRange color_range)
AVColorRange
MPEG vs JPEG YUV range.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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 AVColorPrimaries color_primaries
#define FF_PROFILE_UNKNOWN
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
enum AVColorRange color_range
Video only.
the normal 2^n-1 "JPEG" YUV ranges
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
void avio_w8(AVIOContext *s, int b)
Rational number (pair of numerator and denominator).
void avio_wb16(AVIOContext *s, unsigned int val)
int ff_isom_get_vpcc_features(AVFormatContext *s, AVCodecParameters *par, AVRational *frame_rate, VPCC *vpcc)
int profile
Codec-specific bitstream restrictions that the stream conforms to.
internal header for VPx codec configuration utilities.
AVChromaLocation
Location of chroma samples.
int depth
Number of bits in the component.
AVPixelFormat
Pixel format.