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

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Aug 23 15:55:21 EEST 2018


2018-08-23 14:51 GMT+02:00, Paul B Mahol <onemda at gmail.com>:
> On 8/23/18, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>> 2018-08-23 14:29 GMT+02:00, Paul B Mahol <onemda at gmail.com>:
>>> On 8/23/18, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>>> 2018-08-23 11:11 GMT+02:00, Paul B Mahol <onemda at gmail.com>:
>>>>> On 8/23/18, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>>>>> 2018-08-22 21:24 GMT+02:00, Paul B Mahol <onemda at gmail.com>:
>>>>>>> On 8/22/18, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>>>>>>> 2018-08-22 18:00 GMT+02:00, Paul B Mahol <onemda at gmail.com>:
>>>>>>>>
>>>>>>>>> +    switch (avctx->bits_per_coded_sample) {
>>>>>>>>> +    case 12:
>>>>>>>>> +         s->stride = 3LL * FFALIGN(avctx->width, 8) >> 1;
>>>>>>>>> +         break;
>>>>>>>>> +    default:
>>>>>>>>> +         return AVERROR_INVALIDDATA;
>>>>>>>>> +    }
>>>>>>>>
>>>>>>>> Why are the condition and the error needed?
>>>>>>>
>>>>>>> Because only that is supported.
>>>>>>
>>>>>> Do valid samples with other values exist?
>>>>>
>>>>> No.
>>>>
>>>> Then I suggest to make the whole block above just:
>>>> s->stride = 3LL * FFALIGN(avctx->width, 8) >> 1;
>>>
>>> Nope, bits per coded sample must be checked.
>>
>> Could you explain why?
>
> Reference decoder checks it, so do we.

Shouldn't we try to decode files if at all possible?

>> Am I correct that no other decoder does that?
>
> Nope.

Which decoder does it?

Carl Eugen


More information about the ffmpeg-devel mailing list