Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 5 years ago

Closed 5 years ago

#7307 closed enhancement (fixed)

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

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

Description (last modified by jyavenard)

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 jyavenard 5 years ago.
BT709 colorspace and studio RGB levels support patch

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by jyavenard

BT709 colorspace and studio RGB levels support patch

comment:1 Changed 5 years ago by jyavenard

  • Description modified (diff)

comment:3 Changed 5 years ago by stuartm

  • Ticket locked set

comment:3 Changed 5 years ago by jyavenard

  • Resolution set to fixed
  • Status changed from new to closed

(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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.