[FFmpeg-devel] 10-bit DNxHD support
Wed Mar 9 15:45:46 CET 2011
> > I'd also like to make you aware of av_clip16, you should use that
> > instead of the If (v<0) v=0 ... code you have there.
> Actually the signal range for HD is 4-1019, written in the specs.
Yes, that applies to the Y component according to specs. My code was clipping RGB values to full range though, which I believe is a fair deal.
Speaking about ranges, VC-3 specs say the range of DCT coefficients is [-1024, 1023] for 8 bit and [-4096, 4095] for 10 bit. However, the values coming from dnxhd_decode_dct_block() are sometimes outside of those ranges, taking into account the bias applied to make them non-negative. I am not sure if it's OK or not, but I did notice ffmpeg doesn't produce pixel-to-pixel identical results compared to Avid's decoder. The difference can most easily be noticed on smooth gradients.
More information about the ffmpeg-devel