History

swresample/resample: simplify index/consumed calculation for the filter = 1 case

Michael Niedermayer committed 12 years ago

Commit 5e379cd1 parent 6c8ee741 file · +2 −2Browse files

Showing the changes to libswresample (1 of 1 file). Show all

Unified · Split

libswresample/resample_template.c+2−2
@@ -116,8 +116,8 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int · 115 unmodified lines
116 index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr;116 index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr;
117 frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr;117 frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr;
118 av_assert2(index >= 0);118 av_assert2(index >= 0);
119 *consumed= index >> c->phase_shift;119 *consumed= index;
120 index &= c->phase_mask;120 index = 0;
121 }else if(compensation_distance == 0 && !c->linear && index >= 0){121 }else if(compensation_distance == 0 && !c->linear && index >= 0){
122 int sample_index = 0;122 int sample_index = 0;
123 for(dst_index=0; dst_index < dst_size; dst_index++){123 for(dst_index=0; dst_index < dst_size; dst_index++){

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t