Opened 8 months ago

Last modified 8 months ago

#10924 new enhancement

Clean-up "ssim", "psnr" filter output

Reported by: MasterQuestionable Owned by:
Priority: normal Component: avfilter
Version: unspecified Keywords: ssim psnr
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Related:
https://trac.ffmpeg.org/ticket/10922#comment:4
https://github.com/webmproject/libwebp/commit/33357131698ba0abb5b7a32b6f274f6f58170642#commitcomment-139962312

I noted unnecessary verbosity in the info output:
|1| Excessive trailing 0 of decimal.
|2| "All:1 (inf)" alike already implied the same for each component. (pointless repeat)

Misleading part of "psnr":
|1| "min", "max" seem to just repeat "average"?
|2| "average" would be better renamed to "all": for consistency, and it's really not the average of each component's sum.
|3| Probably mostly relevant to WebP only: the "a" (alpha)..? (notably when the WebP has dummy alpha)

And "ssim" seems missing support for Alpha? (per the doc)

With dummy input alpha (as in WebP), would it make sense to unconditionally ignore this channel?

Disclaimer:
I indeed don't quite understand these metrics.
Which I used mostly only for telling whether 2 images are completely the same...

Change History (1)

comment:1 by MasterQuestionable, 8 months ago

͏    "With dummy input alpha (as in WebP), would it make sense to unconditionally ignore this channel?"
<^>͏    Gather some out-of-the-class entities and count the average stats: would the outcome really make sense?
͏    Such would only generate unfaithfully biased results...

͏    For most cases:
͏    |1| If both input sharing identical Alpha ("A:1 (inf)"): ignore unless "+alpha" specified.
͏    |2| Else the Alpha should be counted (as it's significant): unless "-alpha" specified.

[ "+alpha"
͏    New filter option (parameter) for both "ssim" "psnr":
͏    Which forces the inclusion of Alpha during calculation.
͏    "-alpha", it's counterpart: forces the exclusion. ]

͏    Maybe the idea may be similarly expanded to each component..? (/[+\-][rgbyuva]/i)

Note: See TracTickets for help on using tickets.