On Fri, Aug 02, 2013 at 11:24:22AM +0200, Kostya Shishkov wrote:
> --- a/libavcodec/twinvq.c
> +++ b/libavcodec/twinvq.c
> @@ -379,22 +402,20 @@ static void dequant(TwinVQContext *tctx, GetBitContext 
> *gb, float *out,
>          int bitstream_second_part = (i >= 
> tctx->bits_main_spec_change[ftype]);
>  
>          int bits = tctx->bits_main_spec[0][ftype][bitstream_second_part];
> +        tmp0 = *cb_bits++;
>          if (bits == 7) {
> -            if (get_bits1(gb))
> +            if (tmp0 & 0x40)
>                  sign0 = -1;
> -            bits = 6;
> +            tmp0 &= 0x3F;
>          }
> -        tmp0 = get_bits(gb, bits);
>  
>          bits = tctx->bits_main_spec[1][ftype][bitstream_second_part];
> -
> +        tmp1 = *cb_bits++;
>          if (bits == 7) {
> -            if (get_bits1(gb))
> +            if (tmp1 & 0x40)
>                  sign1 = -1;
> -
> -            bits = 6;
> +            tmp1 &= 0x3F;
>          }
> -        tmp1 = get_bits(gb, bits);

The hex values look very magic numberish.  Is there an alternative way
to express this?

This also looks like it could be split off into a function to avoid the
code duplication.

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

Reply via email to