Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 267854 | Differences between
and this patch

Collapse All | Expand All

(-)./libspeex/cb_search.c.dist (-4 / +10 lines)
Lines 255-260 int complexity, Link Here
255
int   update_target
255
int   update_target
256
)
256
)
257
{
257
{
258
   int inner_done, outer_done;
258
   int i,j,k,m,n,q;
259
   int i,j,k,m,n,q;
259
   VARDECL(spx_word16_t *resp);
260
   VARDECL(spx_word16_t *resp);
260
#ifdef _USE_SSE
261
#ifdef _USE_SSE
Lines 364-371 int update_target Link Here
364
         steps (e.g. NaNs) */
365
         steps (e.g. NaNs) */
365
      for (j=0;j<N;j++)
366
      for (j=0;j<N;j++)
366
         best_nind[j] = best_ntarget[j] = 0;
367
         best_nind[j] = best_ntarget[j] = 0;
368
369
      outer_done = 0;
370
367
      /*For all n-bests of previous subvector*/
371
      /*For all n-bests of previous subvector*/
368
      for (j=0;j<N;j++)
372
      for (j=0;j<N && !outer_done;j++)
369
      {
373
      {
370
         spx_word16_t *x=ot[j]+subvect_size*i;
374
         spx_word16_t *x=ot[j]+subvect_size*i;
371
         spx_word32_t tener = 0;
375
         spx_word32_t tener = 0;
Lines 391-397 int update_target Link Here
391
            /*update n-best list*/
395
            /*update n-best list*/
392
            if (err<ndist[N-1])
396
            if (err<ndist[N-1])
393
            {
397
            {
394
               for (m=0;m<N;m++)
398
               inner_done = 0;
399
400
               for (m=0;m<N && !inner_done;m++)
395
               {
401
               {
396
                  if (err < ndist[m])
402
                  if (err < ndist[m])
397
                  {
403
                  {
Lines 405-417 int update_target Link Here
405
                     ndist[m] = err;
411
                     ndist[m] = err;
406
                     best_nind[n] = best_index[k];
412
                     best_nind[n] = best_index[k];
407
                     best_ntarget[n] = j;
413
                     best_ntarget[n] = j;
408
                     break;
414
                     inner_done = 1;
409
                  }
415
                  }
410
               }
416
               }
411
            }
417
            }
412
         }
418
         }
413
         if (i==0)
419
         if (i==0)
414
            break;
420
            outer_done=1;
415
      }
421
      }
416
      for (j=0;j<N;j++)
422
      for (j=0;j<N;j++)
417
      {
423
      {
(-)./libspeex/ltp.c.dist (-2 / +6 lines)
Lines 172-177 static inline spx_word32_t compute_pitch Link Here
172
#ifndef OVERRIDE_OPEN_LOOP_NBEST_PITCH
172
#ifndef OVERRIDE_OPEN_LOOP_NBEST_PITCH
173
void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t *gain, int N, char *stack)
173
void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t *gain, int N, char *stack)
174
{
174
{
175
   int loop_done;
175
   int i,j,k;
176
   int i,j,k;
176
   VARDECL(spx_word32_t *best_score);
177
   VARDECL(spx_word32_t *best_score);
177
   VARDECL(spx_word32_t *best_ener);
178
   VARDECL(spx_word32_t *best_ener);
Lines 268-275 void open_loop_nbest_pitch(spx_word16_t Link Here
268
         best_score[N-1]=tmp;
269
         best_score[N-1]=tmp;
269
         best_ener[N-1]=ener16[i-start]+1;
270
         best_ener[N-1]=ener16[i-start]+1;
270
         pitch[N-1]=i;
271
         pitch[N-1]=i;
272
273
         loop_done = 0;
274
271
         /* Check if it comes in front of others */
275
         /* Check if it comes in front of others */
272
         for (j=0;j<N-1;j++)
276
         for (j=0;j<N-1 && !loop_done;j++)
273
         {
277
         {
274
            if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start])))
278
            if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start])))
275
            {
279
            {
Lines 282-288 void open_loop_nbest_pitch(spx_word16_t Link Here
282
               best_score[j]=tmp;
286
               best_score[j]=tmp;
283
               best_ener[j]=ener16[i-start]+1;
287
               best_ener[j]=ener16[i-start]+1;
284
               pitch[j]=i;
288
               pitch[j]=i;
285
               break;
289
               loop_done=1;
286
            }
290
            }
287
         }
291
         }
288
      }
292
      }
(-)./libspeex/sb_celp.c.dist (-2 / +6 lines)
Lines 303-308 void sb_encoder_destroy(void *state) Link Here
303
303
304
int sb_encode(void *state, void *vin, SpeexBits *bits)
304
int sb_encode(void *state, void *vin, SpeexBits *bits)
305
{
305
{
306
   int loop_done;
306
   SBEncState *st;
307
   SBEncState *st;
307
   int i, roots, sub;
308
   int i, roots, sub;
308
   char *stack;
309
   char *stack;
Lines 461-467 int sb_encode(void *state, void *vin, Sp Link Here
461
         st->relative_quality+=1.0*(ratio+2);
462
         st->relative_quality+=1.0*(ratio+2);
462
	 if (st->relative_quality<-1)
463
	 if (st->relative_quality<-1)
463
            st->relative_quality=-1;
464
            st->relative_quality=-1;
464
         while (modeid)
465
466
         loop_done = 0;
467
468
         while (modeid && !loop_done)
465
         {
469
         {
466
            int v1;
470
            int v1;
467
            float thresh;
471
            float thresh;
Lines 472-478 int sb_encode(void *state, void *vin, Sp Link Here
472
               thresh = (st->vbr_quality-v1)   * mode->vbr_thresh[modeid][v1+1] + 
476
               thresh = (st->vbr_quality-v1)   * mode->vbr_thresh[modeid][v1+1] + 
473
                        (1+v1-st->vbr_quality) * mode->vbr_thresh[modeid][v1];
477
                        (1+v1-st->vbr_quality) * mode->vbr_thresh[modeid][v1];
474
            if (st->relative_quality >= thresh && st->sampling_rate*st->submodes[modeid]->bits_per_frame/st->full_frame_size <= st->vbr_max_high)
478
            if (st->relative_quality >= thresh && st->sampling_rate*st->submodes[modeid]->bits_per_frame/st->full_frame_size <= st->vbr_max_high)
475
               break;
479
               loop_done = 1;
476
            modeid--;
480
            modeid--;
477
         }
481
         }
478
         speex_encoder_ctl(state, SPEEX_SET_HIGH_MODE, &modeid);
482
         speex_encoder_ctl(state, SPEEX_SET_HIGH_MODE, &modeid);

Return to bug 267854