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][pos];
65 memcpy(ppc->ScalingListDCCoeff16x16, sl->
sl_dc[0],
sizeof(ppc->ScalingListDCCoeff16x16));
66 memcpy(ppc->ScalingListDCCoeff32x32, sl->
sl_dc[1],
sizeof(ppc->ScalingListDCCoeff32x32));
78 CUVIDHEVCPICPARAMS *ppc = &pp->CodecSpecific.hevc;
82 int i, j, dpb_size, ret;
91 *pp = (CUVIDPICPARAMS) {
92 .PicWidthInMbs = sps->
width / 16,
93 .FrameHeightInMbs = sps->
height / 16,
94 .CurrPicIdx = cf->
idx,
98 .CodecSpecific.hevc = {
99 .pic_width_in_luma_samples = sps->
width,
100 .pic_height_in_luma_samples = sps->
height,
110 #if NVDECAPI_CHECK_VERSION(8, 1) 123 .num_short_term_ref_pic_sets = sps->
nb_st_rps,
127 .sample_adaptive_offset_enabled_flag = sps->
sao_enabled,
131 .bit_depth_luma_minus8 = sps->
bit_depth - 8,
132 .bit_depth_chroma_minus8 = sps->
bit_depth - 8,
159 .pps_deblocking_filter_disabled_flag = pps->
disable_dbf,
161 .pps_tc_offset_div2 = pps->
tc_offset / 2,
174 .CurrPicOrderCntVal = s->
ref->
poc,
186 ppc->row_height_minus1[i] = pps->
row_height[i] - 1;
208 ppc->RefPicIdx[i] = -1;
211 for (j = 0; j < dpb_size; j++) {
213 ppc->RefPicSetStCurrBefore[i] = j;
219 for (j = 0; j < dpb_size; j++) {
221 ppc->RefPicSetStCurrAfter[i] = j;
227 for (j = 0; j < dpb_size; j++) {
229 ppc->RefPicSetLtCurr[i] = j;
276 .
name =
"hevc_nvdec",
unsigned int log2_min_cb_size
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)
static int nvdec_hevc_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int max_dec_pic_buffering
unsigned int * row_height
RowHeight.
uint8_t weighted_bipred_flag
uint8_t seq_loop_filter_across_slices_enabled_flag
uint8_t cabac_init_present_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)
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
uint8_t transquant_bypass_enable_flag
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int log2_max_poc_lsb
#define HEVC_FRAME_FLAG_LONG_REF
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)
#define HEVC_FRAME_FLAG_SHORT_REF
uint8_t tiles_enabled_flag
int ff_nvdec_decode_init(AVCodecContext *avctx)
uint8_t lists_modification_present_flag
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size)
const char * name
Name of the hardware accelerated codec.
int max_transform_hierarchy_depth_inter
int num_tile_columns
num_tile_columns_minus1 + 1
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.
#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
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 sps_temporal_mvp_enabled_flag
int num_tile_rows
num_tile_rows_minus1 + 1
static int FUNC() pps(CodedBitstreamContext *ctx, RWContext *rw, H264RawPPS *current)
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.
struct HEVCSPS::@71 temporal_layer[HEVC_MAX_SUB_LAYERS]
static int ref[MAX_W *MAX_W]
uint8_t weighted_pred_flag
unsigned int * column_width
ColumnWidth.
void * hwaccel_priv_data
hwaccel-specific private data
uint8_t slice_header_extension_present_flag
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.
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
uint8_t separate_colour_plane_flag
uint8_t dependent_slice_segments_enabled_flag