38 pp->RefPicIdx[idx] = cf ? cf->idx : -1;
39 pp->PicOrderCntVal[idx] = src->
poc;
49 for (i = 0; i < 6; i++) {
50 for (j = 0; j < 16; j++) {
52 ppc->ScalingList4x4[
i][j] = sl->
sl[0][
i][
pos];
55 for (j = 0; j < 64; j++) {
57 ppc->ScalingList8x8[
i][j] = sl->
sl[1][
i][
pos];
58 ppc->ScalingList16x16[
i][j] = sl->
sl[2][
i][
pos];
61 ppc->ScalingList32x32[
i][j] = sl->
sl[3][i * 3][
pos];
64 ppc->ScalingListDCCoeff16x16[
i] = sl->
sl_dc[0][
i];
66 ppc->ScalingListDCCoeff32x32[
i] = sl->
sl_dc[1][i * 3];
79 CUVIDHEVCPICPARAMS *ppc = &pp->CodecSpecific.hevc;
92 *pp = (CUVIDPICPARAMS) {
93 .PicWidthInMbs = sps->
width / 16,
94 .FrameHeightInMbs = sps->
height / 16,
95 .CurrPicIdx = cf->
idx,
99 .CodecSpecific.hevc = {
100 .pic_width_in_luma_samples = sps->
width,
101 .pic_height_in_luma_samples = sps->
height,
111 #if NVDECAPI_CHECK_VERSION(8, 1) 124 .num_short_term_ref_pic_sets = sps->
nb_st_rps,
128 .sample_adaptive_offset_enabled_flag = sps->
sao_enabled,
132 .bit_depth_luma_minus8 = sps->
bit_depth - 8,
133 .bit_depth_chroma_minus8 = sps->
bit_depth - 8,
134 #if NVDECAPI_CHECK_VERSION(9, 0) 171 .pps_deblocking_filter_disabled_flag = pps->
disable_dbf,
173 .pps_tc_offset_div2 = pps->
tc_offset / 2,
178 #if NVDECAPI_CHECK_VERSION(9, 0) 192 .CurrPicOrderCntVal = s->
ref->
poc,
204 ppc->row_height_minus1[i] = pps->
row_height[i] - 1;
238 ppc->RefPicIdx[i] = -1;
243 ppc->RefPicSetStCurrBefore[
i] = j;
251 ppc->RefPicSetStCurrAfter[
i] = j;
259 ppc->RefPicSetLtCurr[
i] = j;
312 .
name =
"hevc_nvdec",
unsigned int log2_min_cb_size
int extended_precision_processing_flag
uint8_t log2_sao_offset_scale_luma
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void fill_scaling_lists(CUVIDHEVCPICPARAMS *ppc, const HEVCContext *s)
uint8_t diff_cu_chroma_qp_offset_depth
static int nvdec_hevc_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int max_dec_pic_buffering
int transform_skip_rotation_enabled_flag
unsigned int * row_height
RowHeight.
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size, int supports_444)
uint8_t weighted_bipred_flag
uint8_t seq_loop_filter_across_slices_enabled_flag
uint8_t cabac_init_present_flag
int explicit_rdpcm_enabled_flag
int num_ref_idx_l0_default_active
num_ref_idx_l0_default_active_minus1 + 1
static void dpb_add(CUVIDHEVCPICPARAMS *pp, int idx, const HEVCFrame *src)
int8_t cr_qp_offset_list[6]
uint8_t entropy_coding_sync_enabled_flag
int log2_parallel_merge_level
log2_parallel_merge_level_minus2 + 2
uint8_t log2_sao_offset_scale_chroma
unsigned int log2_max_trafo_size
uint8_t log2_max_transform_skip_block_size
CUVIDPICPARAMS pic_params
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
static int nvdec_hevc_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
const uint8_t ff_hevc_diag_scan8x8_x[64]
int num_ref_idx_l1_default_active
num_ref_idx_l1_default_active_minus1 + 1
unsigned int log2_min_pcm_cb_size
uint8_t scaling_list_data_present_flag
int high_precision_offsets_enabled_flag
uint8_t loop_filter_disable_flag
int8_t cb_qp_offset_list[6]
uint8_t transquant_bypass_enable_flag
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ff_hevc_frame_nb_refs(const HEVCContext *s)
Get the number of candidate references for the current frame.
unsigned int log2_max_poc_lsb
#define HEVC_FRAME_FLAG_LONG_REF
int persistent_rice_adaptation_enabled_flag
int ff_nvdec_end_frame(AVCodecContext *avctx)
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
static int nvdec_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
uint8_t pps_range_extensions_flag
#define HEVC_FRAME_FLAG_SHORT_REF
uint8_t tiles_enabled_flag
int ff_nvdec_decode_init(AVCodecContext *avctx)
uint8_t lists_modification_present_flag
const char * name
Name of the hardware accelerated codec.
int max_transform_hierarchy_depth_inter
struct HEVCSPS::@75 temporal_layer[HEVC_MAX_SUB_LAYERS]
uint8_t cu_qp_delta_enabled_flag
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 sign_data_hiding_flag
uint8_t output_flag_present_flag
const uint8_t ff_hevc_diag_scan4x4_y[16]
HW acceleration through CUDA.
int implicit_rdpcm_enabled_flag
#define FF_ARRAY_ELEMS(a)
uint8_t constrained_intra_pred_flag
uint8_t pic_slice_level_chroma_qp_offsets_present_flag
uint8_t transform_skip_enabled_flag
uint16_t num_tile_columns
num_tile_columns_minus1 + 1
Libavcodec external API header.
uint8_t uniform_spacing_flag
unsigned int bitstream_allocated
main external API structure.
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
int num_extra_slice_header_bits
uint8_t * data
The data buffer.
uint8_t loop_filter_across_tiles_enabled_flag
uint8_t num_long_term_ref_pics_sps
uint8_t cross_component_prediction_enabled_flag
int transform_skip_context_enabled_flag
uint8_t sps_temporal_mvp_enabled_flag
static int FUNC() pps(CodedBitstreamContext *ctx, RWContext *rw, H264RawPPS *current)
uint8_t chroma_qp_offset_list_enabled_flag
const AVHWAccel ff_hevc_nvdec_hwaccel
unsigned int slice_offsets_allocated
unsigned int log2_min_tb_size
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
uint8_t scaling_list_enable_flag
int tc_offset
tc_offset_div2 * 2
uint8_t flags
A combination of HEVC_FRAME_FLAG_*.
unsigned int log2_diff_max_min_coding_block_size
unsigned int log2_max_pcm_cb_size
const uint8_t ff_hevc_diag_scan4x4_x[16]
A reference to a data buffer.
int max_transform_hierarchy_depth_intra
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
common internal api header.
static int ref[MAX_W *MAX_W]
uint8_t weighted_pred_flag
#define NVDECAPI_CHECK_VERSION(major, minor)
uint16_t num_tile_rows
num_tile_rows_minus1 + 1
unsigned int * column_width
ColumnWidth.
void * hwaccel_priv_data
hwaccel-specific private data
uint8_t slice_header_extension_present_flag
int cabac_bypass_alignment_enabled_flag
coded frame dimension in various units
uint8_t chroma_qp_offset_list_len_minus1
const uint8_t ff_hevc_diag_scan8x8_y[64]
uint8_t sps_strong_intra_smoothing_enable_flag
int rps_idx_num_delta_pocs
struct AVCodecInternal * internal
Private context used for internal data.
int sps_range_extension_flag
static int nvdec_hevc_decode_init(AVCodecContext *avctx)
uint8_t long_term_ref_pics_present_flag
int diff_cu_qp_delta_depth
void * hwaccel_priv
Per-frame private data for hwaccels.
uint8_t deblocking_filter_override_enabled_flag
int beta_offset
beta_offset_div2 * 2
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
int intra_smoothing_disabled_flag
uint8_t separate_colour_plane_flag
uint8_t dependent_slice_segments_enabled_flag