[FFmpeg-trac] #2005(avcodec:new): Wrong palette colors with DVD subtitles encoding
FFmpeg
trac at avcodec.org
Wed Dec 12 16:38:19 CET 2012
#2005: Wrong palette colors with DVD subtitles encoding
------------------------------------+-----------------------------------
Reporter: ubitux | Owner:
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: dvdsub | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by Cigaes):
{{{
0 0 00c5c5c5 00000000 116427
0 1 00c5c5c5 ffffff00 110562
0 2 00c5c5c5 ff000000 181452
0 3 00c5c5c5 00000000 116427
}}}
In other words, the dvdsub encoder considers that the transparent light
gray is slightly nearer opaque yellow than transparent black. The culprit
is {{{color_distance()}}} in {{{dvdsubenc.c}}}. A quick fix would be to
get it to return 0 when both alphas are 0. A possibly better fix would be
to multiply everything by alpha, i.e. consider the colors as a cone rather
than an hypercube. Do you have any preference?
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2005#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list