diff options
author | Philip Langdale <philipl@overt.org> | 2019-02-13 12:40:52 -0800 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2019-02-16 08:47:36 -0800 |
commit | f4ea930a119298c6110ee4e3d24219a66e27e230 (patch) | |
tree | 24f323112da6bfb6e10338f3242174a3ea1b5ef4 /libavcodec/hevc_ps.c | |
parent | 9e1e5213933dfed529f0cecac7304236a786177e (diff) | |
download | ffmpeg-f4ea930a119298c6110ee4e3d24219a66e27e230.tar.gz |
avcodec/hevc_ps: Expose all SPS and PPS range extension flags
We need all the flags to be exposed to be able to pass them on to
HW decoders. I did not attempt to nuance any of the warnings about
flags being unsupported as there's no way, at the point we extract
flags, to say whether an HW decoder is being used.
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r-- | libavcodec/hevc_ps.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index ea984af0a1..80df417e4f 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1102,20 +1102,17 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, decode_vui(gb, avctx, apply_defdispwin, sps); if (get_bits1(gb)) { // sps_extension_flag - int sps_range_extension_flag = get_bits1(gb); + sps->sps_range_extension_flag = get_bits1(gb); skip_bits(gb, 7); //sps_extension_7bits = get_bits(gb, 7); - if (sps_range_extension_flag) { - int extended_precision_processing_flag; - int cabac_bypass_alignment_enabled_flag; - + if (sps->sps_range_extension_flag) { sps->transform_skip_rotation_enabled_flag = get_bits1(gb); sps->transform_skip_context_enabled_flag = get_bits1(gb); sps->implicit_rdpcm_enabled_flag = get_bits1(gb); sps->explicit_rdpcm_enabled_flag = get_bits1(gb); - extended_precision_processing_flag = get_bits1(gb); - if (extended_precision_processing_flag) + sps->extended_precision_processing_flag = get_bits1(gb); + if (sps->extended_precision_processing_flag) av_log(avctx, AV_LOG_WARNING, "extended_precision_processing_flag not yet implemented\n"); @@ -1127,8 +1124,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->persistent_rice_adaptation_enabled_flag = get_bits1(gb); - cabac_bypass_alignment_enabled_flag = get_bits1(gb); - if (cabac_bypass_alignment_enabled_flag) + sps->cabac_bypass_alignment_enabled_flag = get_bits1(gb); + if (sps->cabac_bypass_alignment_enabled_flag) av_log(avctx, AV_LOG_WARNING, "cabac_bypass_alignment_enabled_flag not yet implemented\n"); } @@ -1686,9 +1683,9 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, pps->slice_header_extension_present_flag = get_bits1(gb); if (get_bits1(gb)) { // pps_extension_present_flag - int pps_range_extensions_flag = get_bits1(gb); + pps->pps_range_extensions_flag = get_bits1(gb); skip_bits(gb, 7); // pps_extension_7bits - if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps_range_extensions_flag) { + if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps->pps_range_extensions_flag) { if ((ret = pps_range_extensions(gb, avctx, pps, sps)) < 0) goto err; } |