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

Side by Side Diff: celt/bands.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 | « aclocal.m4 ('k') | celt/celt.c » ('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) 2008-2009 Gregory Maxwell 3 Copyright (c) 2008-2009 Gregory Maxwell
4 Written by Jean-Marc Valin and Gregory Maxwell */ 4 Written by Jean-Marc Valin and Gregory Maxwell */
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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 iside = 0; 898 iside = 0;
899 fill &= (1<<B)-1; 899 fill &= (1<<B)-1;
900 delta = -16384; 900 delta = -16384;
901 } else if (itheta == 16384) 901 } else if (itheta == 16384)
902 { 902 {
903 imid = 0; 903 imid = 0;
904 iside = 32767; 904 iside = 32767;
905 fill &= ((1<<B)-1)<<B; 905 fill &= ((1<<B)-1)<<B;
906 delta = 16384; 906 delta = 16384;
907 } else { 907 } else {
908 imid = bitexact_cos(itheta); 908 imid = bitexact_cos((opus_int16)itheta);
909 iside = bitexact_cos(16384-itheta); 909 iside = bitexact_cos((opus_int16)(16384-itheta));
910 /* This is the mid vs side allocation that minimizes squared error 910 /* This is the mid vs side allocation that minimizes squared error
911 in that band. */ 911 in that band. */
912 delta = FRAC_MUL16((N-1)<<7,bitexact_log2tan(iside,imid)); 912 delta = FRAC_MUL16((N-1)<<7,bitexact_log2tan(iside,imid));
913 } 913 }
914 914
915 #ifdef FIXED_POINT 915 #ifdef FIXED_POINT
916 mid = imid; 916 mid = imid;
917 side = iside; 917 side = iside;
918 #else 918 #else
919 mid = (1.f/32768)*imid; 919 mid = (1.f/32768)*imid;
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 collapse_masks[i*C+0] = (unsigned char)x_cm; 1293 collapse_masks[i*C+0] = (unsigned char)x_cm;
1294 collapse_masks[i*C+C-1] = (unsigned char)y_cm; 1294 collapse_masks[i*C+C-1] = (unsigned char)y_cm;
1295 balance += pulses[i] + tell; 1295 balance += pulses[i] + tell;
1296 1296
1297 /* Update the folding position only as long as we have 1 bit/sample depth */ 1297 /* Update the folding position only as long as we have 1 bit/sample depth */
1298 update_lowband = b>(N<<BITRES); 1298 update_lowband = b>(N<<BITRES);
1299 } 1299 }
1300 RESTORE_STACK; 1300 RESTORE_STACK;
1301 } 1301 }
1302 1302
OLDNEW
« no previous file with comments | « aclocal.m4 ('k') | celt/celt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698