So I'm going to summarize my mails, as well as other stuff found in
your branch here:
https://github.com/sasshka/libav/tree/get_bits0
and thus not seen in that initial patchset.

2016-04-27 13:35 GMT+02:00 Alexandra Hájková <[email protected]>:
> Greetings,
> I'd like to introduce a new bitstream reader I wrote. The advantages of the 
> new bitreader are:
>  * it is easier to use:
>  for example there is just one function to read 0-32 bits instead of
>  3 of them in the get_bits.h
>  * it is more consistent and easier to follow (macros are not needed anymore)
>  * it is better documented
>  * it is faster for some decoders (no speed loss when not faster)

1) Generated code size increase

e.g. the VLC code reading that I noticed to quintuple in size.
get_vlc2 uses/used av_always_inline and its equivalent
bitstream_read_vlc still does.
I expect Golomb & somewhat larger ones to also be affected.

That's likely a side effect of the new optimized functions, but it
would be nice trying to find something in between.

2) Golomb replacement

This doesn't go as smoothly as for get_bits. As far as I have
understood, the branch has separate patches, but it would need to be
squashed to be compilable (useful for regression tracking).
I would suggest, although it is tedious, to add temporary files for
the new implementation. It's too bad git doesn't seem to allow making
copies and thus preserving history.

And last but not least, although you've optimized it, Golomb parsing
actually shows the shortcomings of the new code. I have tried porting
code making heavy use of it, and there's a major slowdown (15%) there.

By the way, some bonus points:
- Although it is internal and the obvious reply is that libav doesn't
need it, a documentation for porting old code could be useful
- Shortening the function names (s/bitstream_/bs_/ ? bitstream_"tell"_size?)

I like some of the technical results, but I think there are non-obvious issues.

Best regards,
-- 
Christophe
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to