[FFmpeg-devel] [PATCH] IFF: Add grayscale support to decoder

Ronald S. Bultje rsbultje
Mon May 10 17:57:04 CEST 2010


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) { //...

> +        avctx->pix_fmt = (avctx->extradata_size == 0) ? PIX_FMT_GRAY8
> +                                                      : PIX_FMT_PAL8;

Superfluous (), and ==0 isn't necessary (just extradata_size ? .. : .. is OK).

> -    if (avctx->pix_fmt == PIX_FMT_PAL8) {
> +    if ((avctx->pix_fmt == PIX_FMT_PAL8) || (avctx->pix_fmt == PIX_FMT_GRAY8)) {
[..]
> -        if (avctx->pix_fmt == PIX_FMT_PAL8) {
> +        if ((avctx->pix_fmt == PIX_FMT_PAL8) || (avctx->pix_fmt == PIX_FMT_GRAY8)) {

Superfluous () all over.

Ronald



More information about the ffmpeg-devel mailing list