Page MenuHome

YUV->RGB: Color clamping 16-235 in all motion pictures (ffmpeg)
Closed, ResolvedPublic

Description

Summary: When loading a motion picture file using ffmpeg, the resultant images are clamped in YUV->RGB translation. This is a result of inconsistent flagging in source files. Needless to say, all motion picture files with YUV transforms will exhibit this scaling to comply with broadcast standards. In a post production environment however, it results in a degraded image.

Version: SVN 27966

Reproduction: 1) Load a motion picture file of x264 or like YUV variety. 2) View a histogram or output PNG from it. Note clamped results from standard 0-255 to 16-235 range.

Additional Information: This is discussed with samples at http://yellowsblog.wordpress.com/2009/09/10/video-import-into-blender/

Event Timeline

Also impacts textures, the sequencer, and many other areas that use motion picture files for uptake.

I have created a patch that hopefully addresses this. It is based off of code that was submitted in ffmpeg proper to fix the same issue with regards to PNG output.

The patch is here - http://projects.blender.org/tracker/index.php?func=detail&aid=21889&group_id=9&atid=127

Also see https://projects.blender.org/tracker/index.php?func=detail&aid=19352&group_id=9&atid=125

patch in svn, thanks!

Matt Ebb (broken) changed the task status from Unknown Status to Resolved.Apr 8 2010, 5:38 AM