Go to the documentation of this file.
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 ppc->QuantMatrixIntra[
i] =
s->intra_matrix[
i];
90 ppc->QuantMatrixInter[
i] =
s->inter_matrix[
i];
110 .
name =
"mpeg4_nvdec",
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
uint8_t * data
The data buffer.
int ff_nvdec_get_ref_idx(AVFrame *frame)
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)
const AVHWAccel ff_mpeg4_nvdec_hwaccel
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.