X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fhevcdec.h;h=b45969b7e233727f6d8207bbf8bdf5697736bd70;hb=c15972f0af7679b466dd4a10a54ab2f04f9372c8;hp=ef918f4fb2984b0507b824a97d1c662f9849b5f6;hpb=b3e5899e475d02dc0730e9405b4c067c8c78d8f4;p=ffmpeg diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index ef918f4fb29..b45969b7e23 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -430,6 +430,7 @@ typedef struct HEVCContext { int max_ra; int bs_width; int bs_height; + int overlap; int is_decoded; int no_rasl_output_flag; @@ -544,10 +545,28 @@ int ff_hevc_res_scale_sign_flag(HEVCContext *s, int idx); /** * Get the number of candidate references for the current frame. */ -int ff_hevc_frame_nb_refs(HEVCContext *s); +int ff_hevc_frame_nb_refs(const 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: + 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