[FFmpeg-devel] [PATCH 5/7] avcodec/dpx: improve decoding of 10 bit gray images
Carl Eugen Hoyos
ceffmpeg at gmail.com
Fri Dec 7 14:48:45 EET 2018
2018-12-06 20:34 GMT+01:00, Paul B Mahol <onemda at gmail.com>:
> + temp = *lbuf >> shift & 0x3FF;
> + *lbuf = *lbuf >> 10;
> +
> + return temp;
> +}
> +
> static uint16_t read10in32(const uint8_t **ptr, uint32_t * lbuf,
> int * n_datum, int is_big, int shift)
> {
> @@ -385,13 +403,17 @@ static int decode_frame(AVCodecContext *avctx,
> (uint16_t*)ptr[1],
> (uint16_t*)ptr[2],
> (uint16_t*)ptr[3]};
> - int shift = packing == 1 ? 22 : 20;
> + int shift = elements > 1 ? packing == 1 ? 22 : 20 : packing ==
> 1 ? 2 : 0;
I still find this hard to read but if you cannot simplify please commit.
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list