Go to the documentation of this file.
37 CUVIDPICPARAMS *pp = &
ctx->pic_params;
38 CUVIDMPEG4PICPARAMS *ppc = &pp->CodecSpecific.mpeg4;
41 AVFrame *cur_frame =
s->current_picture.f;
52 *pp = (CUVIDPICPARAMS) {
53 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
54 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
55 .CurrPicIdx = cf->
idx,
62 .CodecSpecific.mpeg4 = {
66 .video_object_layer_width =
s->width,
67 .video_object_layer_height =
s->height,
69 .top_field_first =
s->top_field_first,
71 .quant_type =
s->mpeg_quant,
72 .quarter_sample =
s->quarter_sample,
74 .divx_flags =
s->divx_packed ? 5 : 0,
78 .vop_rounding_type =
s->no_rounding,
79 .alternate_vertical_scan_flag =
s->alternate_scan,
80 .interlaced = !
s->progressive_sequence,
81 .vop_fcode_forward =
s->f_code,
82 .vop_fcode_backward =
s->b_code,
83 .trd = {
s->pp_time,
s->pp_field_time >> 1 },
84 .trb = {
s->pb_time,
s->pb_field_time >> 1 },
91 for (
i = 0;
i < 64; ++
i) {
92 int n =
s->idsp.idct_permutation[
i];
93 ppc->QuantMatrixIntra[
i] =
s->intra_matrix[n];
94 ppc->QuantMatrixInter[
i] =
s->inter_matrix[n];
114 .
p.
name =
"mpeg4_nvdec",
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
const FFHWAccel ff_mpeg4_nvdec_hwaccel
uint8_t * data
The data buffer.
int ff_nvdec_get_ref_idx(AVFrame *frame)
AVHWAccel p
The public AVHWAccel.
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
This structure describes decoded (raw) audio or video data.
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 struct AVCodec * codec
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
int ff_nvdec_simple_end_frame(AVCodecContext *avctx)
int ff_nvdec_decode_init(AVCodecContext *avctx)
struct AVCodecInternal * internal
Private context used for internal data.
@ AV_PICTURE_TYPE_I
Intra.
void * hwaccel_priv_data
hwaccel-specific private data
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
const char * name
Name of the hardware accelerated codec.
int time_increment_bits
number of bits to represent the fractional part of time
#define i(width, name, range_min, range_max)
main external API structure.
int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size, int supports_444)
int resync_marker
could this stream contain resync markers
@ AV_PICTURE_TYPE_P
Predicted.
A reference to a data buffer.
void * hwaccel_priv
Per-frame private data for hwaccels.
static int nvdec_mpeg4_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
@ AV_PICTURE_TYPE_S
S(GMC)-VOP MPEG-4.