[FFmpeg-trac] #3345(swscale:open): Bias in planar YUV to YUV bit depth conversion

FFmpeg trac at avcodec.org
Thu Dec 24 00:55:01 EET 2020


#3345: Bias in planar YUV to YUV bit depth conversion
------------------------------------+-----------------------------------
             Reporter:  abc123      |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  swscale
              Version:  git-master  |               Resolution:
             Keywords:  bounty      |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Changes (by Balling):

 * status:  new => open


Comment:

 Interesting.

 Why does
 {{{
 ffmpeg -pixel_format yuv420p10le -s 1280x720 -i testGrad_01.yuv -pix_fmt
 yuv420p -f rawvideo testGrad_02.yuv

 }}}

 work correctly and
 {{{
 ffmpeg -pixel_format yuv420p10le -s 1280x720 -i testGrad_01.yuv
 -pixel_format yuv420p -f rawvideo testGrad_02.yuv
 }}}
 produces bit perfect '''the same''' file?

 >but instead dither
 Maybe your floyd-steinberg dither is wrong in some place?

 I can reproduce it. It looks like you do perfect convertion on the bottom
 (in checkerborder pattern if you look into the difference that is like
 29x2 pixels when it breaks) and then you fail on 59 and 60th, then you get
 on track again (this time on more little pixels, not 2x2), and again fail,
 etc. Very interesting.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3345#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list