23#include "config_components.h"
41 CUVIDPICPARAMS *pp = &
ctx->pic_params;
44 AVFrame *cur_frame =
s->cur_pic.ptr->f;
55 *pp = (CUVIDPICPARAMS) {
56 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
57 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
58 .CurrPicIdx = cf->
idx,
68 .CodecSpecific.vc1 = {
71 .FrameWidth = cur_frame->
width,
72 .FrameHeight = cur_frame->
height,
78 .progressive_fcm = v->
fcm == 0,
122 if (
ctx->bitstream_len)
130 marker_size = (
size >=
sizeof(marker) &&
AV_RB32(
buffer) != marker) ?
sizeof(marker) : 0;
133 ctx->bitstream_len +
size + marker_size);
136 ctx->bitstream =
ctx->bitstream_internal =
tmp;
139 (
ctx->nb_slices + 1) *
sizeof(*
ctx->slice_offsets));
145 AV_WB32(
ctx->bitstream_internal +
ctx->bitstream_len, marker);
147 memcpy(
ctx->bitstream_internal +
ctx->bitstream_len + marker_size,
buffer,
size);
148 ctx->slice_offsets[
ctx->nb_slices] =
ctx->bitstream_len;
149 ctx->bitstream_len +=
size + marker_size;
163#if CONFIG_VC1_NVDEC_HWACCEL || CONFIG_WMV3_NVDEC_HWACCEL
171#if CONFIG_VC1_NVDEC_HWACCEL
173 .p.name =
"vc1_nvdec",
180 .frame_params = nvdec_vc1_cuda_frame_params,
187#if CONFIG_VC1_NVDEC_CUARRAY_HWACCEL || CONFIG_WMV3_NVDEC_CUARRAY_HWACCEL
195#if CONFIG_VC1_NVDEC_CUARRAY_HWACCEL
197 .p.name =
"vc1_nvdec_cuarray",
204 .frame_params = nvdec_vc1_cuarray_frame_params,
211#if CONFIG_WMV3_NVDEC_HWACCEL
213 .p.name =
"wmv3_nvdec",
220 .frame_params = nvdec_vc1_cuda_frame_params,
227#if CONFIG_WMV3_NVDEC_CUARRAY_HWACCEL
229 .p.name =
"wmv3_nvdec_cuarray",
236 .frame_params = nvdec_vc1_cuarray_frame_params,
Libavcodec external API header.
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given buffer if it is not large enough, otherwise do nothing.
@ AV_PICTURE_TYPE_I
Intra.
@ AV_PICTURE_TYPE_BI
BI type.
@ AV_PICTURE_TYPE_P
Predicted.
const struct FFHWAccel ff_vc1_nvdec_cuarray_hwaccel
const struct FFHWAccel ff_vc1_nvdec_hwaccel
const struct FFHWAccel ff_wmv3_nvdec_cuarray_hwaccel
const struct FFHWAccel ff_wmv3_nvdec_hwaccel
common internal api header.
Memory handling functions.
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)
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, enum AVPixelFormat hw_format, int dpb_size, int supports_444)
static int nvdec_vc1_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, enum AVPixelFormat hw_format)
static int nvdec_vc1_start_frame(AVCodecContext *avctx, const AVBufferRef *buffer_ref, const uint8_t *buffer, uint32_t size)
static int nvdec_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
@ AV_PIX_FMT_CUARRAY
hardware decoding through openharmony
A reference to a data buffer.
main external API structure.
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.
void * private_ref
RefStruct reference for internal use by a single libav* library.
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
int tfcntrflag
TFCNTR present.
int profile
Sequence header data for all Profiles TODO: choose between ints, uint8_ts and monobit flags.
int dquant
How qscale varies with MBs, 2 bits (not in Simple)
int multires
frame-level RESPIC syntax element present
int finterpflag
INTERPFRM present.
int extended_mv
Ext MV in P/B (not in Simple)
int extended_dmv
Additional extended dmv range at P/B-frame-level.
int panscanflag
NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present.
int psf
Progressive Segmented Frame.
int field_mode
1 for interlaced field pictures
uint8_t rangeredfrm
Frame decoding info for S/M profiles only.
int quantizer_mode
2 bits, quantizer mode used for sequence, see QUANT_*
int broadcast
TFF/RFF present.
int refdist_flag
REFDIST syntax element present in II, IP, PI or PP field picture headers.
int max_b_frames
max number of B-frames
int overlap
overlapped transforms in use
int cur_field_type
0: top, 1: bottom
int postprocflag
Per-frame processing suggestion flag present.
enum FrameCodingMode fcm
Frame decoding info for Advanced profile.
int interlace
Progressive/interlaced (RPTFTM syntax element)
int resync_marker
could this stream contain resync markers
int fastuvmc
Rounding of qpel vector to hpel ? (not in Simple)
int rangered
RANGEREDFRM (range reduction) syntax element present at frame level.
int vstransform
variable-size [48]x[48] transform type + info
static AVFormatContext * ctx
@ ILACE_FIELD
in the bitstream is reported as 11b