On Wed, Jan 20, 2016 at 5:10 AM, Diego Biurrun <[email protected]> wrote:
> On Tue, Jan 19, 2016 at 07:45:25PM -0500, Vittorio Giovara wrote:
>> --- a/libavcodec/eatqi.c
>> +++ b/libavcodec/eatqi.c
>> @@ -35,69 +35,177 @@
>>
>> +/* Based off mpeg1_decode_block_intra from mpeg12dec.c */
>
> s/Based off/Duplicated from/

it's not strictly duplicated as it has some simplifications, but ok

> I don't see this as an improvement.

why?

>> +static inline int decode_intra_block(AVCodecContext *avctx, int16_t *block,
>> +                                     int index)
>>  {
>> +    TqiContext *t = avctx->priv_data;
>> +    int dc, diff, component;
>> +    int i, j, ret = 0;
>> +    const uint16_t *quant_matrix = t->intra_matrix;
>> +
>> +    /* DC coefficient */
>> +    component = index <= 3 ? 0 : index - 4 + 1;
>> +
>> +    diff = decode_dc(&t->gb, component);
>> +    if (diff >= 0xffff)
>> +        return AVERROR_INVALIDDATA;
>> +
>> +    dc  = t->last_dc[component];
>> +    dc += diff;
>> +    t->last_dc[component] = dc;
>> +
>> +    block[0] = dc * quant_matrix[0];
>> +    ff_dlog(avctx, "dc=%d diff=%d\n", dc, diff);
>> +    i = 0;
>> +
>> +    /* now quantify & encode AC coefficients */
>> +    OPEN_READER(re, &t->gb);
>
> What happened to -Werror=declaration-after-statement?  Does clang not
> even warn?

no it does not, but I spotted it with gcc and fixed locally

>> -static inline void tqi_idct_put(TqiContext *t, AVFrame *frame, int16_t 
>> (*block)[64])
>> +static inline void tqi_idct_put(AVCodecContext *avctx, AVFrame *frame,
>> +                                int16_t (*block)[64])
>>  {
>> -    MpegEncContext *s = &t->s;
>> +    TqiContext *t = avctx->priv_data;
>>      int linesize = frame->linesize[0];
>> -    uint8_t *dest_y  = frame->data[0] + (s->mb_y * 16* linesize            
>> ) + s->mb_x * 16;
>> +    uint8_t *dest_y  = frame->data[0] + (t->mb_y * 16 * linesize          ) 
>> + t->mb_x * 16;
>
> Drop the spaces before ')' while you're at it.

ok
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to