[FFmpeg-user] bounty: fix this bug #437 $150

Phil Rhodes phil_rhodes at rocketmail.com
Thu Nov 17 01:37:14 CET 2011


> So my first thought is "does this mean that ffplay should stretch its
> pixel values before displaying them, from [16,235] to [0, 255]"

No, because you can't know what range the input is using. There is often  
no way to indicate this in a file, and even if there is, the contents of  
some files are not what the file states them to be - usually because of  
exactly this situation occurring in some previous processing step.

The only way to fix this is to allow the user to specify what the input  
and output is. Last time I looked at this - maybe up to a year ago? -  
there was the facility in ffmpeg's codebase to ask for this sort of luma  
scaling, but no way to specify it from the command line. I'm not sure if  
this is still the case.

> (which is the same as converting them to full swing...I guess?)  At
> least then the bug is only in ffplay, which is...better than having it
> elsewhere I suppose.

It's not really a bug, it's an unknowable fact about the input and output  
video. The only way to fix it is to ask the user what they think the input  
is and what the output should be.

Computer software has traditionally shown an almost wilful ignorance of  
the fact that 0 isn't black to some (most?) video and because of this a  
very difficult situation has been allowed to arise. Bummer, eh?

P


More information about the ffmpeg-user mailing list