[FFmpeg-devel] [PATCH] Add 4x4 IDCT

Måns Rullgård mans
Sat Dec 8 12:13:19 CET 2007


Kostya <kostya.shishkov at gmail.com> writes:

> Here's a patch that adds missing 4x4 IDCT (will be used by VC-1 decoder).
>
> Index: simple_idct.c
> ===================================================================
> --- simple_idct.c	(revision 11185)
> +++ simple_idct.c	(working copy)
> @@ -585,3 +585,17 @@
>      }
>  }
>
> +void simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block)

We should prefix all new non-API functions with ff_, even if it is
inconsistent with the rest of the file.

> +{
> +    int i;
> +
> +    /* IDCT4 on each line */
> +    for(i=0; i<4; i++) {
> +        idct4row(block + i*8);
> +    }
> +
> +    /* IDCT8 and store */

That comment is wrong.

> +    for(i=0; i<4; i++){
> +        idct4col_add(dest + i, line_size, block + i);
> +    }
> +}
> Index: simple_idct.h
> ===================================================================
> --- simple_idct.h	(revision 11125)
> +++ simple_idct.h	(working copy)
> @@ -42,5 +42,6 @@
>
>  void simple_idct84_add(uint8_t *dest, int line_size, DCTELEM *block);
>  void simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block);
> +void simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block);
>
>  #endif /* FFMPEG_SIMPLE_IDCT_H */

Apart from the above, I can see nothing wrong with this, but do wait
for an OK from Michael before committing.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list