[FFmpeg-devel] [PATCH] avfilter/vf_dctdnoiz: add GBRP support

Paul B Mahol onemda at gmail.com
Sun Apr 9 19:11:25 EEST 2017


On 4/9/17, Clement Boesch <u at pkh.me> wrote:
> On Sun, Apr 09, 2017 at 05:40:13PM +0200, Paul B Mahol wrote:
> [...]
>> +static av_always_inline void color_decorrelation_gbrp(float **dst, int
>> dst_linesize,
>> +                                                      const uint8_t
>> **src, int src_linesize,
>> +                                                      int w, int h)
>> +{
>> +    int x, y;
>> +    float *dstp_r = dst[0];
>> +    float *dstp_g = dst[1];
>> +    float *dstp_b = dst[2];
>> +    const uint8_t *srcp_r = src[2];
>> +    const uint8_t *srcp_g = src[0];
>> +    const uint8_t *srcp_b = src[1];
>> +
>> +    for (y = 0; y < h; y++) {
>> +        for (x = 0; x < w; x++) {
>
>> +            dstp_r[x] = srcp_r[x] * DCT3X3_0_0 + srcp_g[x] * DCT3X3_0_1 +
>> srcp_b[x] * DCT3X3_0_2;
>> +            dstp_g[x] = srcp_g[x] * DCT3X3_1_0 +
>> srcp_b[x] * DCT3X3_1_2;
>> +            dstp_b[x] = srcp_b[x] * DCT3X3_2_0 + srcp_g[x] * DCT3X3_2_1 +
>> srcp_b[x] * DCT3X3_2_2;
>                                 ^
>               i think this column is supposed to be reds

Indeed, fixed locally.

>> +        }
>> +        srcp_r += src_linesize;
>> +        srcp_g += src_linesize;
>> +        srcp_b += src_linesize;
>> +        dstp_r += dst_linesize;
>> +        dstp_g += dst_linesize;
>> +        dstp_b += dst_linesize;
>> +    }
>> +}
>
> Rest LGTM
>
> --
> Clement B.
>


More information about the ffmpeg-devel mailing list