diff options
author | sfan5 <sfan5@live.de> | 2017-12-07 22:37:48 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-12-08 22:02:16 +0300 |
commit | a428f2fcd95906cdfca1eff574369fb32169317e (patch) | |
tree | ae2c56f864cee8be45a02c28a81d5d3316a7d4ce /libavcodec/hevcdec.h | |
parent | 2fdc9f7c4939f83a6c9d1f9d85b6d37ce0bab714 (diff) |
libavcodec/hevc_filter: move AVDISCARD_NONREF switch-case into function
In preparation for implementation of skip_frame.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hevcdec.h')
-rw-r--r-- | libavcodec/hevcdec.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index ef918f4fb2..b311edc8ae 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -548,6 +548,26 @@ int ff_hevc_frame_nb_refs(HEVCContext *s); int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc); +static av_always_inline int ff_hevc_nal_is_nonref(enum HEVCNALUnitType type) +{ + switch (type) { + case HEVC_NAL_TRAIL_N: + case HEVC_NAL_TSA_N: + case HEVC_NAL_STSA_N: + case HEVC_NAL_RADL_N: + case HEVC_NAL_RASL_N: + case HEVC_NAL_VCL_N10: + case HEVC_NAL_VCL_N12: + case HEVC_NAL_VCL_N14: + case HEVC_NAL_BLA_N_LP: + case HEVC_NAL_IDR_N_LP: + return 1; + break; + default: break; + } + return 0; +} + /** * Find next frame in output order and put a reference to it in frame. * @return 1 if a frame was output, 0 otherwise |