On Sun, Jun 28, 2020 at 20:13:28 +0530, gautamr...@gmail.com wrote:
> +            int val;
> +            if (bytestream2_get_bytes_left(&s->g) < 1)
> +                return AVERROR_INVALIDDATA;
> +            if (sign) {
> +                val = bytestream2_get_byte(&s->g) + (1 << (depth - 1));
> +                val <<= (8 - depth);
> +                *(line + j) = val;
> +            } else {
> +                val = bytestream2_get_byteu(&s->g);
> +                val <<= (8 - depth);
> +                *(line + j) = val;
> +            }

I may be missing something, but it looks like you are duplicating code
in if() and else which could be put behind their blocks.

> +            if (sign) {
> +                val = (int16_t)bytestream2_get_be16(&s->g) + (1 << (depth - 
> 1));
> +                val <<= (16 - depth);
> +                *(line + j) = val;
> +            } else {
> +                val = bytestream2_get_be16u(&s->g);
> +                val <<= (16 - depth);
> +                *(line + j) = val;
> +            }

Same here.


Apart from that, all reference samples seem to be probed, demuxed and
decoded successfully (but I didn't look at the decoding result).

Moritz
_______________________________________________
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