[FFmpeg-devel] [PATCH]lavc/psd: Support 1bpp images
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed Jan 11 00:48:17 EET 2017
2017-01-10 23:42 GMT+01:00 Martin Vignali <martin.vignali at gmail.com>:
> 2017-01-10 20:00 GMT+01:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
>
>> 2017-01-10 19:45 GMT+01:00 Gonzalo GarramuƱo <ggarra13 at gmail.com>:
>> >
>> >
>> > El 10/01/2017 a las 10:21, Carl Eugen Hoyos escribiĆ³:
>> >>
>> >> }
>> >> + } else if (avctx->pix_fmt == AV_PIX_FMT_MONOWHITE) {
>> >> + ptr = picture->data[0];
>> >> + for (y = 0; y < s->height; y++) {
>> >> + memcpy(ptr, ptr_data, s->width + 7 >> 3);
>> >> + ptr_data += s->width + 7 >> 3;
>> >> + ptr += picture->linesize[0];
>> >> + }
>> >
>> > Just a nitpick. I would put s->width + 7 >> 3 in a variable outside the
>> > loop and use it in memcpy and in the ptr_data.
>>
>> Fixed locally.
>>
> Tested on some sample, seems to work.
>
> But maybe you can put the Store data code inside the planar part (it's very
> similar)
That means I have to remove the pixel_size context variable:
Do you want me to do that?
Carl Eugen
More information about the ffmpeg-devel
mailing list