>> +    if (container_word_bits && (container_word_bits+7)/8 != 
>> + (word_bits+7)/8) {
>
>Can it happen that word_bits is anything but 16 or 24 with a valid stream? If 
>not then I'd check container_word_bits == word_bits && (word_bits == 16 || 
>word_bits == 24) or so
word_bits may be 20, and in that case container_word_bits must be 24 (this is 
the case in my fate test), so I think this is correct.

>> +    while ((container_word_bits == 24 || !IS_16LE_MARKER(state))
>> +        && (container_word_bits == 16 || !IS_20LE_MARKER(state) && 
>> + !IS_24LE_MARKER(state))) {
>
>I'd rewrite this as while ((bits == 24 && (20LE || 24LE)) || (bits ==20 && 
>16LE)), more readable
container_word_bits may be 0 for autodetect, this results in this expression...
I agree it is not that great for readability, but doing otherwise would require 
some additions and macros duplications, for example:
while ( !(!bits && LE) || !(bits == 24 && (20LE || 24LE)) || !(bits ==16 && 
16LE))
Sounds heavy, not sure this is really better ?

Nicolas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to