32 16, 16, 16, 16, 17, 18, 21, 24,
33 16, 16, 16, 16, 17, 19, 22, 25,
34 16, 16, 17, 18, 20, 22, 25, 29,
35 16, 16, 18, 21, 24, 27, 31, 36,
36 17, 17, 20, 24, 30, 35, 41, 47,
37 18, 19, 22, 27, 35, 44, 54, 65,
38 21, 22, 25, 31, 41, 54, 70, 88,
39 24, 25, 29, 36, 47, 65, 88, 115
43 16, 16, 16, 16, 17, 18, 20, 24,
44 16, 16, 16, 17, 18, 20, 24, 25,
45 16, 16, 17, 18, 20, 24, 25, 28,
46 16, 17, 18, 20, 24, 25, 28, 33,
47 17, 18, 20, 24, 25, 28, 33, 41,
48 18, 20, 24, 25, 28, 33, 41, 54,
49 20, 24, 25, 28, 33, 41, 54, 71,
50 24, 25, 28, 33, 41, 54, 71, 91
135 unsigned abs_delta_rps;
139 if (is_slice_header) {
143 "Invalid value of delta_idx in slice header RPS: %d > %d.\n",
154 if (abs_delta_rps < 1 || abs_delta_rps > 32768) {
156 "Invalid value of abs_delta_rps: %d\n",
160 delta_rps = (1 - (delta_rps_sign << 1)) * abs_delta_rps;
167 if (used || use_delta_flag) {
168 if (i < rps_ridx->num_delta_pocs)
169 delta_poc = delta_rps + rps_ridx->
delta_poc[
i];
171 delta_poc = delta_rps;
183 "Invalid num_delta_pocs: %d\n", k);
195 for (k = i - 1; k >= 0; k--) {
197 if (delta_poc < tmp) {
221 unsigned int prev, nb_positive_pics;
236 if (delta_poc < 1 || delta_poc > 32768) {
238 "Invalid value of delta_poc: %d\n",
247 for (i = 0; i < nb_positive_pics; i++) {
249 if (delta_poc < 1 || delta_poc > 32768) {
251 "Invalid value of delta_poc: %d\n",
287 for (i = 0; i < 32; i++) {
298 #define check_profile_idc(idc) \ 299 ptl->profile_idc == idc || ptl->profile_compatibility_flag[idc] 334 #undef check_profile_idc 340 PTL *
ptl,
int max_num_sub_layers)
344 get_bits_left(gb) < 8 + (8*2 * (max_num_sub_layers - 1 > 0))) {
351 for (i = 0; i < max_num_sub_layers - 1; i++) {
356 if (max_num_sub_layers - 1> 0)
357 for (i = max_num_sub_layers - 1; i < 8; i++)
359 for (i = 0; i < max_num_sub_layers - 1; i++) {
363 "PTL information for sublayer %i too short\n", i);
369 "Not enough data for sublayer %i level_idc\n", i);
380 int subpic_params_present)
384 for (i = 0; i < nb_cpb; i++) {
388 if (subpic_params_present) {
399 int nal_params_present = 0, vcl_params_present = 0;
400 int subpic_params_present = 0;
403 if (common_inf_present) {
407 if (nal_params_present || vcl_params_present) {
410 if (subpic_params_present) {
420 if (subpic_params_present)
429 for (i = 0; i < max_sublayers; i++) {
431 unsigned int nb_cpb = 1;
444 if (nb_cpb < 1 || nb_cpb > 32) {
450 if (nal_params_present)
452 if (vcl_params_present)
474 if (nal_size >
sizeof(vps->
data)) {
477 nal_size,
sizeof(vps->
data));
556 int common_inf_present = 1;
591 VUI backup_vui, *vui = &sps->
vui;
593 int sar_present, alt = 0;
601 vui->
sar = vui_sar[sar_idx];
602 else if (sar_idx == 255) {
607 "Unknown SAR index: %u.\n", sar_idx);
660 memcpy(&backup, gb,
sizeof(backup));
661 memcpy(&backup_vui, vui,
sizeof(backup_vui));
676 if (apply_defdispwin &&
679 "discarding vui default display window, " 680 "original values are l:%u r:%u t:%u b:%u\n",
701 "Strange VUI timing information, retrying...\n");
702 memcpy(vui, &backup_vui,
sizeof(backup_vui));
703 memcpy(gb, &backup,
sizeof(backup));
725 "Strange VUI bitstream restriction information, retrying" 726 " from timing information...\n");
727 memcpy(vui, &backup_vui,
sizeof(backup_vui));
728 memcpy(gb, &backup,
sizeof(backup));
745 "Overread in VUI, retrying from timing information...\n");
746 memcpy(vui, &backup_vui,
sizeof(backup_vui));
747 memcpy(gb, &backup,
sizeof(backup));
757 for (matrixId = 0; matrixId < 6; matrixId++) {
759 memset(sl->
sl[0][matrixId], 16, 16);
760 sl->
sl_dc[0][matrixId] = 16;
761 sl->
sl_dc[1][matrixId] = 16;
785 uint8_t scaling_list_pred_mode_flag;
786 int32_t scaling_list_dc_coef[2][6];
787 int size_id, matrix_id,
pos;
790 for (size_id = 0; size_id < 4; size_id++)
791 for (matrix_id = 0; matrix_id < 6; matrix_id += ((size_id == 3) ? 3 : 1)) {
792 scaling_list_pred_mode_flag =
get_bits1(gb);
793 if (!scaling_list_pred_mode_flag) {
799 delta *= (size_id == 3) ? 3 : 1;
800 if (matrix_id < delta) {
802 "Invalid delta in scaling list data: %d.\n", delta);
806 memcpy(sl->
sl[size_id][matrix_id],
807 sl->
sl[size_id][matrix_id - delta],
808 size_id > 0 ? 64 : 16);
810 sl->
sl_dc[size_id - 2][matrix_id] = sl->
sl_dc[size_id - 2][matrix_id -
delta];
813 int next_coef, coef_num;
814 int32_t scaling_list_delta_coef;
817 coef_num =
FFMIN(64, 1 << (4 + (size_id << 1)));
819 scaling_list_dc_coef[size_id - 2][matrix_id] =
get_se_golomb(gb) + 8;
820 next_coef = scaling_list_dc_coef[size_id - 2][matrix_id];
821 sl->
sl_dc[size_id - 2][matrix_id] = next_coef;
823 for (i = 0; i < coef_num; i++) {
832 next_coef = (next_coef + 256
U + scaling_list_delta_coef) % 256;
833 sl->
sl[size_id][matrix_id][
pos] = next_coef;
839 for (i = 0; i < 64; i++) {
840 sl->
sl[3][1][
i] = sl->
sl[2][1][
i];
841 sl->
sl[3][2][
i] = sl->
sl[2][2][
i];
842 sl->
sl[3][4][
i] = sl->
sl[2][4][
i];
843 sl->
sl[3][5][
i] = sl->
sl[2][5][
i];
885 "The following bit-depths are currently specified: 8, 9, 10 and 12 bits, " 886 "chroma_format_idc is %d, depth is %d\n",
909 int log2_diff_max_min_transform_block_size;
910 int bit_depth_chroma, start, vui_present, sublayer_ordering_info;
917 if (vps_list && !vps_list[sps->
vps_id]) {
956 sps->
height, 0, avctx)) < 0)
969 "discarding sps conformance window, " 970 "original values are l:%u r:%u t:%u b:%u\n",
988 "Luma bit depth (%d) is different from chroma bit depth (%d), " 989 "this is unsupported.\n",
1028 if (!sublayer_ordering_info) {
1029 for (i = 0; i < start; i++) {
1058 if (log2_diff_max_min_transform_block_size < 0 || log2_diff_max_min_transform_block_size > 30) {
1059 av_log(avctx,
AV_LOG_ERROR,
"Invalid value %d for log2_diff_max_min_transform_block_size", log2_diff_max_min_transform_block_size);
1089 "PCM bit depth (%d, %d) is greater than normal bit depth (%d)\n",
1128 decode_vui(gb, avctx, apply_defdispwin, sps);
1143 "extended_precision_processing_flag not yet implemented\n");
1149 "high_precision_offsets_enabled_flag not yet implemented\n");
1156 "cabac_bypass_alignment_enabled_flag not yet implemented\n");
1159 if (apply_defdispwin) {
1177 "Displaying the whole video surface.\n");
1178 memset(ow, 0,
sizeof(*ow));
1194 "log2_ctb_size %d differs from the bounds of any known profile\n",
1221 av_log(avctx,
AV_LOG_ERROR,
"max_transform_hierarchy_depth_inter out of range: %d\n",
1226 av_log(avctx,
AV_LOG_ERROR,
"max_transform_hierarchy_depth_intra out of range: %d\n",
1232 "max transform block size out of range: %d\n",
1251 unsigned int sps_id;
1262 if (nal_size >
sizeof(sps->
data)) {
1265 nal_size,
sizeof(sps->
data));
1282 "Parsed SPS: id %d; coded wxh: %dx%d; " 1283 "cropped wxh: %dx%d; pix_fmt: %s.\n",
1336 "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n");
1343 "cb_qp_offset_list not tested yet.\n");
1348 "cb_qp_offset_list not tested yet.\n");
1367 int pic_area_in_ctbs;
1368 int i, j, x, y, ctb_addr_rs, tile_id;
1424 for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) {
1425 int tb_x = ctb_addr_rs % sps->
ctb_width;
1426 int tb_y = ctb_addr_rs / sps->
ctb_width;
1432 if (tb_x < pps->col_bd[i + 1]) {
1439 if (tb_y < pps->row_bd[i + 1]) {
1445 for (i = 0; i < tile_x; i++)
1447 for (i = 0; i < tile_y; i++)
1451 tb_x - pps->
col_bd[tile_x];
1459 for (y = pps->
row_bd[j]; y < pps->row_bd[j + 1]; y++)
1460 for (x = pps->
col_bd[i]; x < pps->col_bd[i + 1]; x++)
1474 for (y = 0; y < sps->
tb_mask+2; y++) {
1478 for (y = 0; y < sps->
tb_mask+1; y++) {
1479 for (x = 0; x < sps->
tb_mask+1; x++) {
1480 int tb_x = x >> log2_diff;
1481 int tb_y = y >> log2_diff;
1484 for (i = 0; i < log2_diff; i++) {
1486 val += (m & x ? m * m : 0) + (m & y ? 2 * m * m : 0);
1500 unsigned int pps_id = 0;
1502 unsigned log2_parallel_merge_level_minus2;
1520 if (nal_size >
sizeof(pps->data)) {
1523 nal_size,
sizeof(pps->data));
1524 pps->data_size =
sizeof(pps->data);
1526 pps->data_size = nal_size;
1528 memcpy(pps->data, gb->
buffer, pps->data_size);
1531 pps->loop_filter_across_tiles_enabled_flag = 1;
1532 pps->num_tile_columns = 1;
1533 pps->num_tile_rows = 1;
1534 pps->uniform_spacing_flag = 1;
1535 pps->disable_dbf = 0;
1536 pps->beta_offset = 0;
1538 pps->log2_max_transform_skip_block_size = 2;
1560 pps->dependent_slice_segments_enabled_flag =
get_bits1(gb);
1561 pps->output_flag_present_flag =
get_bits1(gb);
1562 pps->num_extra_slice_header_bits =
get_bits(gb, 3);
1564 pps->sign_data_hiding_flag =
get_bits1(gb);
1566 pps->cabac_init_present_flag =
get_bits1(gb);
1573 pps->constrained_intra_pred_flag =
get_bits1(gb);
1574 pps->transform_skip_enabled_flag =
get_bits1(gb);
1576 pps->cu_qp_delta_enabled_flag =
get_bits1(gb);
1577 pps->diff_cu_qp_delta_depth = 0;
1578 if (pps->cu_qp_delta_enabled_flag)
1581 if (pps->diff_cu_qp_delta_depth < 0 ||
1584 pps->diff_cu_qp_delta_depth);
1590 if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) {
1597 if (pps->cr_qp_offset < -12 || pps->cr_qp_offset > 12) {
1603 pps->pic_slice_level_chroma_qp_offsets_present_flag =
get_bits1(gb);
1605 pps->weighted_pred_flag =
get_bits1(gb);
1606 pps->weighted_bipred_flag =
get_bits1(gb);
1608 pps->transquant_bypass_enable_flag =
get_bits1(gb);
1609 pps->tiles_enabled_flag =
get_bits1(gb);
1610 pps->entropy_coding_sync_enabled_flag =
get_bits1(gb);
1612 if (pps->tiles_enabled_flag) {
1616 if (num_tile_columns_minus1 < 0 ||
1617 num_tile_columns_minus1 >= sps->
ctb_width) {
1619 num_tile_columns_minus1);
1623 if (num_tile_rows_minus1 < 0 ||
1626 num_tile_rows_minus1);
1630 pps->num_tile_columns = num_tile_columns_minus1 + 1;
1631 pps->num_tile_rows = num_tile_rows_minus1 + 1;
1633 pps->column_width =
av_malloc_array(pps->num_tile_columns,
sizeof(*pps->column_width));
1634 pps->row_height =
av_malloc_array(pps->num_tile_rows,
sizeof(*pps->row_height));
1635 if (!pps->column_width || !pps->row_height) {
1640 pps->uniform_spacing_flag =
get_bits1(gb);
1641 if (!pps->uniform_spacing_flag) {
1643 for (i = 0; i < pps->num_tile_columns - 1; i++) {
1645 sum += pps->column_width[
i];
1652 pps->column_width[pps->num_tile_columns - 1] = sps->
ctb_width - sum;
1655 for (i = 0; i < pps->num_tile_rows - 1; i++) {
1657 sum += pps->row_height[
i];
1664 pps->row_height[pps->num_tile_rows - 1] = sps->
ctb_height - sum;
1666 pps->loop_filter_across_tiles_enabled_flag =
get_bits1(gb);
1669 pps->seq_loop_filter_across_slices_enabled_flag =
get_bits1(gb);
1671 pps->deblocking_filter_control_present_flag =
get_bits1(gb);
1672 if (pps->deblocking_filter_control_present_flag) {
1673 pps->deblocking_filter_override_enabled_flag =
get_bits1(gb);
1675 if (!pps->disable_dbf) {
1678 if (beta_offset_div2 < -6 || beta_offset_div2 > 6) {
1684 if (tc_offset_div2 < -6 || tc_offset_div2 > 6) {
1690 pps->beta_offset = 2 * beta_offset_div2;
1691 pps->tc_offset = 2 * tc_offset_div2;
1695 pps->scaling_list_data_present_flag =
get_bits1(gb);
1696 if (pps->scaling_list_data_present_flag) {
1702 pps->lists_modification_present_flag =
get_bits1(gb);
1704 if (log2_parallel_merge_level_minus2 > sps->
log2_ctb_size) {
1706 log2_parallel_merge_level_minus2);
1710 pps->log2_parallel_merge_level = log2_parallel_merge_level_minus2 + 2;
1712 pps->slice_header_extension_present_flag =
get_bits1(gb);
1715 pps->pps_range_extensions_flag =
get_bits1(gb);
1762 int prev_poc_lsb = pocTid0 % max_poc_lsb;
1763 int prev_poc_msb = pocTid0 - prev_poc_lsb;
1766 if (poc_lsb < prev_poc_lsb && prev_poc_lsb - poc_lsb >= max_poc_lsb / 2)
1767 poc_msb = prev_poc_msb + max_poc_lsb;
1768 else if (poc_lsb > prev_poc_lsb && poc_lsb - prev_poc_lsb > max_poc_lsb / 2)
1769 poc_msb = prev_poc_msb - max_poc_lsb;
1771 poc_msb = prev_poc_msb;
1779 return poc_msb + poc_lsb;
static unsigned int show_bits_long(GetBitContext *s, int n)
Show 0-32 bits.
PTLCommon sub_layer_ptl[HEVC_MAX_SUB_LAYERS]
unsigned int log2_min_cb_size
int extended_precision_processing_flag
uint8_t log2_sao_offset_scale_luma
int min_spatial_segmentation_idc
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
uint8_t max_12bit_constraint_flag
AVBufferRef * vps_list[HEVC_MAX_VPS_COUNT]
uint8_t diff_cu_chroma_qp_offset_depth
static int get_se_golomb(GetBitContext *gb)
read signed exp golomb code.
int vui_num_ticks_poc_diff_one_minus1
int max_dec_pic_buffering
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
int transform_skip_rotation_enabled_flag
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
unsigned int * row_height
RowHeight.
int vps_num_ticks_poc_diff_one
vps_num_ticks_poc_diff_one_minus1 + 1
uint8_t max_monochrome_constraint_flag
#define avpriv_request_sample(...)
unsigned int vps_max_latency_increase[HEVC_MAX_SUB_LAYERS]
static const uint8_t hevc_sub_width_c[]
#define FF_DEBUG_BITSTREAM
#define AV_PIX_FMT_GBRP10
int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header)
unsigned int vps_max_dec_pic_buffering[HEVC_MAX_SUB_LAYERS]
int chroma_loc_info_present_flag
static void decode_sublayer_hrd(GetBitContext *gb, unsigned int nb_cpb, int subpic_params_present)
#define AV_PIX_FMT_YUV420P12
uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS]
ShortTermRPS st_rps[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]
int * ctb_addr_ts_to_rs
CtbAddrTSToRS.
int explicit_rdpcm_enabled_flag
static const AVRational vui_sar[]
uint8_t max_420chroma_constraint_flag
int8_t cr_qp_offset_list[6]
uint8_t one_picture_only_constraint_flag
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
int chroma_sample_loc_type_top_field
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
const char * av_color_space_name(enum AVColorSpace space)
#define AV_PIX_FMT_GRAY10
uint8_t log2_sao_offset_scale_chroma
#define AV_PIX_FMT_GRAY12
int restricted_ref_pic_lists_flag
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static void remove_vps(HEVCParamSets *s, int id)
unsigned int log2_max_trafo_size
AVBufferRef * sps_list[HEVC_MAX_SPS_COUNT]
uint8_t profile_compatibility_flag[32]
static int decode_hrd(GetBitContext *gb, int common_inf_present, int max_sublayers)
unsigned int num_negative_pics
static void remove_pps(HEVCParamSets *s, int id)
static const uint8_t default_scaling_list_inter[]
uint8_t log2_max_transform_skip_block_size
int overscan_info_present_flag
uint8_t vps_timing_info_present_flag
#define FF_PROFILE_HEVC_MAIN
const uint8_t ff_hevc_diag_scan8x8_x[64]
int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx)
Parse the SPS from the bitstream into the provided HEVCSPS struct.
unsigned int log2_min_pcm_cb_size
int vps_max_sub_layers
vps_max_temporal_layers_minus1 + 1
int frame_field_info_present_flag
const H265RawProfileTierLevel * ptl
int high_precision_offsets_enabled_flag
AVBufferRef * pps_list[HEVC_MAX_PPS_COUNT]
uint8_t loop_filter_disable_flag
static int map_pixel_format(AVCodecContext *avctx, HEVCSPS *sps)
#define AV_PIX_FMT_YUV422P12
#define FF_PROFILE_HEVC_MAIN_10
int8_t cb_qp_offset_list[6]
int bitstream_restriction_flag
uint8_t intra_constraint_flag
static int get_bits_left(GetBitContext *gb)
#define i(width, name, range_min, range_max)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t frame_only_constraint_flag
#define AV_CODEC_FLAG2_IGNORE_CROP
Discard cropping information from SPS.
static int get_ue_golomb(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to 8190.
unsigned int log2_max_poc_lsb
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)
Compute POC of the current frame and return it.
#define PTRDIFF_SPECIFIER
int persistent_rice_adaptation_enabled_flag
uint8_t temporal_id_nesting_flag
int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
int vui_timing_info_present_flag
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
unsigned int log2_ctb_size
#define check_profile_idc(idc)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int vui_poc_proportional_to_timing_flag
#define AV_PIX_FMT_YUV444P10
AVBufferRef * av_buffer_create(uint8_t *data, int size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
uint8_t lower_bit_rate_constraint_flag
uint8_t vps_temporal_id_nesting_flag
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
int motion_vectors_over_pic_boundaries_flag
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
uint32_t vps_num_units_in_tick
uint8_t sub_layer_level_present_flag[HEVC_MAX_SUB_LAYERS]
int vps_num_layer_sets
vps_num_layer_sets_minus1 + 1
#define AV_PIX_FMT_YUV422P9
int * min_tb_addr_zs_tab
MinTbAddrZS.
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps)
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
int max_transform_hierarchy_depth_inter
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
uint8_t vps_poc_proportional_to_timing_flag
unsigned int vps_num_reorder_pics[HEVC_MAX_SUB_LAYERS]
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE
int max_bits_per_min_cu_denom
#define AV_EF_EXPLODE
abort decoding on minor error detection
int log2_max_mv_length_vertical
const uint8_t ff_hevc_diag_scan4x4_y[16]
uint8_t sub_layer_profile_present_flag[HEVC_MAX_SUB_LAYERS]
#define AV_PIX_FMT_YUV444P9
int max_bytes_per_pic_denom
int overscan_appropriate_flag
static void set_default_scaling_list_data(ScalingList *sl)
int implicit_rdpcm_enabled_flag
#define FF_ARRAY_ELEMS(a)
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
int colour_description_present_flag
void ff_hevc_ps_uninit(HEVCParamSets *ps)
enum AVPixelFormat pix_fmt
static int get_se_golomb_long(GetBitContext *gb)
#define AV_LOG_INFO
Standard information.
uint8_t transform_skip_enabled_flag
uint16_t num_tile_columns
num_tile_columns_minus1 + 1
uint8_t uniform_spacing_flag
static void decode_vui(GetBitContext *gb, AVCodecContext *avctx, int apply_defdispwin, HEVCSPS *sps)
int * ctb_addr_rs_to_ts
CtbAddrRSToTS.
unsigned int log2_min_pu_size
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
main external API structure.
static int parse_ptl(GetBitContext *gb, AVCodecContext *avctx, PTL *ptl, int max_num_sub_layers)
int log2_max_mv_length_horizontal
uint8_t * data
The data buffer.
uint8_t max_10bit_constraint_flag
uint8_t num_long_term_ref_pics_sps
uint8_t cross_component_prediction_enabled_flag
uint32_t vui_num_units_in_tick
AVBufferRef * av_buffer_allocz(int size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
static unsigned int get_bits1(GetBitContext *s)
int transform_skip_context_enabled_flag
static void skip_bits1(GetBitContext *s)
#define AV_PIX_FMT_YUV420P10
uint8_t sps_temporal_mvp_enabled_flag
int chroma_sample_loc_type_bottom_field
static void skip_bits(GetBitContext *s, int n)
static int FUNC() pps(CodedBitstreamContext *ctx, RWContext *rw, H264RawPPS *current)
uint8_t chroma_qp_offset_list_enabled_flag
Rational number (pair of numerator and denominator).
int vps_num_hrd_parameters
static void hevc_pps_free(void *opaque, uint8_t *data)
unsigned int log2_min_tb_size
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
#define AV_PIX_FMT_YUV420P9
static const uint8_t hevc_sub_height_c[]
int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps, int apply_defdispwin)
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
uint8_t scaling_list_enable_flag
static const uint8_t default_scaling_list_intra[]
uint8_t transfer_characteristic
int default_display_window_flag
static int FUNC() vps(CodedBitstreamContext *ctx, RWContext *rw, H265RawVPS *current)
int size
Size of data in bytes.
#define AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_YUV422P10
unsigned int log2_diff_max_min_coding_block_size
#define AV_PIX_FMT_YUV444P12
static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingList *sl, HEVCSPS *sps)
unsigned int log2_max_pcm_cb_size
static int setup_pps(AVCodecContext *avctx, GetBitContext *gb, HEVCPPS *pps, HEVCSPS *sps)
int neutra_chroma_indication_flag
int * tile_pos_rs
TilePosRS.
static int FUNC() timing_info(CodedBitstreamContext *ctx, RWContext *rw, AV1RawTimingInfo *current)
const uint8_t ff_hevc_diag_scan4x4_x[16]
A reference to a data buffer.
int max_transform_hierarchy_depth_intra
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
unsigned int * row_bd
RowBd.
uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS]
uint16_t num_tile_rows
num_tile_rows_minus1 + 1
unsigned int * col_bd
ColBd.
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
const uint8_t * buffer_end
unsigned int * column_width
ColumnWidth.
static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, PTLCommon *ptl)
int video_full_range_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]
#define FF_PROFILE_HEVC_REXT
uint8_t sps_strong_intra_smoothing_enable_flag
int rps_idx_num_delta_pocs
uint8_t max_422chroma_constraint_flag
int sps_range_extension_flag
uint8_t max_8bit_constraint_flag
uint8_t long_term_ref_pics_present_flag
int flags2
AV_CODEC_FLAG2_*.
uint8_t max_14bit_constraint_flag
int vui_hrd_parameters_present_flag
unsigned int right_offset
static void remove_sps(HEVCParamSets *s, int id)
uint8_t progressive_source_flag
#define av_malloc_array(a, b)
int video_signal_type_present_flag
struct HEVCSPS::@73 temporal_layer[HEVC_MAX_SUB_LAYERS]
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
int * min_tb_addr_zs
MinTbAddrZS.
uint8_t non_packed_constraint_flag
int intra_smoothing_disabled_flag
int tiles_fixed_structure_flag
static double val(void *priv, double ch)
uint8_t interlaced_source_flag
uint8_t separate_colour_plane_flag
unsigned int bottom_offset
int vps_sub_layer_ordering_info_present_flag