You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
tiffenc: factorize code for monow/monob case in encode_frame() switch
Reduce code duplication, increase robustness.
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user