[FFmpeg-devel] [PATCH v3] avfilter/vf_showinfo: Fix erroneous results for mean and stdev with pixel bits >8

Michael Niedermayer michael at niedermayer.cc
Tue Jan 7 03:53:15 EET 2020


On Fri, Nov 29, 2019 at 07:28:23PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Have tested with be and le pixel format on be and le system for >8bit.
> System:
> lmwang at ubuntu:~/ffmpeg.git.mips$ grep HAVE_BIGENDIAN config.h
> #define HAVE_BIGENDIAN 1
> ffmpeg.git git:(showinfo) ✗ grep HAVE_BIGENDIAN config.h
> #define HAVE_BIGENDIAN 0
> 
> 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: Limin Wang <lance.lmwang at gmail.com>
> ---
>  libavfilter/vf_showinfo.c | 34 +++++++++++++++++++++++++++++++---
>  1 file changed, 31 insertions(+), 3 deletions(-)

will apply

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200107/2d76233b/attachment.sig>


More information about the ffmpeg-devel mailing list