FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
vda_h264.c File Reference
#include <CoreFoundation/CFDictionary.h>
#include <CoreFoundation/CFNumber.h>
#include <CoreFoundation/CFData.h>
#include "vda.h"
#include "libavutil/avutil.h"
#include "h264.h"
#include "internal.h"
#include "vda_internal.h"

Go to the source code of this file.

Data Structures

struct  vda_buffer
 
struct  VDAContext
 

Functions

static void vda_decoder_callback (void *vda_hw_ctx, CFDictionaryRef user_info, OSStatus status, uint32_t infoFlags, CVImageBufferRef image_buffer)
 
static int vda_sync_decode (VDAContext *ctx, struct vda_context *vda_ctx)
 
static int vda_old_h264_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int vda_old_h264_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static void vda_h264_release_buffer (void *opaque, uint8_t *data)
 
static int vda_old_h264_end_frame (AVCodecContext *avctx)
 
int ff_vda_create_decoder (struct vda_context *vda_ctx, uint8_t *extradata, int extradata_size)
 Create the video decoder. More...
 
int ff_vda_destroy_decoder (struct vda_context *vda_ctx)
 Destroy the video decoder. More...
 
static int vda_h264_uninit (AVCodecContext *avctx)
 
void ff_vda_output_callback (void *opaque, CFDictionaryRef user_info, OSStatus status, uint32_t infoFlags, CVImageBufferRef image_buffer)
 
static int vda_h264_start_frame (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static int vda_h264_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static void release_buffer (void *opaque, uint8_t *data)
 
static int vda_h264_end_frame (AVCodecContext *avctx)
 
int ff_vda_default_init (AVCodecContext *avctx)
 
static int vda_h264_alloc_frame (AVCodecContext *avctx, AVFrame *frame)
 

Variables

AVHWAccel ff_h264_vda_old_hwaccel
 
AVHWAccel ff_h264_vda_hwaccel
 

Function Documentation

static void vda_decoder_callback ( void vda_hw_ctx,
CFDictionaryRef  user_info,
OSStatus  status,
uint32_t  infoFlags,
CVImageBufferRef  image_buffer 
)
static

Definition at line 51 of file vda_h264.c.

Referenced by ff_vda_create_decoder().

static int vda_sync_decode ( VDAContext ctx,
struct vda_context vda_ctx 
)
static

< kVDADecoderFlush_emitFrames

Definition at line 71 of file vda_h264.c.

Referenced by vda_old_h264_end_frame().

static int vda_old_h264_start_frame ( AVCodecContext avctx,
av_unused const uint8_t buffer,
av_unused uint32_t  size 
)
static

Definition at line 92 of file vda_h264.c.

static int vda_old_h264_decode_slice ( AVCodecContext avctx,
const uint8_t buffer,
uint32_t  size 
)
static

Definition at line 107 of file vda_h264.c.

static void vda_h264_release_buffer ( void opaque,
uint8_t data 
)
static

Definition at line 134 of file vda_h264.c.

Referenced by vda_old_h264_end_frame().

static int vda_old_h264_end_frame ( AVCodecContext avctx)
static

Definition at line 141 of file vda_h264.c.

static int vda_h264_uninit ( AVCodecContext avctx)
static

Definition at line 274 of file vda_h264.c.

void ff_vda_output_callback ( void opaque,
CFDictionaryRef  user_info,
OSStatus  status,
uint32_t  infoFlags,
CVImageBufferRef  image_buffer 
)

Definition at line 297 of file vda_h264.c.

Referenced by ff_vda_default_init().

static int vda_h264_start_frame ( AVCodecContext avctx,
const uint8_t buffer,
uint32_t  size 
)
static

Definition at line 318 of file vda_h264.c.

static int vda_h264_decode_slice ( AVCodecContext avctx,
const uint8_t buffer,
uint32_t  size 
)
static

Definition at line 340 of file vda_h264.c.

static void release_buffer ( void opaque,
uint8_t data 
)
static

Definition at line 367 of file vda_h264.c.

Referenced by vda_h264_end_frame().

static int vda_h264_end_frame ( AVCodecContext avctx)
static

< kVDADecoderFlush_emitFrames

Definition at line 373 of file vda_h264.c.

int ff_vda_default_init ( AVCodecContext avctx)

Definition at line 421 of file vda_h264.c.

static int vda_h264_alloc_frame ( AVCodecContext avctx,
AVFrame frame 
)
static

Definition at line 524 of file vda_h264.c.

Variable Documentation

AVHWAccel ff_h264_vda_old_hwaccel
Initial value:
= {
.name = "h264_vda",
.pix_fmt = AV_PIX_FMT_VDA_VLD,
.start_frame = vda_old_h264_start_frame,
.decode_slice = vda_old_h264_decode_slice,
.end_frame = vda_old_h264_end_frame,
.uninit = vda_h264_uninit,
.priv_data_size = sizeof(VDAContext),
}
static int vda_old_h264_end_frame(AVCodecContext *avctx)
Definition: vda_h264.c:141
static int vda_h264_uninit(AVCodecContext *avctx)
Definition: vda_h264.c:274
static int vda_old_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: vda_h264.c:107
hardware decoding through VDA
Definition: pixfmt.h:168
static int vda_old_h264_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: vda_h264.c:92

Definition at line 285 of file vda_h264.c.

AVHWAccel ff_h264_vda_hwaccel
Initial value:
= {
.name = "h264_vda",
.pix_fmt = AV_PIX_FMT_VDA,
.alloc_frame = vda_h264_alloc_frame,
.start_frame = vda_h264_start_frame,
.decode_slice = vda_h264_decode_slice,
.end_frame = vda_h264_end_frame,
.uninit = vda_h264_uninit,
.priv_data_size = sizeof(VDAContext),
}
static int vda_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: vda_h264.c:340
static int vda_h264_uninit(AVCodecContext *avctx)
Definition: vda_h264.c:274
static int vda_h264_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
Definition: vda_h264.c:524
HW acceleration through VDA, data[3] contains a CVPixelBufferRef.
Definition: pixfmt.h:232
static int vda_h264_end_frame(AVCodecContext *avctx)
Definition: vda_h264.c:373
static int vda_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: vda_h264.c:318

Definition at line 536 of file vda_h264.c.