Browse Source

tiffenc: factorize code for monow/monob case in encode_frame() switch

Reduce code duplication, increase robustness.
tags/n0.8
Stefano Sabatini 14 years ago
parent
commit
ac8d6f120d
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      libavcodec/tiffenc.c

+ 1
- 4
libavcodec/tiffenc.c View File

@@ -255,12 +255,9 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
s->photometric_interpretation = 3; s->photometric_interpretation = 3;
break; break;
case PIX_FMT_MONOBLACK: case PIX_FMT_MONOBLACK:
s->bpp = 1;
s->photometric_interpretation = 1;
break;
case PIX_FMT_MONOWHITE: case PIX_FMT_MONOWHITE:
s->bpp = 1; s->bpp = 1;
s->photometric_interpretation = 0;
s->photometric_interpretation = avctx->pix_fmt == PIX_FMT_MONOBLACK;
break; break;
case PIX_FMT_YUV420P: case PIX_FMT_YUV420P:
case PIX_FMT_YUV422P: case PIX_FMT_YUV422P:


Loading…
Cancel
Save