[FFmpeg-devel] [PATCH 12/24] avcodec/mjpegenc: add support for non-YUVJ formats

Michael Niedermayer michael at niedermayer.cc
Wed May 2 01:06:18 EEST 2018


Hi

On Tue, May 01, 2018 at 09:40:01PM +0200, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/mjpegenc.c      | 5 ++++-
>  libavcodec/mpegvideo_enc.c | 3 +--
>  tests/lavf-regression.sh   | 2 +-
>  3 files changed, 6 insertions(+), 4 deletions(-)

This doesnt work

first create a input file
./ffmpeg -f lavfi -i testsrc=640x480 test.ppm
(if you like check that this has correct white and black) 0,0,0 and 255,255,255

now convert to jpeg
./ffmpeg -i test.ppm test.jpg
gimp test.jpg

white and black have RGB values: 16,16,16 and 235,235,235 thats not correct
and also looks wrong

the strict_std_compliance check that was before this cannot be just droped

If you want jpeg images to interoperate with all software they must be full 
range 
the limited range is a not entirely official feature. So it should not be
used by default
(that is AFAIK, things may have changed and maybe theres a official way now
 but from what i remember there was not for images)




[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180502/ea6284b3/attachment.sig>


More information about the ffmpeg-devel mailing list