You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
swr: special case for empty channels in rematrix.
Speed += 10% overall for pan=stereo:FL=FL+FR from wav to null.
This commit is contained in:
@@ -280,6 +280,9 @@ int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mus
|
|||||||
|
|
||||||
for(out_i=0; out_i<out->ch_count; out_i++){
|
for(out_i=0; out_i<out->ch_count; out_i++){
|
||||||
switch(s->matrix_ch[out_i][0]){
|
switch(s->matrix_ch[out_i][0]){
|
||||||
|
case 0:
|
||||||
|
memset(out->ch[out_i], 0, len * (s->int_sample_fmt == AV_SAMPLE_FMT_FLT ? sizeof(float) : sizeof(int16_t)));
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
in_i= s->matrix_ch[out_i][1];
|
in_i= s->matrix_ch[out_i][1];
|
||||||
if(mustcopy || s->matrix[out_i][in_i]!=1.0){
|
if(mustcopy || s->matrix[out_i][in_i]!=1.0){
|
||||||
|
Reference in New Issue
Block a user