mirror of https://git.ffmpeg.org/ffmpeg.git
swr: update calling code to support mixed packed planar SIMD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e8dd7928c8
commit
fec3700dcd
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue