50 int chroma_w, chroma_h;
52 if (chroma_w == 1 && chroma_h == 1) {
56 }
else if (chroma_w == 1 && chroma_h == 0) {
58 }
else if (chroma_w == 0 && chroma_h == 0) {
70 int vt_extradata_size;
71 uint8_t *vt_extradata;
77 vt_extradata_size = 1 + 3 + 6 + 2;
78 vt_extradata =
av_malloc(vt_extradata_size);
99 av_assert0(p - vt_extradata == vt_extradata_size);
101 data = CFDataCreate(kCFAllocatorDefault, vt_extradata, vt_extradata_size);
132 .p.name =
"vp9_videotoolbox",
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Convenience header that includes libavutil's core.
reference-counted frame API
const struct FFHWAccel ff_vp9_videotoolbox_hwaccel
An API-specific header for AV_HWDEVICE_TYPE_VIDEOTOOLBOX.
common internal api header.
Memory handling functions.
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.
AVChromaLocation
Location of chroma samples.
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
@ AVCOL_RANGE_JPEG
Full range content.
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_VIDEOTOOLBOX
hardware decoding through Videotoolbox
A reference to a data buffer.
main external API structure.
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
int level
Encoding level descriptor.
enum AVColorSpace colorspace
YUV colorspace type.
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
struct AVCodecInternal * internal
Private context used for internal data.
void * hwaccel_priv_data
hwaccel-specific private data
This structure describes decoded (raw) audio or video data.
int ff_videotoolbox_common_init(AVCodecContext *avctx)
int ff_videotoolbox_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
int ff_videotoolbox_uninit(AVCodecContext *avctx)
int ff_videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame)