On 12/07/2012 02:40 AM, Christophe Gisquet wrote:
> 2012/12/6 Justin Ruggles <justin.rugg...@gmail.com>:
>> +static int decode_subframe(TAKDecContext *s, int32_t *decoded,
>> +                           int subframe_size, int prev_subframe_size)
>> +{
> [...]
>> +    emms_c();
> [...]
>> +static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
> [...]
>> +        emms_c();
> 
> This is minor, but couldn't those emms be moved instead to:
> 
>> +            for (i = 0; i < chan; i++) {
>> +                if (s->mcdparams[i].present && s->mcdparams[i].index == 1)
>> +                    if (ret = decode_channel(s, s->mcdparams[i].chan2))
>> +                        return ret;
>> +
>> +                if (ret = decode_channel(s, s->mcdparams[i].chan1))
>> +                    return ret;
>> +
>> +                if (s->mcdparams[i].present) {
>> +                    s->dmode = mc_dmodes[s->mcdparams[i].index];
>> +                    if (ret = decorrelate(s,
>> +                                          s->mcdparams[i].chan2,
>> +                                          s->mcdparams[i].chan1,
>> +                                          s->nb_samples - 1))
>> +                        return ret;
>> +                }
> 
> Changing those return to "goto dsp_cleanup;" and
> 
>> +            }
>> +        }
> 
>> +    *got_frame_ptr   = 1;
>> +    *(AVFrame *)data = s->frame;
>> +
>> +    return pkt->size;
>> +}
> 
> having here instead:
> ret = pkt->size;
> dsp_cleanup:
> emms_c();
> return ret;
> 
> This is more error-prone, but I don't see any FP processing in between.

I don't think it's worth it. I don't believe in complicating code for
the benefit of MMX. A small benefit at that.

-Justin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to