[Ffmpeg-devel] huffyuv.c: encode_frame() and decode_frame() return values.

Tomas Carnecky tom
Sat Mar 18 19:14:02 CET 2006

encode_frame() adds the size of the Huffman tables to the return value,
eg. the return value is the total from the Huffman tables and the actual
encoded frame. But decode_frame() returns only the size of the decoded
frame, without the Huffman tables. This of course only happens when
avctx->context_model is enabled.
Is this the correct behavior? I so some sanity checks with the return
values from these two functions and it fails in that case.

a possible fix: change the return statement in decode_frame:

return (get_bits_count(&s->gb)+31)/32*4 + table_size;

If you have further questions, CC me, I'm not on this list.


More information about the ffmpeg-devel mailing list