[FFmpeg-devel] [PATCH]lavc/pgssubdec: Fix palette colourspace

Hendrik Leppkes h.leppkes at gmail.com
Sun Apr 17 23:38:00 CEST 2016

On Sun, Apr 17, 2016 at 8:55 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Sun, Apr 17, 2016 at 09:41:32PM +0300, Jan Ekstrom 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
> ?!???
> These two kind of contradict each other, at least if the HDMV video
> stream uses a full range color matrix (or is that not allowed?).

No, Blu-rays are limited range, as is basically all consumer content.
Full-range is practically not used in the real world outside of people
recording their desktops.

- Hendrik

More information about the ffmpeg-devel mailing list