[FFmpeg-trac] #225(swscale:open): Converting from YUVJ to YUV lose contrast

FFmpeg trac at avcodec.org
Fri Mar 1 14:55:25 CET 2013


#225: Converting from YUVJ to YUV lose contrast
-------------------------------------+-------------------------------------
             Reporter:  sghpunk      |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  swscale
              Version:  git-master   |               Resolution:
             Keywords:  YUV/YUVJ     |               Blocked By:
  contrast                           |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by sperate):

 I have the same problem.

 yuvj420p pixels are encoded from 0 to 255.
 When converted to yuv420p AVI (mpeg4 and libxvid) the range is reduced to
 16 - 235, thus we can notice a loss of contrast.
 When converted to yuv420p MP4 (libx264) the output range stays untouched
 (0 - 255).

 A way to skirt this "problem", which I don't know if it is one actually,
 is to use the option
 {{{
 -vf mp=eq=0:0
 }}}
 It's an equaliser filter used to adjust brightness and contrast ported
 from mplayer.
 As you can see it does no modification to the values of contrast and
 brightness but helps leaving untouched the pixel values range.

 Having seen that, i figured out a lot of divx movies (maybe all) and all
 the videos downloaded from youtube or dailymotion had a pixel range
 between 16 and 235 which led to bad contrast on the vast majoroty of
 computer video players. AND THIS FOR LONG TIME NOW !!

 The trick i'm using to recover a good constrast is to use Media Malyer
 Classic which offers different pixel shaders including one to go from
 16-235 to 0-255.

 I find it so SILLY that we're looking at poor constrast videos on our
 computer screens for such a long time without almost no alternative !!!

 Regards.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/225#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list