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 int vpx_chroma_subsampling =
78 int vpx_video_full_range_flag =
81 if (bit_depth < 0 || vpx_chroma_subsampling < 0)
95 avio_w8(pb, (bit_depth << 4) | (vpx_chroma_subsampling << 1) | vpx_video_full_range_flag);
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.
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)
void avio_wb16(AVIOContext *s, unsigned int val)
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.