[FFmpeg-soc] [soc]: r839 - dirac/libavcodec/dirac_arith.c
Aurelien Jacobs
aurel at gnuage.org
Thu Aug 16 13:09:27 CEST 2007
On Thu, 16 Aug 2007 12:15:30 +0200 (CEST)
marco <subversion at mplayerhq.hu> wrote:
> Author: marco
> Date: Thu Aug 16 12:15:29 2007
> New Revision: 839
>
> Log:
> simplify sign check
>
> Modified:
> dirac/libavcodec/dirac_arith.c
>
> Modified: dirac/libavcodec/dirac_arith.c
> ==============================================================================
> --- dirac/libavcodec/dirac_arith.c (original)
> +++ dirac/libavcodec/dirac_arith.c Thu Aug 16 12:15:29 2007
> @@ -268,10 +268,7 @@ void dirac_arith_write_int(dirac_arith_s
> struct dirac_arith_context_set *context_set,
> int i) {
> dirac_arith_write_uint(arith, context_set, FFABS(i));
> - if (i > 0)
> - dirac_arith_put_bit(arith, context_set->sign, 0);
> - else if (i < 0)
> - dirac_arith_put_bit(arith, context_set->sign, 1);
> + dirac_arith_put_bit(arith, context_set->sign, i < 0);
It seems you're now missing a if(i). Now it will put a bit even when i==0.
Aurel
More information about the FFmpeg-soc
mailing list