mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
swr: add and use function pointers for rematrix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
00fea26faf
commit
aab5a4521c
4 changed files with 29 additions and 30 deletions
|
|
@ -314,7 +314,7 @@ av_assert0(s->out.ch_count);
|
|||
|
||||
s->dither = s->preout;
|
||||
|
||||
if(s->rematrix)
|
||||
if(s->rematrix || s->dither_method)
|
||||
return swri_rematrix_init(s);
|
||||
|
||||
return 0;
|
||||
|
|
@ -554,8 +554,9 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
|
|||
|
||||
if(s->dither_pos + out_count > s->dither.count)
|
||||
s->dither_pos = 0;
|
||||
|
||||
for(ch=0; ch<preout->ch_count; ch++)
|
||||
swri_sum2(s->int_sample_fmt, preout->ch[ch], preout->ch[ch], s->dither.ch[ch] + s->dither.bps * s->dither_pos, 1, 1, out_count);
|
||||
s->mix_2_1_f(preout->ch[ch], preout->ch[ch], s->dither.ch[ch] + s->dither.bps * s->dither_pos, s->native_one, 0, 0, out_count);
|
||||
|
||||
s->dither_pos += out_count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue