FFmpeg
Functions | Variables
nvdec_h264.c File Reference
#include <stdint.h>
#include <string.h>
#include "avcodec.h"
#include "nvdec.h"
#include "decode.h"
#include "internal.h"
#include "h264dec.h"
#include "hwaccel_internal.h"

Go to the source code of this file.

Functions

static void dpb_add (const H264Context *h, CUVIDH264DPBENTRY *dst, const H264Picture *src, int frame_idx)
 
static int nvdec_h264_start_frame (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static int nvdec_h264_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static int nvdec_h264_frame_params (AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
 

Variables

const FFHWAccel ff_h264_nvdec_hwaccel
 

Function Documentation

◆ dpb_add()

static void dpb_add ( const H264Context h,
CUVIDH264DPBENTRY *  dst,
const H264Picture src,
int  frame_idx 
)
static

Definition at line 33 of file nvdec_h264.c.

Referenced by nvdec_h264_start_frame().

◆ nvdec_h264_start_frame()

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

Definition at line 48 of file nvdec_h264.c.

◆ nvdec_h264_decode_slice()

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

Definition at line 132 of file nvdec_h264.c.

◆ nvdec_h264_frame_params()

static int nvdec_h264_frame_params ( AVCodecContext avctx,
AVBufferRef hw_frames_ctx 
)
static

Definition at line 165 of file nvdec_h264.c.

Variable Documentation

◆ ff_h264_nvdec_hwaccel

const FFHWAccel ff_h264_nvdec_hwaccel
Initial value:
= {
.p.name = "h264_nvdec",
.p.type = AVMEDIA_TYPE_VIDEO,
.p.pix_fmt = AV_PIX_FMT_CUDA,
.start_frame = nvdec_h264_start_frame,
.end_frame = ff_nvdec_end_frame,
.decode_slice = nvdec_h264_decode_slice,
.frame_params = nvdec_h264_frame_params,
.priv_data_size = sizeof(NVDECContext),
}

Definition at line 173 of file nvdec_h264.c.

AV_PIX_FMT_CUDA
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
Definition: pixfmt.h:260
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:79
ff_nvdec_decode_init
int ff_nvdec_decode_init(AVCodecContext *avctx)
Definition: nvdec.c:326
ff_nvdec_decode_uninit
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
Definition: nvdec.c:258
nvdec_h264_start_frame
static int nvdec_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: nvdec_h264.c:48
nvdec_h264_frame_params
static int nvdec_h264_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Definition: nvdec_h264.c:165
ff_nvdec_end_frame
int ff_nvdec_end_frame(AVCodecContext *avctx)
Definition: nvdec.c:632
nvdec_h264_decode_slice
static int nvdec_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: nvdec_h264.c:132
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
NVDECContext
Definition: nvdec.h:52