[FFmpeg-devel] [PATCH] IFF: Add grayscale support to decoder
Sebastian Vater
cdgs.basty
Mon May 10 18:00:19 CEST 2010
Ronald S. Bultje a ?crit :
> Hi,
>
> On Mon, May 10, 2010 at 11:32 AM, Sebastian Vater
> <cdgs.basty at googlemail.com> wrote:
>
>> + if (count > 0) { // PIX_FMT_RGB8
>>
>
> if (count) { //...
>
It should really check for just > 0 (is signed)...if we start to play
later with extradata stuff and have to subtract, it might be get < 0.
>> + avctx->pix_fmt = (avctx->extradata_size == 0) ? PIX_FMT_GRAY8
>> + : PIX_FMT_PAL8;
>>
>
> Superfluous (), and ==0 isn't necessary (just extradata_size ? .. : .. is OK).
>
Fixed.
>> - if (avctx->pix_fmt == PIX_FMT_PAL8) {
>> + if ((avctx->pix_fmt == PIX_FMT_PAL8) || (avctx->pix_fmt == PIX_FMT_GRAY8)) {
>>
Fixed.
> [..]
>
>> - if (avctx->pix_fmt == PIX_FMT_PAL8) {
>> + if ((avctx->pix_fmt == PIX_FMT_PAL8) || (avctx->pix_fmt == PIX_FMT_GRAY8)) {
>>
>
> Superfluous () all over.
>
Fixed.
--
Best regards,
:-) Basty/CDGS (-:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-decoder-grayscale-support.patch
Type: text/x-patch
Size: 2106 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100510/c011f3ca/attachment.bin>
More information about the ffmpeg-devel
mailing list