Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: celt/cwrs.c

Issue 12388030: Update Opus to 1.0.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « celt/celt.c ('k') | celt/ecintrin.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2007-2008 CSIRO 1 /* Copyright (c) 2007-2008 CSIRO
2 Copyright (c) 2007-2009 Xiph.Org Foundation 2 Copyright (c) 2007-2009 Xiph.Org Foundation
3 Copyright (c) 2007-2009 Timothy B. Terriberry 3 Copyright (c) 2007-2009 Timothy B. Terriberry
4 Written by Timothy B. Terriberry and Jean-Marc Valin */ 4 Written by Timothy B. Terriberry and Jean-Marc Valin */
5 /* 5 /*
6 Redistribution and use in source and binary forms, with or without 6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions 7 modification, are permitted provided that the following conditions
8 are met: 8 are met:
9 9
10 - Redistributions of source code must retain the above copyright 10 - Redistributions of source code must retain the above copyright
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 len=_k+2; 330 len=_k+2;
331 /*We require storage at least 3 values (e.g., _k>0).*/ 331 /*We require storage at least 3 values (e.g., _k>0).*/
332 celt_assert(len>=3); 332 celt_assert(len>=3);
333 _u[0]=0; 333 _u[0]=0;
334 _u[1]=um2=1; 334 _u[1]=um2=1;
335 #ifndef SMALL_FOOTPRINT 335 #ifndef SMALL_FOOTPRINT
336 /*_k>52 doesn't work in the false branch due to the limits of INV_TABLE, 336 /*_k>52 doesn't work in the false branch due to the limits of INV_TABLE,
337 but _k isn't tested here because k<=52 for n=7*/ 337 but _k isn't tested here because k<=52 for n=7*/
338 if(_n<=6) 338 if(_n<=6)
339 #endif 339 #endif
340 { 340 {
341 /*If _n==0, _u[0] should be 1 and the rest should be 0.*/ 341 /*If _n==0, _u[0] should be 1 and the rest should be 0.*/
342 /*If _n==1, _u[i] should be 1 for i>1.*/ 342 /*If _n==1, _u[i] should be 1 for i>1.*/
343 celt_assert(_n>=2); 343 celt_assert(_n>=2);
344 /*If _k==0, the following do-while loop will overflow the buffer.*/ 344 /*If _k==0, the following do-while loop will overflow the buffer.*/
345 celt_assert(_k>0); 345 celt_assert(_k>0);
346 k=2; 346 k=2;
347 do _u[k]=(k<<1)-1; 347 do _u[k]=(k<<1)-1;
348 while(++k<len); 348 while(++k<len);
349 for(k=2;k<_n;k++)unext(_u+1,_k+1,1); 349 for(k=2;k<_n;k++)unext(_u+1,_k+1,1);
350 } 350 }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 SAVE_STACK; 636 SAVE_STACK;
637 ALLOC(u,_k+2U,opus_uint32); 637 ALLOC(u,_k+2U,opus_uint32);
638 cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); 638 cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u);
639 RESTORE_STACK; 639 RESTORE_STACK;
640 #ifndef SMALL_FOOTPRINT 640 #ifndef SMALL_FOOTPRINT
641 } 641 }
642 break; 642 break;
643 } 643 }
644 #endif 644 #endif
645 } 645 }
OLDNEW
« no previous file with comments | « celt/celt.c ('k') | celt/ecintrin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698