FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vda_h264_dec.c File Reference

H.264 decoder via VDA. More...

#include <string.h>
#include <CoreFoundation/CoreFoundation.h>
#include "vda.h"
#include "h264.h"
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  VDADecoderContext
 
struct  VDABufferContext
 

Macros

#define kCFCoreFoundationVersionNumber10_7   635.00
 

Functions

static enum AVPixelFormat get_format (struct AVCodecContext *avctx, const enum AVPixelFormat *fmt)
 
static void release_buffer (void *opaque, uint8_t *data)
 
static int get_buffer2 (AVCodecContext *avctx, AVFrame *pic, int flag)
 
static void set_context (AVCodecContext *avctx)
 
static void restore_context (AVCodecContext *avctx)
 
static int vdadec_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int vdadec_close (AVCodecContext *avctx)
 
static av_cold int vdadec_init (AVCodecContext *avctx)
 
static void vdadec_flush (AVCodecContext *avctx)
 

Variables

AVCodec ff_h264_decoder
 
AVCodec ff_h264_vda_decoder
 
static enum AVPixelFormat vda_pixfmts_prior_10_7 []
 
static enum AVPixelFormat vda_pixfmts []
 

Detailed Description

H.264 decoder via VDA.

Author
Xidorn Quan quanx.nosp@m.unzh.nosp@m.en@gm.nosp@m.ail..nosp@m.com

Definition in file vda_h264_dec.c.

Macro Definition Documentation

#define kCFCoreFoundationVersionNumber10_7   635.00

Definition at line 35 of file vda_h264_dec.c.

Referenced by vdadec_init().

Function Documentation

static enum AVPixelFormat get_format ( struct AVCodecContext avctx,
const enum AVPixelFormat fmt 
)
static

Definition at line 70 of file vda_h264_dec.c.

Referenced by set_context().

static void release_buffer ( void opaque,
uint8_t data 
)
static

Definition at line 80 of file vda_h264_dec.c.

Referenced by get_buffer2().

static int get_buffer2 ( AVCodecContext avctx,
AVFrame pic,
int  flag 
)
static

Definition at line 88 of file vda_h264_dec.c.

Referenced by set_context().

static void set_context ( AVCodecContext avctx)
inlinestatic

Definition at line 102 of file vda_h264_dec.c.

Referenced by vdadec_close(), vdadec_decode(), vdadec_flush(), and vdadec_init().

static void restore_context ( AVCodecContext avctx)
inlinestatic

Definition at line 117 of file vda_h264_dec.c.

Referenced by vdadec_close(), vdadec_decode(), vdadec_flush(), and vdadec_init().

static int vdadec_decode ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 128 of file vda_h264_dec.c.

static av_cold int vdadec_close ( AVCodecContext avctx)
static

Definition at line 164 of file vda_h264_dec.c.

Referenced by vdadec_init().

static av_cold int vdadec_init ( AVCodecContext avctx)
static

Definition at line 178 of file vda_h264_dec.c.

static void vdadec_flush ( AVCodecContext avctx)
static

Definition at line 255 of file vda_h264_dec.c.

Variable Documentation

AVCodec ff_h264_decoder

Definition at line 1925 of file h264.c.

AVCodec ff_h264_vda_decoder
Initial value:
= {
.name = "h264_vda",
.priv_data_size = sizeof(VDADecoderContext),
.close = vdadec_close,
.capabilities = CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("H.264 (VDA acceleration)"),
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int vdadec_init(AVCodecContext *avctx)
Definition: vda_h264_dec.c:178
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:824
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static av_cold int vdadec_close(AVCodecContext *avctx)
Definition: vda_h264_dec.c:164
static void flush(AVCodecContext *avctx)
Definition: aacdec.c:514
static void vdadec_flush(AVCodecContext *avctx)
Definition: vda_h264_dec.c:255
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:522
static int vdadec_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: vda_h264_dec.c:128

Definition at line 262 of file vda_h264_dec.c.

enum AVPixelFormat vda_pixfmts_prior_10_7[]
static
Initial value:
= {
}
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:83
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63

Definition at line 40 of file vda_h264_dec.c.

Referenced by vdadec_init().

enum AVPixelFormat vda_pixfmts[]
static
Initial value:
= {
}
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:83
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:91
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:64
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63

Definition at line 46 of file vda_h264_dec.c.

Referenced by vdadec_init().