• Limin Wang's avatar
    avfilter/vf_showinfo: Fix erroneous results for mean and stdev with pixel bits >8 · d31a1266
    Limin Wang authored
    Have tested with be and le pixel format on be and le system for >8bit.
    System:
    lmwang@ubuntu:~/ffmpeg.git.mips$ grep HAVE_BIGENDIAN config.h
    ffmpeg.git git:(showinfo) ✗ grep HAVE_BIGENDIAN config.h
    
    Test result:
    1, yuv420p
    ./ffmpeg -f lavfi  -i color=black:duration=1:r=1:size=1280x720,format=yuv420p,showinfo
    Master:
    mean:[16 128 128] stdev:[0.0 0.0 0.0]
    After applied the patch:
     mean:[16 128 128] stdev:[0.0 0.0 0.0]
    
    2, yuv420p10le
    ./ffmpeg -f lavfi  -i color=black:duration=1:r=1:size=1280x720,format=yuv420p10le,showinfo
    Master:
    mean:[32 1 1] stdev:[32.0 1.0 1.0]
    After applied the patch:
    mean:[64 512 512] stdev:[0.0 0.0 0.0]
    
    3, yuv420p10be
    ./ffmpeg -f lavfi  -i color=black:duration=1:r=1:size=1280x720,format=yuv420p10be,showinfo
    Master:
    mean:[32 1 1] stdev:[32.0 1.0 1.0]
    After applied the patch:
    mean:[64 512 512] stdev:[0.0 0.0 0.0]
    Signed-off-by: 's avatarLimin Wang <lance.lmwang@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    d31a1266
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...