FFmpeg
Macros | Enumerations | Functions
vpcc.c File Reference
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavcodec/defs.h"
#include "libavcodec/get_bits.h"
#include "vpcc.h"

Go to the source code of this file.

Macros

#define VP9_SYNCCODE   0x498342
 

Enumerations

enum  VPX_CHROMA_SUBSAMPLING {
  VPX_SUBSAMPLING_420_VERTICAL = 0, VPX_SUBSAMPLING_420_COLLOCATED_WITH_LUMA = 1, VPX_SUBSAMPLING_422 = 2, VPX_SUBSAMPLING_444 = 3,
  VPX_SUBSAMPLING_420_VERTICAL = 0, VPX_SUBSAMPLING_420_COLLOCATED_WITH_LUMA = 1, VPX_SUBSAMPLING_422 = 2, VPX_SUBSAMPLING_444 = 3
}
 

Functions

static int get_vpx_chroma_subsampling (AVFormatContext *s, enum AVPixelFormat pixel_format, enum AVChromaLocation chroma_location)
 
static int get_bit_depth (AVFormatContext *s, enum AVPixelFormat pixel_format)
 
static int get_vpx_video_full_range_flag (enum AVColorRange color_range)
 
static int get_vp9_level (AVCodecParameters *par, AVRational *frame_rate)
 
static void parse_bitstream (GetBitContext *gb, int *profile, int *bit_depth)
 
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. More...
 

Macro Definition Documentation

◆ VP9_SYNCCODE

#define VP9_SYNCCODE   0x498342

Definition at line 28 of file vpcc.c.

Enumeration Type Documentation

◆ VPX_CHROMA_SUBSAMPLING

Enumerator
VPX_SUBSAMPLING_420_VERTICAL 
VPX_SUBSAMPLING_420_COLLOCATED_WITH_LUMA 
VPX_SUBSAMPLING_422 
VPX_SUBSAMPLING_444 
VPX_SUBSAMPLING_420_VERTICAL 
VPX_SUBSAMPLING_420_COLLOCATED_WITH_LUMA 
VPX_SUBSAMPLING_422 
VPX_SUBSAMPLING_444 

Definition at line 30 of file vpcc.c.

Function Documentation

◆ get_vpx_chroma_subsampling()

static int get_vpx_chroma_subsampling ( AVFormatContext s,
enum AVPixelFormat  pixel_format,
enum AVChromaLocation  chroma_location 
)
static

Definition at line 38 of file vpcc.c.

Referenced by ff_isom_get_vpcc_features().

◆ get_bit_depth()

static int get_bit_depth ( AVFormatContext s,
enum AVPixelFormat  pixel_format 
)
static

Definition at line 58 of file vpcc.c.

Referenced by ff_isom_get_vpcc_features().

◆ get_vpx_video_full_range_flag()

static int get_vpx_video_full_range_flag ( enum AVColorRange  color_range)
static

Definition at line 69 of file vpcc.c.

Referenced by ff_isom_get_vpcc_features().

◆ get_vp9_level()

static int get_vp9_level ( AVCodecParameters par,
AVRational frame_rate 
)
static

Definition at line 75 of file vpcc.c.

Referenced by ff_isom_get_vpcc_features().

◆ parse_bitstream()

static void parse_bitstream ( GetBitContext gb,
int *  profile,
int *  bit_depth 
)
static

Definition at line 120 of file vpcc.c.

Referenced by ff_isom_get_vpcc_features().

◆ ff_isom_get_vpcc_features()

int ff_isom_get_vpcc_features ( AVFormatContext s,
AVCodecParameters par,
const uint8_t *  data,
int  len,
AVRational frame_rate,
VPCC vpcc 
)

Definition at line 153 of file vpcc.c.

Referenced by ff_isom_write_vpcc(), and set_vp9_codec_str().

◆ ff_isom_write_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.

Parameters
saddress of the AVFormatContext for the logging context.
pbaddress of the AVIOContext where the vpcC shall be written.
dataaddress of a data array which contains coded bitstream data from which codec information can be extracted. May be NULL.
lenlength of the data array.
paraddress of the AVCodecParameters which contains codec information.
Returns
>=0 in case of success, a negative value corresponding to an AVERROR code in case of failure

Definition at line 200 of file vpcc.c.

Referenced by flv_write_codec_header(), and mov_write_vpcc_tag().