swscale/utils: Fix color range of gray16

Improves rgb -> gray16 conversion

Fixes Ticket3422

The pam and png output files look visually similar, in both cases the
dynamics increase to 0x0 -> 0xfffb.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Carl Eugen Hoyos
2014-03-18 03:19:18 +01:00
committed by Michael Niedermayer
parent 05d7059ac6
commit 37c07d4529
13 changed files with 27 additions and 25 deletions

View File

@@ -1055,6 +1055,8 @@ static int handle_jpeg(enum AVPixelFormat *format)
*format = AV_PIX_FMT_YUV440P;
return 1;
case AV_PIX_FMT_GRAY8:
case AV_PIX_FMT_GRAY16LE:
case AV_PIX_FMT_GRAY16BE:
return 1;
default:
return 0;