[FFmpeg-devel] [PATCH] avfilter: add allrgb

Clément Bœsch u at pkh.me
Sun Aug 16 01:50:46 CEST 2015


On Sun, Aug 16, 2015 at 01:21:53AM +0200, Clément Bœsch wrote:
[...]
>  OBJS-$(CONFIG_ALLYUV_FILTER)                 += vsrc_testsrc.o
> +OBJS-$(CONFIG_ALLRGB_FILTER)                 += vsrc_testsrc.o

locally reordered

[...]
> +static void allrgb_fill_picture(AVFilterContext *ctx, AVFrame *frame)
> +{
> +    int r, g, b;
> +    uint8_t *dst = frame->data[0];
> +    const int linesize = frame->linesize[0];
> +
> +    for (r = 0; r < 256; r++) {
> +        for (g = 0; g < 256; g++) {
> +            for (b = 0; b < 256; b++) {
> +                const int c = r<<16 | g<<8 | b;

> +                const int y = c / 4096;
> +                const int x = c % 4096;

locally replaced with:
                   const int y = c >> 12;
                   const int x = c & ((1<<12)-1);

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150816/30abfc17/attachment.sig>


More information about the ffmpeg-devel mailing list