[FFmpeg-user] Problem with colorhold filter
astroelectronic at t-online.de
Thu May 21 12:28:18 EEST 2020
Am 16.05.2020 um 22:44 schrieb Carl Eugen Hoyos:
> Am Sa., 16. Mai 2020 um 22:02 Uhr schrieb Edward Park <kumowoon1025 at gmail.com>:
>> I think this might have been a typo? in vf_colorkey.c:48 the "diff"
>> isn't normalized to 0 - 1, but to 0 - 3.
>> double diff = sqrt((dr * dr + dg * dg + db * db) / (255.0 * 255.0));
>> changing it to
>> double diff = sqrt((dr * dr + dg * dg + db * db) / (3 * 255.0 * 255.0));
>> seems to fix it for me.
> Paul sent such a patch two hours ago.
Tested and working fine now. Please note that if you have old scripts
with colorhold filter, the "similarity" value must now be divided by
sqrt(3) to get the same result as before.
More information about the ffmpeg-user