49 CUVIDAV1PICPARAMS *ppc = &pp->CodecSpecific.av1;
66 *pp = (CUVIDPICPARAMS) {
67 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
68 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
69 .CurrPicIdx = cf->
idx,
74 .CodecSpecific.av1 = {
75 .width = cur_frame->
width,
76 .height = cur_frame->
height,
122 .tx_mode = frame_header->
tx_mode,
129 .num_tile_cols = frame_header->
tile_cols,
130 .num_tile_rows = frame_header->
tile_rows,
150 .qm_y = frame_header->
qm_y,
151 .qm_u = frame_header->
qm_u,
152 .qm_v = frame_header->
qm_v,
175 .lr_type[0] = remap_lr_type[frame_header->
lr_type[0]],
176 .lr_type[1] = remap_lr_type[frame_header->
lr_type[1]],
177 .lr_type[2] = remap_lr_type[frame_header->
lr_type[2]],
187 .apply_grain = apply_grain,
199 .cb_mult = film_grain->
cb_mult,
202 .cr_mult = film_grain->
cr_mult,
224 ppc->segmentation_feature_mask[
i] = 0;
227 ppc->segmentation_feature_data[
i][j] = frame_header->
feature_value[
i][j];
240 ppc->primary_ref_frame = -1;
243 ppc->primary_ref_frame = ppc->ref_frame_map[pri_ref_idx];
251 ppc->ref_frame[
i].index = ppc->ref_frame_map[ref_idx];
253 ppc->ref_frame[
i].height = ref_frame->
height;
258 for (j = 0; j < 6; ++j) {
265 for (
i = 0;
i < 14; ++
i) {
269 for (
i = 0;
i < 10; ++
i) {
275 for (
i = 0;
i < 24; ++
i) {
278 for (
i = 0;
i < 25; ++
i) {
325 for (uint32_t tile_num = s->
tg_start; tile_num <= s->tg_end; ++tile_num) {
uint8_t clip_to_restricted_range
This structure describes decoded (raw) audio or video data.
int ff_nvdec_start_frame_sep_ref(AVCodecContext *avctx, AVFrame *frame, int has_sep_ref)
AV1RawFrameHeader * raw_frame_header
uint8_t ar_coeffs_cb_plus_128[25]
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)
uint8_t point_cr_scaling[10]
TileGroupInfo * tile_group_info
int export_side_data
Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of metadata exported in frame...
uint8_t chroma_scaling_from_luma
static int nvdec_av1_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
CUVIDPICPARAMS pic_params
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
uint8_t grain_scale_shift
uint8_t point_cr_value[10]
uint8_t * bitstream_internal
int ff_nvdec_decode_init(AVCodecContext *avctx)
const char * name
Name of the hardware accelerated codec.
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.
uint8_t ar_coeffs_cr_plus_128[25]
AV1RawFilmGrainParams film_grain
uint8_t grain_scaling_minus_8
HW acceleration through CUDA.
uint8_t point_cb_scaling[10]
uint8_t skip_mode_frame_idx[2]
#define AV_CODEC_EXPORT_DATA_FILM_GRAIN
Decoding only.
Libavcodec external API header.
static int nvdec_av1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
uint8_t ar_coeff_shift_minus_6
unsigned int bitstream_allocated
main external API structure.
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
uint8_t * data
The data buffer.
const AVHWAccel ff_av1_nvdec_hwaccel
unsigned int slice_offsets_allocated
uint8_t point_cb_value[10]
uint8_t point_y_scaling[14]
int32_t gm_params[AV1_NUM_REF_FRAMES][6]
A reference to a data buffer.
AV1Frame ref[AV1_NUM_REF_FRAMES]
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
common internal api header.
int ff_nvdec_get_ref_idx(AVFrame *frame)
void * hwaccel_priv_data
hwaccel-specific private data
AV1RawSequenceHeader * raw_seq
uint8_t point_y_value[14]
static int get_bit_depth_from_seq(const AV1RawSequenceHeader *seq)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are short
static int nvdec_av1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
struct AVCodecInternal * internal
Private context used for internal data.
uint8_t gm_type[AV1_NUM_REF_FRAMES]
void * hwaccel_priv
Per-frame private data for hwaccels.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
uint8_t ar_coeffs_y_plus_128[24]