diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-04-10 12:28:09 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-05-31 19:26:06 +0200 |
commit | 6fed1841a1f5dd3cdcf343f77925af0781ebe83a (patch) | |
tree | c1b9ad2d4c2cbe6a15763e94450285ff6870aabd /libavcodec/dxva2_hevc.c | |
parent | bd1a06dc439403d7e16a220629165e34791016d7 (diff) | |
download | ffmpeg-6fed1841a1f5dd3cdcf343f77925af0781ebe83a.tar.gz |
lavc/hevc_ps/HEVCSPS: change flags into uint8_t
Reduces sizeof(HEVCSPS) by 64 bytes.
Also improve flag names: drop redundant suffixes and prefixes, and
consistently use disabled/enabled.
Diffstat (limited to 'libavcodec/dxva2_hevc.c')
-rw-r--r-- | libavcodec/dxva2_hevc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c index 31d74a7164..b500d7917a 100644 --- a/libavcodec/dxva2_hevc.c +++ b/libavcodec/dxva2_hevc.c @@ -72,7 +72,7 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo pp->PicHeightInMinCbsY = sps->min_cb_height; pp->wFormatAndSequenceInfoFlags = (sps->chroma_format_idc << 0) | - (sps->separate_colour_plane_flag << 2) | + (sps->separate_colour_plane << 2) | ((sps->bit_depth - 8) << 3) | ((sps->bit_depth - 8) << 6) | ((sps->log2_max_poc_lsb - 4) << 9) | @@ -99,18 +99,18 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo pp->wNumBitsForShortTermRPSInSlice = h->sh.short_term_ref_pic_set_size; } - pp->dwCodingParamToolFlags = (sps->scaling_list_enable_flag << 0) | - (sps->amp_enabled_flag << 1) | + pp->dwCodingParamToolFlags = (sps->scaling_list_enabled << 0) | + (sps->amp_enabled << 1) | (sps->sao_enabled << 2) | - (sps->pcm_enabled_flag << 3) | - ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth - 1) : 0) << 4) | - ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth_chroma - 1) : 0) << 8) | - ((sps->pcm_enabled_flag ? (sps->pcm.log2_min_pcm_cb_size - 3) : 0) << 12) | - ((sps->pcm_enabled_flag ? (sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size) : 0) << 14) | - (sps->pcm.loop_filter_disable_flag << 16) | - (sps->long_term_ref_pics_present_flag << 17) | - (sps->sps_temporal_mvp_enabled_flag << 18) | - (sps->sps_strong_intra_smoothing_enable_flag << 19) | + (sps->pcm_enabled << 3) | + ((sps->pcm_enabled ? (sps->pcm.bit_depth - 1) : 0) << 4) | + ((sps->pcm_enabled ? (sps->pcm.bit_depth_chroma - 1) : 0) << 8) | + ((sps->pcm_enabled ? (sps->pcm.log2_min_pcm_cb_size - 3) : 0) << 12) | + ((sps->pcm_enabled ? (sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size) : 0) << 14) | + (sps->pcm_loop_filter_disabled << 16) | + (sps->long_term_ref_pics_present << 17) | + (sps->temporal_mvp_enabled << 18) | + (sps->strong_intra_smoothing_enabled << 19) | (pps->dependent_slice_segments_enabled_flag << 20) | (pps->output_flag_present_flag << 21) | (pps->num_extra_slice_header_bits << 22) | |