Commit fec3700d authored by Michael Niedermayer's avatar Michael Niedermayer

swr: update calling code to support mixed packed planar SIMD

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e8dd7928
......@@ -154,15 +154,19 @@ int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len
//FIXME optimize common cases
if(ctx->simd_f && !ctx->ch_map){
int planes = out->planar ? out->ch_count : 1;
off = len/16 * 16;
av_assert1(out->planar == in->planar);
av_assert1(off>=0);
if(off>0)
for(ch=0; ch<planes; ch++){
ctx->simd_f(out->ch+ch, in->ch+ch, off * (out->planar ? 1 :out->ch_count));
}
av_assert1(off<=len);
if(off>0){
if(out->planar == in->planar){
int planes = out->planar ? out->ch_count : 1;
for(ch=0; ch<planes; ch++){
ctx->simd_f(out->ch+ch, in->ch+ch, off * (out->planar ? 1 :out->ch_count));
}
}else{
ctx->simd_f(out->ch, in->ch, off);
}
}
if(off == len)
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment