[FFmpeg-devel] [PATCH]lavc/pgssubdec: Fix palette colourspace
wm4
nfxjfg at googlemail.com
Sun Apr 17 20:44:44 CEST 2016
On Sun, 17 Apr 2016 21:41:32 +0300
Jan Ekstrom <jeebjp at gmail.com> wrote:
> On Sun, Apr 17, 2016 at 9:21 PM, Reimar Döffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > In particular, I have an uncomfortable suspicion that
> > PGS might be designed to match the movie's colour space,
> > in which case neither variant would give correct results
> > but instead it would have to depend on what format the
> > corresponding video track uses (and it probably would
> > be more than just the 255/224 factor that would differ).
>
> Yes, the YCbCr values in palettes are matched accordingly against the
> video stream. As per the specification:
> "Y, Cr and Cb shall have the same color matrix as the associated HDMV
> Video stream: 525-60/625-50 (Rec.601); 1080i, 720p (ITU-709)"
>
> Otherwise the specification notes that valid values in palettes are:
> -Y: 16-235
> -Cr: 16-240
> -Cb: 16-240
> -Transparency: 0-255, where a value of ‘255’ indicates full opacity
> and ‘0’ indicates full transparency.
> (Each Palette entry shall have a default transparency value of 0; the
> default values of Y, Cr and Cb are undefined.)
Ah that's funny. This indeed ruins everything. It looks like subtitle
decoders should simply output YUV, and until we can fix it, a private
option could change between the colorspaces?
More information about the ffmpeg-devel
mailing list