On 04/05/16 03:56, Vittorio Giovara wrote:
> On Tue, May 3, 2016 at 2:14 PM, Luca Barbato <[email protected]> wrote:
>> On 04/05/16 00:50, Vittorio Giovara wrote:
>>> IMO Anton is right wrt common/uncommon, but Kieran is right for the
>>> trailing number being confusing.
>>> I would propose bitstream_uintread and bitstream_longread which would
>>> make it perfectly clear the maximum length of the read value.
>>
>> _32 and _63 is the least misleading naming, _uintread and _longread
>> fails to deliver the important information and confuses even more.
So far I'm seeing:
- bitstream_${something}read
That one is as confusing with the bonus points of not being clear
(is it at most or the amount?) and not state the actual size.
- bitstream_read/bitstream_read_long
That one is just completely implicit, no idea on what long means
until you read the fine documentation.
- bitstream_read_${atmost}
Here the confusion would be that there are other function that embed
the number as exact value and not atleast value.
- bitstream_read_atmost${atmost}
As above but even more explicit
Assuming you want to read 42 bits, which naming scheme would prevent you
from use the wrong function or at least make you question if you would
have to use another?
I'm still not seeing how seeing
v = bitstream_read_32(bc, 11);
would confuse somebody btw.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel