[FFmpeg-trac] #10428(documentation:new): HSV filters are not actually doing HSV
FFmpeg
trac at avcodec.org
Thu Jun 22 10:47:18 EEST 2023
#10428: HSV filters are not actually doing HSV
-------------------------------------+-------------------------------------
Reporter: Mingye Wang | Owner: (none)
Type: defect | Status: new
Priority: minor | Component:
| documentation
Version: git-master | Resolution:
Keywords: terminology | Blocked By:
colorspace |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by Mingye Wang):
* version: unspecified => git-master
Old description:
> Summary of the bug: The `hsvhold` and `hsvkey` filters claim to be doing
> HSV, but a quick examination of the source code `do_hsvkey_pixel()`
> reveals that they do not actually use the famous
> [https://en.wikipedia.org/wiki/HSL_and_HSV#Basic_principle hexcone
> geometry] based on RGB, but instead piggybacks on YCC. Some clarification
> is needed.
>
> How to reproduce: Navigate to https://ffmpeg.org/ffmpeg-
> filters.html#hsvhold.
>
> (Not using the real HSV is actually a good thing. At least this "V" we
> use is based on video luma, making it a much better representation of how
> bright something looks like than the real thing that weighs RGB equally.
> However, people could have incorrect expectations about what "hsv" value
> their key color is.)
New description:
Summary of the bug: The `hsvhold` and `hsvkey` filters claim to be doing
HSV, but a quick examination of the source code `do_hsvkey_pixel()`
reveals that they do not actually use the famous
[https://en.wikipedia.org/wiki/HSL_and_HSV#Basic_principle hexcone
geometry] based on RGB, but instead piggybacks on YCC. Some clarification
is needed.
How to reproduce: Navigate to https://ffmpeg.org/ffmpeg-
filters.html#hsvhold.
(Not using the real HSV is actually a good thing. At least this "V" we use
is based on video luma, making it a much better representation of how
bright something looks like than the real thing that weighs RGB equally.
However, people could have incorrect expectations about what "hsv" value
their key color is.)
Oh and also every filter that deals with hue works on YCC, because of
course, that's what's in the video stream! A disclaimer in `filters.texi`
should minimize the number of files to change.
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10428#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list