X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvp56.h;h=70e1d38a83733372cf2eadede6bb8bfcd558c114;hb=7f22a4ebc97817fd0968f5ea8295c9a59a6292e0;hp=b8dda9e73a5491f4a1f5692376eb4e933507c597;hpb=64425e005edf3bdd77c34c078c3e74ab5ecef557;p=ffmpeg diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h index b8dda9e73a5..70e1d38a837 100644 --- a/libavcodec/vp56.h +++ b/libavcodec/vp56.h @@ -227,6 +227,14 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, extern const uint8_t ff_vp56_norm_shift[256]; int ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size); +/** + * vp5689 returns 1 if the end of the stream has been reached, 0 otherwise. + */ +static av_always_inline int vpX_rac_is_end(VP56RangeCoder *c) +{ + return c->end <= c->buffer && c->bits >= 0; +} + static av_always_inline unsigned int vp56_rac_renorm(VP56RangeCoder *c) { int shift = ff_vp56_norm_shift[c->high];