[FFmpeg-devel] [RFC][PATCH] simple_idct: Template functions to support an input bitdepth parameter

Michael Niedermayer michael at niedermayer.cc
Thu Dec 28 02:14:09 EET 2017


On Wed, Dec 27, 2017 at 10:27:25PM +0000, Kieran Kunhya wrote:
> On Wed, 27 Dec 2017 at 19:53 Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > please call the functions ff_simple_idct_int16_10bit or something that
> > makes it
> > clear what the 2 numbers mean.
> >
> 
> done
> 
> > [...]
> 
> is that faster than checking row 4-7 for 0 with sparse matrixes as occuring
> > in
> > video data ?
> >
> 
> added.
> 
> New patch attached.

>  bit_depth_template.c   |   17 ++++++++++++++++-
>  idctdsp.c              |   18 +++++++++---------
>  me_cmp.c               |    2 +-
>  simple_idct.c          |   15 ++++++++++++---
>  simple_idct.h          |   24 ++++++++++++++----------
>  simple_idct_template.c |   44 +++++++++++++++++++++++++++++---------------
>  tests/dct.c            |    6 +++---
>  vc1.c                  |    4 ++--
>  8 files changed, 86 insertions(+), 44 deletions(-)
> 1148a19f22faf958da521dbdaa4f621e47e1c629  0001-simple_idct-Template-functions-to-support-an-input-b.patch
> From ae01a17ed048343e57173fd496a23ca64a95ef3f Mon Sep 17 00:00:00 2001
> From: Kieran Kunhya <kieran at kunhya.com>
> Date: Wed, 27 Dec 2017 01:08:39 +0000
> Subject: [PATCH] simple_idct: Template functions to support an input bitdepth
>  parameter
[...]
> diff --git a/libavcodec/tests/dct.c b/libavcodec/tests/dct.c
> index b44c66f..c09f5ca 100644
> --- a/libavcodec/tests/dct.c
> +++ b/libavcodec/tests/dct.c
> @@ -82,9 +82,9 @@ static void ff_prores_idct_wrap(int16_t *dst){
>  static const struct algo idct_tab[] = {
>      { "REF-DBL",     ff_ref_idct,          FF_IDCT_PERM_NONE },
>      { "INT",         ff_j_rev_dct,         FF_IDCT_PERM_LIBMPEG2 },
> -    { "SIMPLE-C",    ff_simple_idct_8,     FF_IDCT_PERM_NONE },
> -    { "SIMPLE-C10",  ff_simple_idct_10,    FF_IDCT_PERM_NONE },
> -    { "SIMPLE-C12",  ff_simple_idct_12,    FF_IDCT_PERM_NONE, 0, 1 },

> +    { "SIMPLE-C",    ff_simple_idct_int16_8bit,     FF_IDCT_PERM_NONE },
> +    { "SIMPLE-C10",  ff_simple_idct_int16_10bit,    FF_IDCT_PERM_NONE },
> +    { "SIMPLE-C12",  ff_simple_idct_16_12,    FF_IDCT_PERM_NONE, 0, 1 },

you missed renaming the 3rd of these

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171228/938c2cff/attachment.sig>


More information about the ffmpeg-devel mailing list