[FFmpeg-devel] [PATCH] jpeg2000: split off inverse MCT decoding as Jpeg2000DSP

Michael Niedermayer michaelni at gmx.at
Thu Oct 2 01:04:24 CEST 2014


On Wed, Oct 01, 2014 at 05:14:38PM -0300, James Almer wrote:
> This makes the addition of arch optimized functions easier.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavcodec/Makefile      |  2 +-
>  libavcodec/jpeg2000dec.c | 71 +++++++++--------------------------
>  libavcodec/jpeg2000dsp.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++
>  libavcodec/jpeg2000dsp.h | 35 +++++++++++++++++
>  libavcodec/jpeg2000dwt.h |  3 +-
>  5 files changed, 153 insertions(+), 56 deletions(-)
>  create mode 100644 libavcodec/jpeg2000dsp.c
>  create mode 100644 libavcodec/jpeg2000dsp.h
[...]
> +static void mct_decode97_float(void *_src0, void *_src1, void *_src2, int csize)
> +{
> +    float *src0 = _src0, *src1 = _src1, *src2 = _src2;
> +    float i0f, i1f, i2f;
> +    int i;
> +
> +    for (i = 0; i < csize; i++) {
> +        i0f = *src0 + (f_ict_params[0] * *src2);
> +        i1f = *src0 - (f_ict_params[1] * *src1)
> +                    - (f_ict_params[2] * *src2);
> +        i2f = *src0 + (f_ict_params[3] * *src1);
> +        *src0++ = i0f;
> +        *src1++ = i1f;
> +        *src2++ = i2f;
> +    }
> +}
> +
> +static void mct_decode97_int(void *_src0, void *_src1, void *_src2, int csize)
> +{
> +    int32_t *src0 = _src0, *src1 = _src1, *src2 = _src2;
> +    int32_t i0, i1, i2;
> +    int i;
> +
> +    for (i = 0; i < csize; i++) {
> +        i0 = *src0 + (((i_ict_params[0] * *src2) + (1 << 15)) >> 16);
> +        i1 = *src0 - (((i_ict_params[1] * *src1) + (1 << 15)) >> 16)
> +                   - (((i_ict_params[2] * *src2) + (1 << 15)) >> 16);
> +        i2 = *src0 + (((i_ict_params[3] * *src1) + (1 << 15)) >> 16);
> +        *src0++ = i0;
> +        *src1++ = i1;
> +        *src2++ = i2;
> +    }
> +}
> +
> +static void mct_decode53(void *_src0, void *_src1, void *_src2, int csize)

the function names are not good
the code is not related to the 5/3 and 9/7 wavelets


[...]
-- 
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: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141002/499eaea3/attachment.asc>


More information about the ffmpeg-devel mailing list