[FFmpeg-devel] [libav-devel] [RFC] Cineform HD questions

Kieran Kunhya kierank at obe.tv
Thu Dec 31 07:02:12 CET 2015

On 31 December 2015 at 04:28, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Wed, Dec 30, 2015 at 8:13 PM, Kieran Kunhya <kierank at obe.tv> wrote:
>> This patch is the first attempt at getting a working Cineform HD decoder into avcodec
>> It supports YUV422P10 files which are the majority of files in the wild
>> There are some files not supported such as those from film scanners and some older files which do something unusual with chroma and the transform.
>> Also files which are cut awkwardly will infinite loop in the coefficient decoding because of a lack of escape symbol.
>> The big question is how to organise the coefficients - at the moment all the buffers are hardcoded.
> I glanced at the patch, most of the tables seem trivially derivable at
> runtime. I can help with more concrete ideas if you place a comment
> above the tables with a link to where you got them: ideally a
> mathematical/algorithmic derivation, but in the absence of that, a
> link to where you got them from. On the plus side, this is nowhere
> near as bad as dcadec tables, but we don't want to repeat such things
> unless there is no alternative.

They are huffman tables from the spec and binary decoder. They are
already runtime extended in order to include the sign bit for each
coefficient. I'm not sure what more can be runtime generated.

> Apart from that, again from a quick glance, there are a ton of
> mallocs/frees. Can these somehow get consolidated?

Yes, that's what I don't know how to solve easily. They should of
course be a single allocated buffer that's reused.


More information about the ffmpeg-devel mailing list