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

Side by Side Diff: third_party/opus/src/silk/MacroCount.h

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Include minor updates including fix for win_clang Created 3 years, 5 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
OLDNEW
1 /*********************************************************************** 1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without 3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions 4 modification, are permitted provided that the following conditions
5 are met: 5 are met:
6 - Redistributions of source code must retain the above copyright notice, 6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer. 7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright 8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the 9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution. 10 documentation and/or other materials provided with the distribution.
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 #undef silk_ADD_POS_SAT32 314 #undef silk_ADD_POS_SAT32
315 static OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ 315 static OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){
316 opus_int32 tmp; 316 opus_int32 tmp;
317 ops_count += 1; 317 ops_count += 1;
318 tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b))); 318 tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b)));
319 return(tmp); 319 return(tmp);
320 } 320 }
321 321
322 #undef silk_ADD_POS_SAT64
323 static OPUS_INLINE opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){
324 opus_int64 tmp;
325 ops_count += 1;
326 tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b)));
327 return(tmp);
328 }
329
330 #undef silk_LSHIFT8 322 #undef silk_LSHIFT8
331 static OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){ 323 static OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){
332 opus_int8 ret; 324 opus_int8 ret;
333 ops_count += 1; 325 ops_count += 1;
334 ret = a << shift; 326 ret = a << shift;
335 return ret; 327 return ret;
336 } 328 }
337 #undef silk_LSHIFT16 329 #undef silk_LSHIFT16
338 static OPUS_INLINE opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){ 330 static OPUS_INLINE opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){
339 opus_int16 ret; 331 opus_int16 ret;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 ops_count += 6; 684 ops_count += 6;
693 685
694 ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \ 686 ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \
695 : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a)))); 687 : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))));
696 688
697 return(ret); 689 return(ret);
698 } 690 }
699 691
700 692
701 #undef silk_LIMIT_32 693 #undef silk_LIMIT_32
702 static OPUS_INLINE opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_ int32 limit2) 694 static OPUS_INLINE opus_int32 silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opu s_int32 limit2)
703 { 695 {
704 opus_int32 ret; 696 opus_int32 ret;
705 ops_count += 6; 697 ops_count += 6;
706 698
707 ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \ 699 ret = ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \
708 : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a)))); 700 : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))));
709 return(ret); 701 return(ret);
710 } 702 }
711 703
712 #else 704 #else
713 #define varDefine 705 #define varDefine
714 #define silk_SaveCount() 706 #define silk_SaveCount()
715 707
716 #endif 708 #endif
717 #endif 709 #endif
718 710
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698