summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libtremor/floor0.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libtremor/floor0.c')
-rw-r--r--apps/codecs/libtremor/floor0.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/apps/codecs/libtremor/floor0.c b/apps/codecs/libtremor/floor0.c
index 5062450748..075bc36ef7 100644
--- a/apps/codecs/libtremor/floor0.c
+++ b/apps/codecs/libtremor/floor0.c
@@ -200,16 +200,19 @@ static void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
#else
- qi*=labs(ilsp[0]-wi);
- pi*=labs(ilsp[1]-wi);
-
- for(j=3;j<m;j+=2){
- if(!(shift=MLOOP_1[(pi|qi)>>25]))
- if(!(shift=MLOOP_2[(pi|qi)>>19]))
- shift=MLOOP_3[(pi|qi)>>16];
- qi=(qi>>shift)*labs(ilsp[j-1]-wi);
- pi=(pi>>shift)*labs(ilsp[j]-wi);
- qexp+=shift;
+ j=1;
+ if(m>1){
+ qi*=labs(ilsp[0]-wi);
+ pi*=labs(ilsp[1]-wi);
+
+ for(j+=2;j<m;j+=2){
+ if(!(shift=MLOOP_1[(pi|qi)>>25]))
+ if(!(shift=MLOOP_2[(pi|qi)>>19]))
+ shift=MLOOP_3[(pi|qi)>>16];
+ qi=(qi>>shift)*labs(ilsp[j-1]-wi);
+ pi=(pi>>shift)*labs(ilsp[j]-wi);
+ qexp+=shift;
+ }
}
if(!(shift=MLOOP_1[(pi|qi)>>25]))
if(!(shift=MLOOP_2[(pi|qi)>>19]))