35 CUVIDMPEG4PICPARAMS *ppc = &pp->CodecSpecific.mpeg4;
49 *pp = (CUVIDPICPARAMS) {
50 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
51 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
52 .CurrPicIdx = cf->
idx,
59 .CodecSpecific.mpeg4 = {
63 .video_object_layer_width = s->
width,
64 .video_object_layer_height = s->
height,
78 .vop_fcode_forward = s->
f_code,
79 .vop_fcode_backward = s->
b_code,
88 for (i = 0; i < 64; ++i) {
110 .
name =
"mpeg4_nvdec",
const struct AVCodec * codec
This structure describes decoded (raw) audio or video data.
int resync_marker
could this stream contain resync markers
int ff_nvdec_simple_end_frame(AVCodecContext *avctx)
static int nvdec_mpeg4_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
CUVIDPICPARAMS pic_params
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int no_rounding
apply no rounding to motion compensation (MPEG-4, msmpeg4, ...) for B-frames rounding mode is always ...
Picture current_picture
copy of the current picture structure.
uint16_t pp_time
time distance between the last 2 p,s,i frames
static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
int quarter_sample
1->qpel, 0->half pel ME/MC
const AVHWAccel ff_mpeg4_nvdec_hwaccel
int ff_nvdec_decode_init(AVCodecContext *avctx)
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size)
const char * name
Name of the hardware accelerated codec.
static int nvdec_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
HW acceleration through CUDA.
uint16_t inter_matrix[64]
Libavcodec external API header.
main external API structure.
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
uint8_t * data
The data buffer.
int height
picture size. must be a multiple of 16
int f_code
forward MV resolution
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
uint16_t pb_field_time
like above, just for interlaced
A reference to a data buffer.
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
int ff_nvdec_get_ref_idx(AVFrame *frame)
void * hwaccel_priv_data
hwaccel-specific private data
Picture last_picture
copy of the previous picture structure.
struct AVCodecInternal * internal
Private context used for internal data.
Picture next_picture
copy of the next picture structure.
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
int time_increment_bits
number of bits to represent the fractional part of time
void * hwaccel_priv
Per-frame private data for hwaccels.
int b_code
backward MV resolution for B-frames (MPEG-4)
uint16_t pb_time
time distance between the last b and p,s,i frame