On Wed, Apr 27, 2016 at 2:49 PM, Luca Barbato <[email protected]> wrote: > On 27/04/16 14:37, Ronald S. Bultje wrote: >> So, have you considered to just change the implementation in get_bits.h >> instead of this new API? I mean, the API looks largely identical - other >> than the prefix. It might even be 100% identical, but I can't be bothered >> to check. Large parts of the implementation look like they're copied also. > > Where exactly? I'm not sure you are reading the same patch or you even > read the front-matter of the set. > > The api is quite different from > > * OPEN_READER(name, gb) > * load gb into local variables > * > * CLOSE_READER(name, gb) > * store local vars in gb > * > * UPDATE_CACHE(name, gb) > * Refill the internal cache from the bitstream. > * After this call at least MIN_CACHE_BITS will be available. > * > * GET_CACHE(name, gb) > * Will output the contents of the internal cache, > * next bit is MSB of 32 or 64 bit (FIXME 64bit). > * > * SHOW_UBITS(name, gb, num) > * Will return the next num bits. > * > * SHOW_SBITS(name, gb, num) > * Will return the next num bits and do sign extension. > * > * SKIP_BITS(name, gb, num) > * Will skip over the next num bits. > * Note, this is equivalent to SKIP_CACHE; SKIP_COUNTER. > * > * SKIP_CACHE(name, gb, num) > * Will remove the next num bits from the cache (note SKIP_COUNTER > * MUST be called before UPDATE_CACHE / CLOSE_READER). > * > * SKIP_COUNTER(name, gb, num) > * Will increment the internal bit counter (see SKIP_CACHE & SKIP_BITS). > * > * LAST_SKIP_BITS(name, gb, num) >
That is all internal, and any external code calls get_bits(context, count), the new one has a different name, but otherwise identical signature. - Hendrik _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
