[FFmpeg-devel] [PATCH] avcodec: add Brooktree ProSumer Video decoder

Paul B Mahol onemda at gmail.com
Thu Aug 23 15:19:38 EEST 2018


On 8/23/18, Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Wed, Aug 22, 2018 at 06:00:54PM +0200, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>  libavcodec/Makefile     |   1 +
>>  libavcodec/allcodecs.c  |   1 +
>>  libavcodec/avcodec.h    |   1 +
>>  libavcodec/codec_desc.c |   7 +
>>  libavcodec/prosumer.c   | 405 ++++++++++++++++++++++++++++++++++++++++
>>  libavformat/riff.c      |   1 +
>>  6 files changed, 416 insertions(+)
>>  create mode 100644 libavcodec/prosumer.c
>>

[...]

>> +            }
>> +            pos = bytestream2_tell(gb) ^ 2;
>> +            bytestream2_seek(gb, pos, SEEK_SET);
>> +            AV_WN16(&a, bytestream2_peek_le16(gb));
>> +            pos = pos ^ 2;
>> +            bytestream2_seek(gb, pos, SEEK_SET);
>> +            bytestream2_skip(gb, 2);
>> +            cnt = 4;
>> +            idx--;
>> +        }
>
>> +        b = PAIR(4, a) >> 16;
>
> I think this assumes sizeof(int) == 4, this is not guranteed it could be 8

Fixed locally.


More information about the ffmpeg-devel mailing list