[FFmpeg-devel] [PATCH 2/3] mpegvideo_parser: parse the output picture number

Jan Ekström jeebjp at gmail.com
Tue Mar 6 01:15:13 EET 2018


On Sun, Feb 11, 2018 at 8:31 PM, Jan Ekström <jeebjp at gmail.com> wrote:
> On Sun, Feb 11, 2018 at 7:52 PM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
>>
>> should be ok unless its intended to also restore the MSB
>>
>
> The value seemed to be 10bit and if the pointer is at the position
> right after the picture_start_code, then `buf[0] << 2` would move the
> 8 bits left of data two bits leftwards, and `buf[1] >> 6` would then
> move the topmost bits of the following byte to be the bottom-most
> bits.
>
> Unless you mean that there's a forgotten `(uint16_t)` there as the end
> value has 10 bits of effective data, making the correct way of doing
> it something a la `(((uint16_t)buf[0]) << 2) | (((uint16_t)buf[1]) >>
> 6)`?
>

Ping regarding this part.

Jan


More information about the ffmpeg-devel mailing list