FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvdec_hevc.c
Go to the documentation of this file.
1 /*
2  * HEVC HW decode acceleration through NVDEC
3  *
4  * Copyright (c) 2017 Anton Khirnov
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #include <stdint.h>
24 #include <string.h>
25 
26 #include "avcodec.h"
27 #include "nvdec.h"
28 #include "decode.h"
29 #include "internal.h"
30 #include "hevcdec.h"
31 #include "hevc_data.h"
32 
33 static void dpb_add(CUVIDHEVCPICPARAMS *pp, int idx, const HEVCFrame *src)
34 {
36  const NVDECFrame *cf = fdd->hwaccel_priv;
37 
38  pp->RefPicIdx[idx] = cf ? cf->idx : -1;
39  pp->PicOrderCntVal[idx] = src->poc;
40  pp->IsLongTerm[idx] = !!(src->flags & HEVC_FRAME_FLAG_LONG_REF);
41 }
42 
43 static void fill_scaling_lists(CUVIDHEVCPICPARAMS *ppc, const HEVCContext *s)
44 {
46  &s->ps.pps->scaling_list : &s->ps.sps->scaling_list;
47  int i, j, pos;
48 
49  for (i = 0; i < 6; i++) {
50  for (j = 0; j < 16; j++) {
52  ppc->ScalingList4x4[i][j] = sl->sl[0][i][pos];
53  }
54 
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];
59 
60  if (i < 2)
61  ppc->ScalingList32x32[i][j] = sl->sl[3][i * 3][pos];
62  }
63 
64  ppc->ScalingListDCCoeff16x16[i] = sl->sl_dc[0][i];
65  if (i < 2)
66  ppc->ScalingListDCCoeff32x32[i] = sl->sl_dc[1][i * 3];
67  }
68 }
69 
71  const uint8_t *buffer, uint32_t size)
72 {
73  const HEVCContext *s = avctx->priv_data;
74  const HEVCPPS *pps = s->ps.pps;
75  const HEVCSPS *sps = s->ps.sps;
76 
78  CUVIDPICPARAMS *pp = &ctx->pic_params;
79  CUVIDHEVCPICPARAMS *ppc = &pp->CodecSpecific.hevc;
80  FrameDecodeData *fdd;
81  NVDECFrame *cf;
82 
83  int i, j, dpb_size, ret;
84 
85  ret = ff_nvdec_start_frame(avctx, s->ref->frame);
86  if (ret < 0)
87  return ret;
88 
90  cf = (NVDECFrame*)fdd->hwaccel_priv;
91 
92  *pp = (CUVIDPICPARAMS) {
93  .PicWidthInMbs = sps->width / 16,
94  .FrameHeightInMbs = sps->height / 16,
95  .CurrPicIdx = cf->idx,
96  .ref_pic_flag = 1,
97  .intra_pic_flag = IS_IRAP(s),
98 
99  .CodecSpecific.hevc = {
100  .pic_width_in_luma_samples = sps->width,
101  .pic_height_in_luma_samples = sps->height,
102  .log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3,
103  .log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size,
104  .log2_min_transform_block_size_minus2 = sps->log2_min_tb_size - 2,
105  .log2_diff_max_min_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size,
106  .pcm_enabled_flag = sps->pcm_enabled_flag,
107  .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm_enabled_flag ? sps->pcm.log2_min_pcm_cb_size - 3 : 0,
108  .log2_diff_max_min_pcm_luma_coding_block_size = sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size,
109  .pcm_sample_bit_depth_luma_minus1 = sps->pcm_enabled_flag ? sps->pcm.bit_depth - 1 : 0,
110  .pcm_sample_bit_depth_chroma_minus1 = sps->pcm_enabled_flag ? sps->pcm.bit_depth_chroma - 1 : 0,
111 #if NVDECAPI_CHECK_VERSION(8, 1)
112  .log2_max_transform_skip_block_size_minus2 = pps->log2_max_transform_skip_block_size - 2,
113  .log2_sao_offset_scale_luma = pps->log2_sao_offset_scale_luma,
114  .log2_sao_offset_scale_chroma = pps->log2_sao_offset_scale_chroma,
115  .high_precision_offsets_enabled_flag = sps->high_precision_offsets_enabled_flag,
116 #endif
117  .pcm_loop_filter_disabled_flag = sps->pcm.loop_filter_disable_flag,
118  .strong_intra_smoothing_enabled_flag = sps->sps_strong_intra_smoothing_enable_flag,
119  .max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra,
120  .max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter,
121  .amp_enabled_flag = sps->amp_enabled_flag,
122  .separate_colour_plane_flag = sps->separate_colour_plane_flag,
123  .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4,
124  .num_short_term_ref_pic_sets = sps->nb_st_rps,
125  .long_term_ref_pics_present_flag = sps->long_term_ref_pics_present_flag,
126  .num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps,
127  .sps_temporal_mvp_enabled_flag = sps->sps_temporal_mvp_enabled_flag,
128  .sample_adaptive_offset_enabled_flag = sps->sao_enabled,
129  .scaling_list_enable_flag = sps->scaling_list_enable_flag,
130  .IrapPicFlag = IS_IRAP(s),
131  .IdrPicFlag = IS_IDR(s),
132  .bit_depth_luma_minus8 = sps->bit_depth - 8,
133  .bit_depth_chroma_minus8 = sps->bit_depth - 8,
134 
135  .dependent_slice_segments_enabled_flag = pps->dependent_slice_segments_enabled_flag,
136  .slice_segment_header_extension_present_flag = pps->slice_header_extension_present_flag,
137  .sign_data_hiding_enabled_flag = pps->sign_data_hiding_flag,
138  .cu_qp_delta_enabled_flag = pps->cu_qp_delta_enabled_flag,
139  .diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth,
140  .init_qp_minus26 = pps->pic_init_qp_minus26,
141  .pps_cb_qp_offset = pps->cb_qp_offset,
142  .pps_cr_qp_offset = pps->cr_qp_offset,
143  .constrained_intra_pred_flag = pps->constrained_intra_pred_flag,
144  .weighted_pred_flag = pps->weighted_pred_flag,
145  .weighted_bipred_flag = pps->weighted_bipred_flag,
146  .transform_skip_enabled_flag = pps->transform_skip_enabled_flag,
147  .transquant_bypass_enabled_flag = pps->transquant_bypass_enable_flag,
148  .entropy_coding_sync_enabled_flag = pps->entropy_coding_sync_enabled_flag,
149  .log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2,
150  .num_extra_slice_header_bits = pps->num_extra_slice_header_bits,
151  .loop_filter_across_tiles_enabled_flag = pps->loop_filter_across_tiles_enabled_flag,
152  .loop_filter_across_slices_enabled_flag = pps->seq_loop_filter_across_slices_enabled_flag,
153  .output_flag_present_flag = pps->output_flag_present_flag,
154  .num_ref_idx_l0_default_active_minus1 = pps->num_ref_idx_l0_default_active - 1,
155  .num_ref_idx_l1_default_active_minus1 = pps->num_ref_idx_l1_default_active - 1,
156  .lists_modification_present_flag = pps->lists_modification_present_flag,
157  .cabac_init_present_flag = pps->cabac_init_present_flag,
158  .pps_slice_chroma_qp_offsets_present_flag = pps->pic_slice_level_chroma_qp_offsets_present_flag,
159  .deblocking_filter_override_enabled_flag = pps->deblocking_filter_override_enabled_flag,
160  .pps_deblocking_filter_disabled_flag = pps->disable_dbf,
161  .pps_beta_offset_div2 = pps->beta_offset / 2,
162  .pps_tc_offset_div2 = pps->tc_offset / 2,
163  .tiles_enabled_flag = pps->tiles_enabled_flag,
164  .uniform_spacing_flag = pps->uniform_spacing_flag,
165  .num_tile_columns_minus1 = pps->num_tile_columns - 1,
166  .num_tile_rows_minus1 = pps->num_tile_rows - 1,
167 
168  .NumBitsForShortTermRPSInSlice = s->sh.short_term_rps ? s->sh.short_term_ref_pic_set_size : 0,
169  .NumDeltaPocsOfRefRpsIdx = s->sh.short_term_rps ? s->sh.short_term_rps->rps_idx_num_delta_pocs : 0,
170  .NumPocTotalCurr = ff_hevc_frame_nb_refs(s),
171  .NumPocStCurrBefore = s->rps[ST_CURR_BEF].nb_refs,
172  .NumPocStCurrAfter = s->rps[ST_CURR_AFT].nb_refs,
173  .NumPocLtCurr = s->rps[LT_CURR].nb_refs,
174  .CurrPicOrderCntVal = s->ref->poc,
175  },
176  };
177 
178  if (pps->num_tile_columns > FF_ARRAY_ELEMS(ppc->column_width_minus1) ||
179  pps->num_tile_rows > FF_ARRAY_ELEMS(ppc->row_height_minus1)) {
180  av_log(avctx, AV_LOG_ERROR, "Too many tiles\n");
181  return AVERROR(ENOSYS);
182  }
183  for (i = 0; i < pps->num_tile_columns; i++)
184  ppc->column_width_minus1[i] = pps->column_width[i] - 1;
185  for (i = 0; i < pps->num_tile_rows; i++)
186  ppc->row_height_minus1[i] = pps->row_height[i] - 1;
187 
188  if (s->rps[LT_CURR].nb_refs > FF_ARRAY_ELEMS(ppc->RefPicSetLtCurr) ||
189  s->rps[ST_CURR_BEF].nb_refs > FF_ARRAY_ELEMS(ppc->RefPicSetStCurrBefore) ||
190  s->rps[ST_CURR_AFT].nb_refs > FF_ARRAY_ELEMS(ppc->RefPicSetStCurrAfter)) {
191  av_log(avctx, AV_LOG_ERROR, "Too many reference frames\n");
192  return AVERROR(ENOSYS);
193  }
194 
195  dpb_size = 0;
196  for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {
197  const HEVCFrame *ref = &s->DPB[i];
199  continue;
200  if (dpb_size >= FF_ARRAY_ELEMS(ppc->RefPicIdx)) {
201  av_log(avctx, AV_LOG_ERROR, "Too many reference frames\n");
202  return AVERROR_INVALIDDATA;
203  }
204  dpb_add(ppc, dpb_size++, ref);
205 
206  }
207  for (i = dpb_size; i < FF_ARRAY_ELEMS(ppc->RefPicIdx); i++)
208  ppc->RefPicIdx[i] = -1;
209 
210  for (i = 0; i < s->rps[ST_CURR_BEF].nb_refs; i++) {
211  for (j = 0; j < dpb_size; j++) {
212  if (ppc->PicOrderCntVal[j] == s->rps[ST_CURR_BEF].list[i]) {
213  ppc->RefPicSetStCurrBefore[i] = j;
214  break;
215  }
216  }
217  }
218  for (i = 0; i < s->rps[ST_CURR_AFT].nb_refs; i++) {
219  for (j = 0; j < dpb_size; j++) {
220  if (ppc->PicOrderCntVal[j] == s->rps[ST_CURR_AFT].list[i]) {
221  ppc->RefPicSetStCurrAfter[i] = j;
222  break;
223  }
224  }
225  }
226  for (i = 0; i < s->rps[LT_CURR].nb_refs; i++) {
227  for (j = 0; j < dpb_size; j++) {
228  if (ppc->PicOrderCntVal[j] == s->rps[LT_CURR].list[i]) {
229  ppc->RefPicSetLtCurr[i] = j;
230  break;
231  }
232  }
233  }
234 
235  fill_scaling_lists(ppc, s);
236 
237  return 0;
238 }
239 
241  uint32_t size)
242 {
244  void *tmp;
245 
247  ctx->bitstream_len + size + 3);
248  if (!tmp)
249  return AVERROR(ENOMEM);
250  ctx->bitstream = tmp;
251 
253  (ctx->nb_slices + 1) * sizeof(*ctx->slice_offsets));
254  if (!tmp)
255  return AVERROR(ENOMEM);
256  ctx->slice_offsets = tmp;
257 
258  AV_WB24(ctx->bitstream + ctx->bitstream_len, 1);
259  memcpy(ctx->bitstream + ctx->bitstream_len + 3, buffer, size);
260  ctx->slice_offsets[ctx->nb_slices] = ctx->bitstream_len ;
261  ctx->bitstream_len += size + 3;
262  ctx->nb_slices++;
263 
264  return 0;
265 }
266 
268  AVBufferRef *hw_frames_ctx)
269 {
270  const HEVCContext *s = avctx->priv_data;
271  const HEVCSPS *sps = s->ps.sps;
272  return ff_nvdec_frame_params(avctx, hw_frames_ctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1);
273 }
274 
276  .name = "hevc_nvdec",
277  .type = AVMEDIA_TYPE_VIDEO,
278  .id = AV_CODEC_ID_HEVC,
279  .pix_fmt = AV_PIX_FMT_CUDA,
280  .start_frame = nvdec_hevc_start_frame,
281  .end_frame = ff_nvdec_end_frame,
282  .decode_slice = nvdec_hevc_decode_slice,
283  .frame_params = nvdec_hevc_frame_params,
284  .init = ff_nvdec_decode_init,
285  .uninit = ff_nvdec_decode_uninit,
286  .priv_data_size = sizeof(NVDECContext),
287 };
const HEVCPPS * pps
Definition: hevc_ps.h:403
AVFrame * frame
Definition: hevcdec.h:312
unsigned int log2_min_cb_size
Definition: hevc_ps.h:277
uint8_t log2_sao_offset_scale_luma
Definition: hevc_ps.h:374
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
static void fill_scaling_lists(CUVIDHEVCPICPARAMS *ppc, const HEVCContext *s)
Definition: nvdec_hevc.c:43
HEVCFrame * ref
Definition: hevcdec.h:423
static int nvdec_hevc_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: nvdec_hevc.c:70
int max_dec_pic_buffering
Definition: hevc_ps.h:244
unsigned int * row_height
RowHeight.
Definition: hevc_ps.h:379
int pic_init_qp_minus26
Definition: hevc_ps.h:327
unsigned * slice_offsets
Definition: nvdec.h:61
uint8_t weighted_bipred_flag
Definition: hevc_ps.h:339
uint8_t seq_loop_filter_across_slices_enabled_flag
Definition: hevc_ps.h:352
uint8_t cabac_init_present_flag
Definition: hevc_ps.h:323
HEVCParamSets ps
Definition: hevcdec.h:408
int num_ref_idx_l0_default_active
num_ref_idx_l0_default_active_minus1 + 1
Definition: hevc_ps.h:325
static void dpb_add(CUVIDHEVCPICPARAMS *pp, int idx, const HEVCFrame *src)
Definition: nvdec_hevc.c:33
int nb_slices
Definition: nvdec.h:62
#define src
Definition: vp8dsp.c:254
int width
Definition: hevc_ps.h:296
uint8_t entropy_coding_sync_enabled_flag
Definition: hevc_ps.h:345
int log2_parallel_merge_level
log2_parallel_merge_level_minus2 + 2
Definition: hevc_ps.h:364
uint8_t log2_sao_offset_scale_chroma
Definition: hevc_ps.h:375
int nb_refs
Definition: hevcdec.h:235
uint8_t disable_dbf
Definition: hevc_ps.h:356
uint8_t * bitstream
Definition: nvdec.h:57
unsigned int log2_max_trafo_size
Definition: hevc_ps.h:280
uint8_t
uint8_t log2_max_transform_skip_block_size
Definition: hevc_ps.h:367
CUVIDPICPARAMS pic_params
Definition: nvdec.h:51
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
Definition: frame.h:603
static int nvdec_hevc_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Definition: nvdec_hevc.c:267
const uint8_t ff_hevc_diag_scan8x8_x[64]
Definition: hevc_data.c:39
int num_ref_idx_l1_default_active
num_ref_idx_l1_default_active_minus1 + 1
Definition: hevc_ps.h:326
unsigned int log2_min_pcm_cb_size
Definition: hevc_ps.h:270
uint8_t scaling_list_data_present_flag
Definition: hevc_ps.h:360
int high_precision_offsets_enabled_flag
Definition: hevc_ps.h:292
uint8_t loop_filter_disable_flag
Definition: hevc_ps.h:272
ptrdiff_t size
Definition: opengl_enc.c:101
uint8_t transquant_bypass_enable_flag
Definition: hevc_ps.h:341
#define av_log(a,...)
int bit_depth_chroma
Definition: hevc_ps.h:235
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
int ff_hevc_frame_nb_refs(const HEVCContext *s)
Get the number of candidate references for the current frame.
Definition: hevc_refs.c:511
unsigned int log2_max_poc_lsb
Definition: hevc_ps.h:239
#define HEVC_FRAME_FLAG_LONG_REF
Definition: hevcdec.h:308
#define AVERROR(e)
Definition: error.h:43
uint8_t amp_enabled_flag
Definition: hevc_ps.h:259
int ff_nvdec_end_frame(AVCodecContext *avctx)
Definition: nvdec.c:493
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
Definition: nvdec.c:451
static int nvdec_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: nvdec_hevc.c:240
const ShortTermRPS * short_term_rps
Definition: hevc_ps.h:69
#define IS_IDR(s)
Definition: hevcdec.h:77
#define HEVC_FRAME_FLAG_SHORT_REF
Definition: hevcdec.h:307
unsigned int idx
Definition: nvdec.h:45
uint8_t tiles_enabled_flag
Definition: hevc_ps.h:344
const HEVCSPS * sps
Definition: hevc_ps.h:402
int ff_nvdec_decode_init(AVCodecContext *avctx)
Definition: nvdec.c:267
uint8_t lists_modification_present_flag
Definition: hevc_ps.h:363
#define IS_IRAP(s)
Definition: hevcdec.h:80
int dpb_size
Definition: h264_levels.c:65
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size)
Definition: nvdec.c:563
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:3615
struct HEVCSPS::@92 temporal_layer[HEVC_MAX_SUB_LAYERS]
int max_transform_hierarchy_depth_inter
Definition: hevc_ps.h:284
int num_tile_columns
num_tile_columns_minus1 + 1
Definition: hevc_ps.h:347
int bitstream_len
Definition: nvdec.h:58
AVFormatContext * ctx
Definition: movenc.c:48
uint8_t cu_qp_delta_enabled_flag
Definition: hevc_ps.h:332
#define AV_WB24(p, d)
Definition: intreadwrite.h:450
#define s(width, name)
Definition: cbs_vp9.c:257
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.
Definition: mem.c:464
uint8_t sl_dc[2][6]
Definition: hevc_ps.h:222
uint8_t sign_data_hiding_flag
Definition: hevc_ps.h:321
int height
Definition: hevc_ps.h:297
uint8_t output_flag_present_flag
Definition: hevc_ps.h:340
const uint8_t ff_hevc_diag_scan4x4_y[16]
Definition: hevc_data.c:32
HW acceleration through CUDA.
Definition: pixfmt.h:235
#define FF_ARRAY_ELEMS(a)
uint8_t constrained_intra_pred_flag
Definition: hevc_ps.h:329
uint8_t sl[4][6][64]
Definition: hevc_ps.h:221
uint8_t pic_slice_level_chroma_qp_offsets_present_flag
Definition: hevc_ps.h:337
HEVCFrame DPB[32]
Definition: hevcdec.h:424
uint8_t transform_skip_enabled_flag
Definition: hevc_ps.h:330
int short_term_ref_pic_set_size
Definition: hevc_ps.h:67
Libavcodec external API header.
uint8_t uniform_spacing_flag
Definition: hevc_ps.h:349
unsigned int bitstream_allocated
Definition: nvdec.h:59
int max_sub_layers
Definition: hevc_ps.h:242
ScalingList scaling_list
Definition: hevc_ps.h:361
main external API structure.
Definition: avcodec.h:1540
uint8_t sao_enabled
Definition: hevc_ps.h:260
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
Definition: nvdec.c:249
int num_extra_slice_header_bits
Definition: hevc_ps.h:365
uint8_t * data
The data buffer.
Definition: buffer.h:89
uint8_t loop_filter_across_tiles_enabled_flag
Definition: hevc_ps.h:350
uint8_t num_long_term_ref_pics_sps
Definition: hevc_ps.h:265
uint8_t sps_temporal_mvp_enabled_flag
Definition: hevc_ps.h:274
unsigned int nb_st_rps
Definition: hevc_ps.h:256
int num_tile_rows
num_tile_rows_minus1 + 1
Definition: hevc_ps.h:348
static int FUNC() pps(CodedBitstreamContext *ctx, RWContext *rw, H264RawPPS *current)
int poc
Definition: hevcdec.h:318
const AVHWAccel ff_hevc_nvdec_hwaccel
Definition: nvdec_hevc.c:275
unsigned int slice_offsets_allocated
Definition: nvdec.h:63
unsigned int log2_min_tb_size
Definition: hevc_ps.h:279
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
uint8_t scaling_list_enable_flag
Definition: hevc_ps.h:253
int tc_offset
tc_offset_div2 * 2
Definition: hevc_ps.h:358
uint8_t flags
A combination of HEVC_FRAME_FLAG_*.
Definition: hevcdec.h:337
int cr_qp_offset
Definition: hevc_ps.h:336
ScalingList scaling_list
Definition: hevc_ps.h:254
int list[HEVC_MAX_REFS]
Definition: hevcdec.h:233
unsigned int log2_diff_max_min_coding_block_size
Definition: hevc_ps.h:278
unsigned int log2_max_pcm_cb_size
Definition: hevc_ps.h:271
const uint8_t ff_hevc_diag_scan4x4_x[16]
Definition: hevc_data.c:25
A reference to a data buffer.
Definition: buffer.h:81
int max_transform_hierarchy_depth_intra
Definition: hevc_ps.h:285
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
Definition: decode.h:34
common internal api header.
if(ret< 0)
Definition: vf_mcdeint.c:279
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:107
uint8_t weighted_pred_flag
Definition: hevc_ps.h:338
unsigned int * column_width
ColumnWidth.
Definition: hevc_ps.h:378
void * hwaccel_priv_data
hwaccel-specific private data
Definition: internal.h:190
uint8_t slice_header_extension_present_flag
Definition: hevc_ps.h:366
const uint8_t ff_hevc_diag_scan8x8_y[64]
Definition: hevc_data.c:58
void * priv_data
Definition: avcodec.h:1567
RefPicList rps[5]
Definition: hevcdec.h:416
uint8_t sps_strong_intra_smoothing_enable_flag
Definition: hevc_ps.h:275
int rps_idx_num_delta_pocs
Definition: hevc_ps.h:37
struct AVCodecInternal * internal
Private context used for internal data.
Definition: avcodec.h:1575
uint8_t long_term_ref_pics_present_flag
Definition: hevc_ps.h:262
int diff_cu_qp_delta_depth
Definition: hevc_ps.h:333
int cb_qp_offset
Definition: hevc_ps.h:335
void * hwaccel_priv
Per-frame private data for hwaccels.
Definition: decode.h:52
uint8_t deblocking_filter_override_enabled_flag
Definition: hevc_ps.h:355
int bit_depth
Definition: hevc_ps.h:234
int beta_offset
beta_offset_div2 * 2
Definition: hevc_ps.h:357
SliceHeader sh
Definition: hevcdec.h:418
int pcm_enabled_flag
Definition: hevc_ps.h:240
for(j=16;j >0;--j)
uint8_t separate_colour_plane_flag
Definition: hevc_ps.h:228
GLuint buffer
Definition: opengl_enc.c:102
struct HEVCSPS::@93 pcm
uint8_t dependent_slice_segments_enabled_flag
Definition: hevc_ps.h:343
static uint8_t tmp[11]
Definition: aes_ctr.c:26