Re: [FFmpeg-devel] [PATCH 6/7] get_bits: change refill to RAD pattern

2020-04-15 Thread Christophe Gisquet
Hi, Le mar. 14 avr. 2020 à 12:25, Christophe Gisquet a écrit : > if (is_le) > -s->cache |= (cache_type)AV_RL_HALF(s->ptr) << s->bits_left; > +s->cache |= (cache_type)AV_RL_ALL(s->ptr) << s->bits_left; > else > -s->cache |= (cache_type)AV_RB_HALF(s->ptr) << (BITST

[FFmpeg-devel] [PATCH 6/7] get_bits: change refill to RAD pattern

2020-04-14 Thread Christophe Gisquet
Described as variant 4 in the linked article. Results in faster and smaller code. Also, cases for the "refill_all" cases (usually when we want to empty/fill it) have been inlined. --- libavcodec/get_bits.h | 103 +- 1 file changed, 41 insertions(+), 62 delet