On Thu, Jan 26, 2017 at 11:10:42AM +0100, Diego Biurrun wrote:
> --- a/libavcodec/golomb.h
> +++ b/libavcodec/golomb.h
> @@ -50,26 +50,24 @@ extern const uint8_t 
> ff_interleaved_dirac_golomb_vlc_code[256];
>  /**
>   * read unsigned exp golomb code.
>   */
> -static inline int get_ue_golomb(GetBitContext *gb)
> +static inline int get_ue_golomb(BitstreamContext *bc)
>  {
>      unsigned int buf;
> +    int ret;
>  
> -    OPEN_READER(re, gb);
> -    UPDATE_CACHE(re, gb);
> -    buf = GET_CACHE(re, gb);
> +    buf = bitstream_peek(bc, 32);
>  
>      if (buf >= (1 << 27)) {
>          buf >>= 32 - 9;
> -        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
> -        CLOSE_READER(re, gb);
> +        bitstream_skip(bc, ff_golomb_vlc_len[buf]);
>  
> -        return ff_ue_golomb_vlc_code[buf];
> +        ret = ff_ue_golomb_vlc_code[buf];
> +        return ret;

The indirection through ret seems pointless the implicit cast suspicious,
dropping from the next iteration of the patch.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to