FFmpeg
hw_base_encode_h265.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include "hw_base_encode_h265.h"
20 
21 #include "h2645data.h"
22 #include "h265_profile_level.h"
23 
24 #include "libavutil/pixdesc.h"
25 
27  AVCodecContext *avctx,
28  FFHWBaseEncodeH265 *common,
30 {
31  H265RawVPS *vps = &common->raw_vps;
32  H265RawSPS *sps = &common->raw_sps;
33  H265RawPPS *pps = &common->raw_pps;
34  H265RawProfileTierLevel *ptl = &vps->profile_tier_level;
35  H265RawVUI *vui = &sps->vui;
36 
37  const AVPixFmtDescriptor *desc;
38  int chroma_format, bit_depth;
39  int i;
40 
41  memset(vps, 0, sizeof(*vps));
42  memset(sps, 0, sizeof(*sps));
43  memset(pps, 0, sizeof(*pps));
44 
47  if (desc->nb_components == 1) {
48  chroma_format = 0;
49  } else {
50  if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1) {
51  chroma_format = 1;
52  } else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0) {
53  chroma_format = 2;
54  } else if (desc->log2_chroma_w == 0 && desc->log2_chroma_h == 0) {
55  chroma_format = 3;
56  } else {
57  av_log(avctx, AV_LOG_ERROR, "Chroma format of input pixel format "
58  "%s is not supported.\n", desc->name);
59  return AVERROR(EINVAL);
60  }
61  }
62  bit_depth = desc->comp[0].depth;
63 
64 
65  // VPS
66 
67  vps->nal_unit_header = (H265RawNALUnitHeader) {
68  .nal_unit_type = HEVC_NAL_VPS,
69  .nuh_layer_id = 0,
70  .nuh_temporal_id_plus1 = 1,
71  };
72 
73  vps->vps_video_parameter_set_id = 0;
74 
75  vps->vps_base_layer_internal_flag = 1;
76  vps->vps_base_layer_available_flag = 1;
77  vps->vps_max_layers_minus1 = 0;
78  vps->vps_max_sub_layers_minus1 = 0;
79  vps->vps_temporal_id_nesting_flag = 1;
80 
83  ptl->general_tier_flag = opts->tier;
84 
86 
92  }
93 
98 
103 
104  ptl->general_max_422chroma_constraint_flag = chroma_format <= 2;
105  ptl->general_max_420chroma_constraint_flag = chroma_format <= 1;
106  ptl->general_max_monochrome_constraint_flag = chroma_format == 0;
107 
108  ptl->general_intra_constraint_flag = base_ctx->gop_size == 1;
110 
112 
113  if (avctx->level != AV_LEVEL_UNKNOWN) {
114  ptl->general_level_idc = avctx->level;
115  } else {
116  const H265LevelDescriptor *level;
117 
119  base_ctx->surface_width, base_ctx->surface_height,
120  opts->nb_slices, opts->tile_rows, opts->tile_cols,
121  (base_ctx->b_per_p > 0) + 1);
122  if (level) {
123  av_log(avctx, AV_LOG_VERBOSE, "Using level %s.\n", level->name);
124  ptl->general_level_idc = level->level_idc;
125  } else {
126  av_log(avctx, AV_LOG_VERBOSE, "Stream will not conform to "
127  "any normal level; using level 8.5.\n");
128  ptl->general_level_idc = 255;
129  // The tier flag must be set in level 8.5.
130  ptl->general_tier_flag = 1;
131  }
132  }
133 
134  vps->vps_sub_layer_ordering_info_present_flag = 0;
135  vps->vps_max_dec_pic_buffering_minus1[0] = base_ctx->max_b_depth + 1;
136  vps->vps_max_num_reorder_pics[0] = base_ctx->max_b_depth;
137  vps->vps_max_latency_increase_plus1[0] = 0;
138 
139  vps->vps_max_layer_id = 0;
140  vps->vps_num_layer_sets_minus1 = 0;
141  vps->layer_id_included_flag[0][0] = 1;
142 
143  vps->vps_timing_info_present_flag = 1;
144  if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
145  vps->vps_num_units_in_tick = avctx->framerate.den;
146  vps->vps_time_scale = avctx->framerate.num;
147  vps->vps_poc_proportional_to_timing_flag = 1;
148  vps->vps_num_ticks_poc_diff_one_minus1 = 0;
149  } else {
150  vps->vps_num_units_in_tick = avctx->time_base.num;
151  vps->vps_time_scale = avctx->time_base.den;
152  vps->vps_poc_proportional_to_timing_flag = 0;
153  }
154  vps->vps_num_hrd_parameters = 0;
155 
156 
157  // SPS
158 
159  sps->nal_unit_header = (H265RawNALUnitHeader) {
160  .nal_unit_type = HEVC_NAL_SPS,
161  .nuh_layer_id = 0,
162  .nuh_temporal_id_plus1 = 1,
163  };
164 
165  sps->sps_video_parameter_set_id = vps->vps_video_parameter_set_id;
166 
167  sps->sps_max_sub_layers_minus1 = vps->vps_max_sub_layers_minus1;
168  sps->sps_temporal_id_nesting_flag = vps->vps_temporal_id_nesting_flag;
169 
170  sps->profile_tier_level = vps->profile_tier_level;
171 
172  sps->sps_seq_parameter_set_id = 0;
173 
174  sps->chroma_format_idc = chroma_format;
175  sps->separate_colour_plane_flag = 0;
176 
177  sps->pic_width_in_luma_samples = base_ctx->surface_width;
178  sps->pic_height_in_luma_samples = base_ctx->surface_height;
179 
180  if (avctx->width != base_ctx->surface_width ||
181  avctx->height != base_ctx->surface_height) {
182  sps->conformance_window_flag = 1;
183  sps->conf_win_left_offset = 0;
184  sps->conf_win_right_offset =
185  (base_ctx->surface_width - avctx->width) >> desc->log2_chroma_w;
186  sps->conf_win_top_offset = 0;
187  sps->conf_win_bottom_offset =
188  (base_ctx->surface_height - avctx->height) >> desc->log2_chroma_h;
189  } else {
190  sps->conformance_window_flag = 0;
191  }
192 
193  sps->bit_depth_luma_minus8 = bit_depth - 8;
194  sps->bit_depth_chroma_minus8 = bit_depth - 8;
195 
196  sps->log2_max_pic_order_cnt_lsb_minus4 = 8;
197 
198  sps->sps_sub_layer_ordering_info_present_flag =
199  vps->vps_sub_layer_ordering_info_present_flag;
200  for (i = 0; i <= sps->sps_max_sub_layers_minus1; i++) {
201  sps->sps_max_dec_pic_buffering_minus1[i] =
202  vps->vps_max_dec_pic_buffering_minus1[i];
203  sps->sps_max_num_reorder_pics[i] =
204  vps->vps_max_num_reorder_pics[i];
205  sps->sps_max_latency_increase_plus1[i] =
206  vps->vps_max_latency_increase_plus1[i];
207  }
208 
209  // These values come from the capabilities of the first encoder
210  // implementation in the i965 driver on Intel Skylake. They may
211  // fail badly with other platforms or drivers.
212  // CTB size from 8x8 to 32x32.
213  sps->log2_min_luma_coding_block_size_minus3 = 0;
214  sps->log2_diff_max_min_luma_coding_block_size = 2;
215  // Transform size from 4x4 to 32x32.
216  sps->log2_min_luma_transform_block_size_minus2 = 0;
217  sps->log2_diff_max_min_luma_transform_block_size = 3;
218  // Full transform hierarchy allowed (2-5).
219  sps->max_transform_hierarchy_depth_inter = 3;
220  sps->max_transform_hierarchy_depth_intra = 3;
221  // AMP works.
222  sps->amp_enabled_flag = 1;
223  // SAO and temporal MVP do not work.
224  sps->sample_adaptive_offset_enabled_flag = 0;
225  sps->sps_temporal_mvp_enabled_flag = 0;
226 
227  sps->pcm_enabled_flag = 0;
228 
229  // STRPSs should ideally be here rather than defined individually in
230  // each slice, but the structure isn't completely fixed so for now
231  // don't bother.
232  sps->num_short_term_ref_pic_sets = 0;
233  sps->long_term_ref_pics_present_flag = 0;
234 
235  sps->vui_parameters_present_flag = 1;
236 
237  if (avctx->sample_aspect_ratio.num != 0 &&
238  avctx->sample_aspect_ratio.den != 0) {
239  int num, den, i;
240  av_reduce(&num, &den, avctx->sample_aspect_ratio.num,
241  avctx->sample_aspect_ratio.den, 65535);
242  for (i = 0; i < FF_ARRAY_ELEMS(ff_h2645_pixel_aspect); i++) {
243  if (num == ff_h2645_pixel_aspect[i].num &&
244  den == ff_h2645_pixel_aspect[i].den) {
245  vui->aspect_ratio_idc = i;
246  break;
247  }
248  }
250  vui->aspect_ratio_idc = 255;
251  vui->sar_width = num;
252  vui->sar_height = den;
253  }
255  }
256 
257  // Unspecified video format, from table E-2.
258  vui->video_format = 5;
259  vui->video_full_range_flag =
260  avctx->color_range == AVCOL_RANGE_JPEG;
261  vui->colour_primaries = avctx->color_primaries;
262  vui->transfer_characteristics = avctx->color_trc;
263  vui->matrix_coefficients = avctx->colorspace;
264  if (avctx->color_primaries != AVCOL_PRI_UNSPECIFIED ||
265  avctx->color_trc != AVCOL_TRC_UNSPECIFIED ||
268  if (avctx->color_range != AVCOL_RANGE_UNSPECIFIED ||
271 
276  avctx->chroma_sample_location - 1;
277  }
278 
280  vui->vui_num_units_in_tick = vps->vps_num_units_in_tick;
281  vui->vui_time_scale = vps->vps_time_scale;
282  vui->vui_poc_proportional_to_timing_flag = vps->vps_poc_proportional_to_timing_flag;
283  vui->vui_num_ticks_poc_diff_one_minus1 = vps->vps_num_ticks_poc_diff_one_minus1;
285 
289  vui->max_bytes_per_pic_denom = 0;
290  vui->max_bits_per_min_cu_denom = 0;
292  vui->log2_max_mv_length_vertical = 15;
293 
294 
295  // PPS
296 
297  pps->nal_unit_header = (H265RawNALUnitHeader) {
298  .nal_unit_type = HEVC_NAL_PPS,
299  .nuh_layer_id = 0,
300  .nuh_temporal_id_plus1 = 1,
301  };
302 
303  pps->pps_pic_parameter_set_id = 0;
304  pps->pps_seq_parameter_set_id = sps->sps_seq_parameter_set_id;
305 
306  pps->num_ref_idx_l0_default_active_minus1 = 0;
307  pps->num_ref_idx_l1_default_active_minus1 = 0;
308 
309  pps->init_qp_minus26 = opts->fixed_qp_idr - 26;
310 
311  pps->cu_qp_delta_enabled_flag = opts->cu_qp_delta_enabled_flag;
312  pps->diff_cu_qp_delta_depth = 0;
313 
314  if (opts->tile_rows && opts->tile_cols) {
315  int uniform_spacing;
316 
317  pps->tiles_enabled_flag = 1;
318  pps->num_tile_columns_minus1 = opts->tile_cols - 1;
319  pps->num_tile_rows_minus1 = opts->tile_rows - 1;
320 
321  // Test whether the spacing provided matches the H.265 uniform
322  // spacing, and set the flag if it does.
323  uniform_spacing = 1;
324  for (i = 0; i <= pps->num_tile_columns_minus1 &&
325  uniform_spacing; i++) {
326  if (opts->col_width[i] !=
327  (i + 1) * opts->slice_block_cols / opts->tile_cols -
328  i * opts->slice_block_cols / opts->tile_cols)
329  uniform_spacing = 0;
330  }
331  for (i = 0; i <= pps->num_tile_rows_minus1 &&
332  uniform_spacing; i++) {
333  if (opts->row_height[i] !=
334  (i + 1) * opts->slice_block_rows / opts->tile_rows -
335  i * opts->slice_block_rows / opts->tile_rows)
336  uniform_spacing = 0;
337  }
338  pps->uniform_spacing_flag = uniform_spacing;
339 
340  for (i = 0; i <= pps->num_tile_columns_minus1; i++)
341  pps->column_width_minus1[i] = opts->col_width[i] - 1;
342  for (i = 0; i <= pps->num_tile_rows_minus1; i++)
343  pps->row_height_minus1[i] = opts->row_height[i] - 1;
344 
345  pps->loop_filter_across_tiles_enabled_flag = 1;
346  }
347 
348  pps->pps_loop_filter_across_slices_enabled_flag = 1;
349 
350  return 0;
351 }
H265RawVUI::log2_max_mv_length_horizontal
uint8_t log2_max_mv_length_horizontal
Definition: cbs_h265.h:174
level
uint8_t level
Definition: svq3.c:205
H265RawVUI::bitstream_restriction_flag
uint8_t bitstream_restriction_flag
Definition: cbs_h265.h:167
AVERROR
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
H265RawProfileTierLevel::general_interlaced_source_flag
uint8_t general_interlaced_source_flag
Definition: cbs_h265.h:44
AVCodecContext::colorspace
enum AVColorSpace colorspace
YUV colorspace type.
Definition: avcodec.h:691
H265RawProfileTierLevel::general_level_idc
uint8_t general_level_idc
Definition: cbs_h265.h:61
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3170
H265RawVUI::colour_primaries
uint8_t colour_primaries
Definition: cbs_h265.h:141
FFHWBaseEncodeH265::raw_vps
H265RawVPS raw_vps
Definition: hw_base_encode_h265.h:26
H265RawVUI
Definition: cbs_h265.h:128
pixdesc.h
AVCodecContext::color_trc
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
Definition: avcodec.h:684
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
Full range content.
Definition: pixfmt.h:717
H265RawProfileTierLevel::general_max_8bit_constraint_flag
uint8_t general_max_8bit_constraint_flag
Definition: cbs_h265.h:50
H265RawVUI::aspect_ratio_info_present_flag
uint8_t aspect_ratio_info_present_flag
Definition: cbs_h265.h:129
AVCOL_TRC_UNSPECIFIED
@ AVCOL_TRC_UNSPECIFIED
Definition: pixfmt.h:614
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:225
H265RawVUI::vui_timing_info_present_flag
uint8_t vui_timing_info_present_flag
Definition: cbs_h265.h:159
H265RawProfileTierLevel::general_frame_only_constraint_flag
uint8_t general_frame_only_constraint_flag
Definition: cbs_h265.h:46
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:246
H265RawVUI::log2_max_mv_length_vertical
uint8_t log2_max_mv_length_vertical
Definition: cbs_h265.h:175
H265LevelDescriptor
Definition: h265_profile_level.h:27
H265RawProfileTierLevel::general_max_422chroma_constraint_flag
uint8_t general_max_422chroma_constraint_flag
Definition: cbs_h265.h:51
H265RawSPS
Definition: cbs_h265.h:245
H265RawVPS
Definition: cbs_h265.h:184
H265RawPPS
Definition: cbs_h265.h:356
FFHWBaseEncodeContext
Definition: hw_base_encode.h:122
AVCodecContext::framerate
AVRational framerate
Definition: avcodec.h:566
H265RawVUI::video_format
uint8_t video_format
Definition: cbs_h265.h:138
H265RawVUI::max_bits_per_min_cu_denom
uint8_t max_bits_per_min_cu_denom
Definition: cbs_h265.h:173
H265RawProfileTierLevel::general_progressive_source_flag
uint8_t general_progressive_source_flag
Definition: cbs_h265.h:43
FFHWBaseEncodeH265::raw_pps
H265RawPPS raw_pps
Definition: hw_base_encode_h265.h:28
H265RawProfileTierLevel::general_max_12bit_constraint_flag
uint8_t general_max_12bit_constraint_flag
Definition: cbs_h265.h:48
ff_hw_base_encode_init_params_h265
int ff_hw_base_encode_init_params_h265(FFHWBaseEncodeContext *base_ctx, AVCodecContext *avctx, FFHWBaseEncodeH265 *common, FFHWBaseEncodeH265Opts *opts)
Definition: hw_base_encode_h265.c:26
H265RawProfileTierLevel::general_intra_constraint_flag
uint8_t general_intra_constraint_flag
Definition: cbs_h265.h:54
av_reduce
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
Definition: rational.c:35
AVRational::num
int num
Numerator.
Definition: rational.h:59
H265RawVUI::sar_height
uint16_t sar_height
Definition: cbs_h265.h:132
AVCodecContext::color_primaries
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
Definition: avcodec.h:677
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:209
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
ptl
const H265RawProfileTierLevel * ptl
Definition: h265_levels.c:170
ff_h265_guess_level
const H265LevelDescriptor * ff_h265_guess_level(const H265RawProfileTierLevel *ptl, int64_t bitrate, int width, int height, int slice_segments, int tile_rows, int tile_cols, int max_dec_pic_buffering)
Guess the level of a stream from some parameters.
Definition: h265_profile_level.c:162
H265RawProfileTierLevel::general_profile_idc
uint8_t general_profile_idc
Definition: cbs_h265.h:39
H265RawProfileTierLevel::general_non_packed_constraint_flag
uint8_t general_non_packed_constraint_flag
Definition: cbs_h265.h:45
FFHWBaseEncodeContext::max_b_depth
int max_b_depth
Definition: hw_base_encode.h:188
HEVC_NAL_VPS
@ HEVC_NAL_VPS
Definition: hevc.h:61
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:40
H265RawProfileTierLevel::general_max_14bit_constraint_flag
uint8_t general_max_14bit_constraint_flag
Definition: cbs_h265.h:57
H265RawVUI::vui_time_scale
uint32_t vui_time_scale
Definition: cbs_h265.h:161
H265RawVUI::video_signal_type_present_flag
uint8_t video_signal_type_present_flag
Definition: cbs_h265.h:137
h2645data.h
AVCOL_PRI_UNSPECIFIED
@ AVCOL_PRI_UNSPECIFIED
Definition: pixfmt.h:589
FFHWBaseEncodeContext::b_per_p
int b_per_p
Definition: hw_base_encode.h:189
hw_base_encode_h265.h
opts
AVDictionary * opts
Definition: movenc.c:51
H265RawVUI::matrix_coefficients
uint8_t matrix_coefficients
Definition: cbs_h265.h:143
AVHWFramesContext::sw_format
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
Definition: hwcontext.h:210
FFHWBaseEncodeH265Opts
Definition: hw_base_encode_h265.h:33
AVCodecContext::color_range
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: avcodec.h:701
AV_LEVEL_UNKNOWN
#define AV_LEVEL_UNKNOWN
Definition: defs.h:198
AVCodecContext::bit_rate
int64_t bit_rate
the average bitrate
Definition: avcodec.h:501
H265RawVUI::chroma_sample_loc_type_bottom_field
uint8_t chroma_sample_loc_type_bottom_field
Definition: cbs_h265.h:147
vps
static int FUNC() vps(CodedBitstreamContext *ctx, RWContext *rw, H265RawVPS *current)
Definition: cbs_h265_syntax_template.c:423
H265RawProfileTierLevel::general_max_10bit_constraint_flag
uint8_t general_max_10bit_constraint_flag
Definition: cbs_h265.h:49
H265RawVUI::vui_num_ticks_poc_diff_one_minus1
uint32_t vui_num_ticks_poc_diff_one_minus1
Definition: cbs_h265.h:163
H265RawVUI::video_full_range_flag
uint8_t video_full_range_flag
Definition: cbs_h265.h:139
H265RawProfileTierLevel::general_tier_flag
uint8_t general_tier_flag
Definition: cbs_h265.h:38
AVCodecContext::level
int level
Encoding level descriptor.
Definition: avcodec.h:1794
AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
Definition: pixfmt.h:683
H265RawNALUnitHeader
Definition: cbs_h265.h:30
AVCodecContext::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
Definition: avcodec.h:550
H265RawVUI::chroma_loc_info_present_flag
uint8_t chroma_loc_info_present_flag
Definition: cbs_h265.h:145
H265RawVUI::sar_width
uint16_t sar_width
Definition: cbs_h265.h:131
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
H265RawProfileTierLevel::general_lower_bit_rate_constraint_flag
uint8_t general_lower_bit_rate_constraint_flag
Definition: cbs_h265.h:56
HEVC_NAL_SPS
@ HEVC_NAL_SPS
Definition: hevc.h:62
H265RawProfileTierLevel::general_max_monochrome_constraint_flag
uint8_t general_max_monochrome_constraint_flag
Definition: cbs_h265.h:53
FFHWBaseEncodeH265
Definition: hw_base_encode_h265.h:25
h265_profile_level.h
AVCHROMA_LOC_UNSPECIFIED
@ AVCHROMA_LOC_UNSPECIFIED
Definition: pixfmt.h:737
HEVC_NAL_PPS
@ HEVC_NAL_PPS
Definition: hevc.h:63
H265RawProfileTierLevel::general_one_picture_only_constraint_flag
uint8_t general_one_picture_only_constraint_flag
Definition: cbs_h265.h:55
H265RawVUI::chroma_sample_loc_type_top_field
uint8_t chroma_sample_loc_type_top_field
Definition: cbs_h265.h:146
H265RawVUI::max_bytes_per_pic_denom
uint8_t max_bytes_per_pic_denom
Definition: cbs_h265.h:172
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
H265RawVUI::vui_hrd_parameters_present_flag
uint8_t vui_hrd_parameters_present_flag
Definition: cbs_h265.h:164
H265RawVUI::vui_num_units_in_tick
uint32_t vui_num_units_in_tick
Definition: cbs_h265.h:160
ff_h2645_pixel_aspect
const AVRational ff_h2645_pixel_aspect[]
Definition: h2645data.c:21
AVCodecContext::chroma_sample_location
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
Definition: avcodec.h:708
AVCOL_SPC_UNSPECIFIED
@ AVCOL_SPC_UNSPECIFIED
Definition: pixfmt.h:643
AVCodecContext::height
int height
Definition: avcodec.h:624
H265RawProfileTierLevel
Definition: cbs_h265.h:36
H265RawProfileTierLevel::general_max_420chroma_constraint_flag
uint8_t general_max_420chroma_constraint_flag
Definition: cbs_h265.h:52
H265RawProfileTierLevel::general_profile_space
uint8_t general_profile_space
Definition: cbs_h265.h:37
H265RawProfileTierLevel::general_profile_compatibility_flag
uint8_t general_profile_compatibility_flag[32]
Definition: cbs_h265.h:41
FFHWBaseEncodeContext::gop_size
int gop_size
Definition: hw_base_encode.h:184
sps
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
Definition: cbs_h264_syntax_template.c:260
FFHWBaseEncodeContext::surface_height
int surface_height
Definition: hw_base_encode.h:141
AVCodecContext
main external API structure.
Definition: avcodec.h:451
AVRational::den
int den
Denominator.
Definition: rational.h:60
FFHWBaseEncodeH265::raw_sps
H265RawSPS raw_sps
Definition: hw_base_encode_h265.h:27
H265RawVUI::colour_description_present_flag
uint8_t colour_description_present_flag
Definition: cbs_h265.h:140
AVCodecContext::profile
int profile
profile
Definition: avcodec.h:1650
pps
uint64_t pps
Definition: dovi_rpuenc.c:35
FFHWBaseEncodeContext::input_frames
AVHWFramesContext * input_frames
Definition: hw_base_encode.h:153
FFHWBaseEncodeContext::surface_width
int surface_width
Definition: hw_base_encode.h:140
H265RawVUI::transfer_characteristics
uint8_t transfer_characteristics
Definition: cbs_h265.h:142
desc
const char * desc
Definition: libsvtav1.c:79
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
AVCodecContext::width
int width
picture width / height.
Definition: avcodec.h:624
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
H265RawVUI::vui_poc_proportional_to_timing_flag
uint8_t vui_poc_proportional_to_timing_flag
Definition: cbs_h265.h:162
H265RawVUI::aspect_ratio_idc
uint8_t aspect_ratio_idc
Definition: cbs_h265.h:130
H265RawVUI::restricted_ref_pic_lists_flag
uint8_t restricted_ref_pic_lists_flag
Definition: cbs_h265.h:170
AVCodecContext::sample_aspect_ratio
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
Definition: avcodec.h:648
H265RawVUI::motion_vectors_over_pic_boundaries_flag
uint8_t motion_vectors_over_pic_boundaries_flag
Definition: cbs_h265.h:169