34 CUVIDPICPARAMS *pp = &
ctx->pic_params;
35 CUVIDMPEG4PICPARAMS *ppc = &pp->CodecSpecific.mpeg4;
38 AVFrame *cur_frame =
s->current_picture.f;
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,
66 .top_field_first =
s->top_field_first,
68 .quant_type =
s->mpeg_quant,
69 .quarter_sample =
s->quarter_sample,
71 .divx_flags =
s->divx_packed ? 5 : 0,
75 .vop_rounding_type =
s->no_rounding,
76 .alternate_vertical_scan_flag =
s->alternate_scan,
77 .interlaced = !
s->progressive_sequence,
78 .vop_fcode_forward =
s->f_code,
79 .vop_fcode_backward =
s->b_code,
80 .trd = {
s->pp_time,
s->pp_field_time >> 1 },
81 .trb = {
s->pb_time,
s->pb_field_time >> 1 },
88 for (
i = 0;
i < 64; ++
i) {
89 int n =
s->idsp.idct_permutation[
i];
90 ppc->QuantMatrixIntra[
i] =
s->intra_matrix[n];
91 ppc->QuantMatrixInter[
i] =
s->inter_matrix[n];
111 .
name =
"mpeg4_nvdec",
Libavcodec external API header.
@ AV_PICTURE_TYPE_I
Intra.
@ AV_PICTURE_TYPE_P
Predicted.
@ AV_PICTURE_TYPE_S
S(GMC)-VOP MPEG-4.
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size, int supports_444)
int ff_nvdec_simple_end_frame(AVCodecContext *avctx)
int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int ff_nvdec_decode_init(AVCodecContext *avctx)
int ff_nvdec_get_ref_idx(AVFrame *frame)
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
static int nvdec_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
const AVHWAccel ff_mpeg4_nvdec_hwaccel
static int nvdec_mpeg4_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
A reference to a data buffer.
uint8_t * data
The data buffer.
main external API structure.
const struct AVCodec * codec
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.
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
const char * name
Name of the hardware accelerated codec.
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
void * hwaccel_priv
Per-frame private data for hwaccels.
int time_increment_bits
number of bits to represent the fractional part of time
int resync_marker
could this stream contain resync markers