Commit ac8d6f12 authored by Stefano Sabatini's avatar Stefano Sabatini

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

Reduce code duplication, increase robustness.
parent 995013eb
......@@ -255,12 +255,9 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
s->photometric_interpretation = 3;
break;
case PIX_FMT_MONOBLACK:
s->bpp = 1;
s->photometric_interpretation = 1;
break;
case PIX_FMT_MONOWHITE:
s->bpp = 1;
s->photometric_interpretation = 0;
s->photometric_interpretation = avctx->pix_fmt == PIX_FMT_MONOBLACK;
break;
case PIX_FMT_YUV420P:
case PIX_FMT_YUV422P:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment