41     switch (color_space) {
 
   76     int chroma_w, chroma_h;
 
   78         if (chroma_w == 1 && chroma_h == 1) {
 
   82         } 
else if (chroma_w == 1 && chroma_h == 0) {
 
   84         } 
else if (chroma_w == 0 && chroma_h == 0) {
 
  121     int vpx_chroma_subsampling =
 
  124     int vpx_video_full_range_flag =
 
  127     if (bit_depth < 0 || vpx_color_space < 0 || vpx_chroma_subsampling < 0)
 
  141     avio_w8(pb, (bit_depth << 4) | vpx_color_space);
 
  142     avio_w8(pb, (vpx_chroma_subsampling << 4) | (vpx_transfer_function << 1) |
 
  143                     vpx_video_full_range_flag);
 
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B 
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_vpx_transfer_function(enum AVColorTransferCharacteristic transfer)
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC 
static int get_vpx_color_space(AVFormatContext *s, enum AVColorSpace color_space)
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB) 
This struct describes the properties of an encoded stream. 
AVColorTransferCharacteristic
Color Transfer Characteristic. 
functionally identical to above 
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. 
AVColorSpace
YUV colorspace type. 
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. 
#define FF_PROFILE_UNKNOWN
ITU-R BT2020 non-constant luminance system. 
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)
ITU-R BT2020 constant luminance system. 
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems. 
int profile
Codec-specific bitstream restrictions that the stream conforms to. 
static unsigned bit_depth(uint64_t mask)
internal header for VPx codec configuration utilities. 
AVChromaLocation
Location of chroma samples. 
int depth
Number of bits in the component. 
AVPixelFormat
Pixel format.