Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 189829 Details for
Bug 267854
Patches to allow media-libs/speex to build on IRIX
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Remove pointer-arithmetic to allow speex to build on IRIX
speex-1.2_rc1-irix.patch (text/plain), 3.67 KB, created by
Stuart Shelton
on 2009-04-29 11:05:46 UTC
(
hide
)
Description:
Remove pointer-arithmetic to allow speex to build on IRIX
Filename:
MIME Type:
Creator:
Stuart Shelton
Created:
2009-04-29 11:05:46 UTC
Size:
3.67 KB
patch
obsolete
>--- ./libspeex/cb_search.c.dist 2009-04-22 17:21:51.110234240 +0100 >+++ ./libspeex/cb_search.c 2009-04-22 17:29:19.640644040 +0100 >@@ -255,6 +255,7 @@ int complexity, > int update_target > ) > { >+ int inner_done, outer_done; > int i,j,k,m,n,q; > VARDECL(spx_word16_t *resp); > #ifdef _USE_SSE >@@ -364,8 +365,11 @@ int update_target > steps (e.g. NaNs) */ > for (j=0;j<N;j++) > best_nind[j] = best_ntarget[j] = 0; >+ >+ outer_done = 0; >+ > /*For all n-bests of previous subvector*/ >- for (j=0;j<N;j++) >+ for (j=0;j<N && !outer_done;j++) > { > spx_word16_t *x=ot[j]+subvect_size*i; > spx_word32_t tener = 0; >@@ -391,7 +395,9 @@ int update_target > /*update n-best list*/ > if (err<ndist[N-1]) > { >- for (m=0;m<N;m++) >+ inner_done = 0; >+ >+ for (m=0;m<N && !inner_done;m++) > { > if (err < ndist[m]) > { >@@ -405,13 +411,13 @@ int update_target > ndist[m] = err; > best_nind[n] = best_index[k]; > best_ntarget[n] = j; >- break; >+ inner_done = 1; > } > } > } > } > if (i==0) >- break; >+ outer_done=1; > } > for (j=0;j<N;j++) > { >--- ./libspeex/ltp.c.dist 2009-04-22 17:30:14.081704680 +0100 >+++ ./libspeex/ltp.c 2009-04-22 17:31:44.178556680 +0100 >@@ -172,6 +172,7 @@ static inline spx_word32_t compute_pitch > #ifndef OVERRIDE_OPEN_LOOP_NBEST_PITCH > 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) > { >+ int loop_done; > int i,j,k; > VARDECL(spx_word32_t *best_score); > VARDECL(spx_word32_t *best_ener); >@@ -268,8 +269,11 @@ void open_loop_nbest_pitch(spx_word16_t > best_score[N-1]=tmp; > best_ener[N-1]=ener16[i-start]+1; > pitch[N-1]=i; >+ >+ loop_done = 0; >+ > /* Check if it comes in front of others */ >- for (j=0;j<N-1;j++) >+ for (j=0;j<N-1 && !loop_done;j++) > { > if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start]))) > { >@@ -282,7 +286,7 @@ void open_loop_nbest_pitch(spx_word16_t > best_score[j]=tmp; > best_ener[j]=ener16[i-start]+1; > pitch[j]=i; >- break; >+ loop_done=1; > } > } > } >--- ./libspeex/sb_celp.c.dist 2009-04-22 17:33:55.139393600 +0100 >+++ ./libspeex/sb_celp.c 2009-04-22 17:36:00.241695320 +0100 >@@ -303,6 +303,7 @@ void sb_encoder_destroy(void *state) > > int sb_encode(void *state, void *vin, SpeexBits *bits) > { >+ int loop_done; > SBEncState *st; > int i, roots, sub; > char *stack; >@@ -461,7 +462,10 @@ int sb_encode(void *state, void *vin, Sp > st->relative_quality+=1.0*(ratio+2); > if (st->relative_quality<-1) > st->relative_quality=-1; >- while (modeid) >+ >+ loop_done = 0; >+ >+ while (modeid && !loop_done) > { > int v1; > float thresh; >@@ -472,7 +476,7 @@ int sb_encode(void *state, void *vin, Sp > thresh = (st->vbr_quality-v1) * mode->vbr_thresh[modeid][v1+1] + > (1+v1-st->vbr_quality) * mode->vbr_thresh[modeid][v1]; > if (st->relative_quality >= thresh && st->sampling_rate*st->submodes[modeid]->bits_per_frame/st->full_frame_size <= st->vbr_max_high) >- break; >+ loop_done = 1; > modeid--; > } > speex_encoder_ctl(state, SPEEX_SET_HIGH_MODE, &modeid);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 267854
:
189827
| 189829