[FFmpeg-devel] [RFC] use get_unary in multiple places

Vitor Sessak vitor1001
Thu Aug 9 04:48:07 CEST 2007


Hi

Alex Beregszaszi wrote:
> Hi,
> 
> the following patches make use of get_unary at all possible places I
> found.
> 
> Patches in order:
> 
> 1, alac: use get_unary where appropriate.
> 

[...]

> 
> Index: alac.c
> ===================================================================
> --- alac.c	(revision 9994)
> +++ alac.c	(working copy)
> @@ -159,16 +159,13 @@
>      int sign_modifier = 0;
>  
>      for (output_count = 0; output_count < output_size; output_count++) {
> -        int32_t x = 0;
> +        int32_t x;
>          int32_t x_modified;
>          int32_t final_val;
>  
>          /* read x - number of 1s before 0 represent the rice */
> -        while (x <= 8 && get_bits1(&alac->gb)) {
> -            x++;
> -        }
> +        x = get_unary(&alac->gb, 0, 9);
>  
> -
>          if (x > 8) { /* RICE THRESHOLD */
>              /* use alternative encoding */
>              int32_t value;
> 

Thanks, but you missed another one (patch attached).

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alac8.diff
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070809/af304f1f/attachment.bin>



More information about the ffmpeg-devel mailing list