[FFmpeg-user] xmedian questions
list+ffmpeg-user at jdlh.com
list+ffmpeg-user at jdlh.com
Fri Jan 1 04:50:09 EET 2021
On 2020-12-31 17:25, Mark Filipak (ffmpeg) wrote:
> 1, Median? Really? (Or maybe really average?)
>
> For inputs = 239+15+15+15:
> median = (239+15)/2 = 127
> average = (239+15+15+15)/4 = 71
> For inputs = 239+239+239+15:
> median = (239+15)/2 = 127 (again)
> average = (239+239+239+15)/4 = 183
It jumped out at me that the expressions you are computing for "median"
don't match the definition I am used to. It looks like you are computing
the average of the largest and smallest samples. I understand "median"
to be a value such that half the samples are greater than or equal to,
and half are less than equal to, the value.
For inputs = 239+15+15+15:
median = 15 (239, 15 >= 15; 15, 15 <= 15)
For inputs = 239+239+239+15:
median = 239 (239, 239 >= 239; 239, 15 <= 15)
So, how to you define "median"? And how does FFmpeg?
—Jim DeLaHunt
More information about the ffmpeg-user
mailing list