Opened 15 years ago

Closed 15 years ago

#7307 closed enhancement (fixed)

Add ITU BT709 colorspace support and studio levels (RGB 16-235) for VDPAU playback

Reported by: JYA Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: MythTV - General Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: yes

Description (last modified by JYA)

By default VDPAU uses PC RGB levels (0-255 range), this is good for your typical PC monitors, but TV's are usually calibrated for different levels (black at 16 and white at 235). Using PC levels with a TV expecting studio levels result in poor black and white levels (crushed).

This could be fixed by changing the contrast and brightness default value, but obviously this isn't ideal.

Another issue is that HD videos uses a different colorspace than SD (ITU BT.709 vs ITU BT.601). VDPAU by default uses BT601, so all colours with HD videos are actually wrong ; they would be shifted, slightly under or over saturated. This is particularly noticeable with skin tones.

So ideally, you would want to use BT601 colorspace for SD videos and BT709 for HD videos.

This patch adds ITU BT709 video support and RGB studio levels to VDPAU playback.

Parameters are set using the custom filter option in the deinterlacer configuration screen. Utilities/Setup? -> Setup -> TV Settings -> Playback -> Playback Profiles -> Custom Filters

studio: will prevent converting to PC levels colorspace=n will set the colorspace to be used. n=0: will use BT709 for HD videos and BT601 for SD n=1 (default): will always use BT601 n=2: will always use BT709

Example: Custom Filters: studio,colorspace=0

Original RGB conversion formulas and ideas are taken from mplayer OpenGL display code (vo_gl) and a patch from LauriM for mplayer.

Attachments (1)

studiolevel-bt709support.diff (6.3 KB) - added by JYA 15 years ago.
BT709 colorspace and studio RGB levels support patch

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by JYA

BT709 colorspace and studio RGB levels support patch

comment:1 Changed 15 years ago by JYA

Description: modified (diff)

comment:3 Changed 15 years ago by stuartm

Ticket locked: set

comment:3 Changed 15 years ago by JYA

Resolution: fixed
Status: newclosed

(In [22431]) Add ITU BT709 colorspace support and studio levels (RGB 16-235) for VDPAU playback

Parameters are set using the custom filter option in the deinterlacer configuration screen. Utilities/Setup? -> Setup -> TV Settings -> Playback -> Playback Profiles -> Custom Filters

studio: will prevent converting to PC levels colorspace=n will set the colorspace to be used. n=0: will use BT709 for HD videos and BT601 for SD n=1 (default): will always use BT601 n=2: will always use BT709

Example: Custom Filters: studio,colorspace=0

Close #7307

Note: See TracTickets for help on using tickets.