[FFmpeg-trac] #2005(avcodec:open): Wrong palette colors with DVD subtitles encoding
FFmpeg
trac at avcodec.org
Thu Dec 13 00:10:14 CET 2012
#2005: Wrong palette colors with DVD subtitles encoding
------------------------------------+-----------------------------------
Reporter: ubitux | Owner:
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: dvdsub | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 1 |
------------------------------------+-----------------------------------
Comment (by ubitux):
Replying to [comment:4 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?
If it solves the issue, using the alpha channel as a weight factor for the
color sounds like a good idea to me (assuming that's what you meant).
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2005#comment:8>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list