[FFmpeg-trac] #2452(undetermined:closed): decoding yuv420p to rgb shifts luminance down

FFmpeg trac at avcodec.org
Sun Aug 15 14:10:20 EEST 2021


#2452: decoding yuv420p to rgb shifts luminance down
-------------------------------------+-------------------------------------
             Reporter:  burek        |                    Owner:  (none)
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by Balling):

 * resolution:  needs_more_info => invalid

Comment:

 Hilarious. ffplay video.avi -vf extractplanes=y shows that there are 255
 pixels there in Y that means IT CANNOT BE limited range. It must be full
 range, since in limited YCbCr (and rgb BTW too) [8 bit] 0 and 255 are
 reserved in all components and should not be used.

 I also do not understand how is 1ba01d3d46e8c200a2527ebafc71d5651084586b
 affecting this since it is SAYING the opposite.

 Yet, I do not get it: this is not a bug since range is NOT TAGGED and thus
 there is no way to say what it should be besides direct bruteforce for
 reserved values (and even that is not a guarantee, since this is just HDMI
 requirement, MPEG-4 permits that) or checking for Cb + Cr planes being
 achromatic (128 that is for 8 bit, 512 for 10 bit). Limited is the default
 here, since it is not really gray but yuv420p.

 A good workaround is ffplay -v debug video.avi -vf zscale=rangein=full

 Yet I did not find a way to tag MPEG-4 Visual as full range.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/2452#comment:20>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list