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

Side by Side Diff: celt/fixed_debug.h

Issue 882843002: Update to opus-HEAD-66611f1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/opus.git@master
Patch Set: Add the contents of Makefile.mips back. Created 5 years, 10 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
« no previous file with comments | « celt/fixed_c5x.h ('k') | celt/fixed_generic.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) 2003-2008 Jean-Marc Valin 1 /* Copyright (C) 2003-2008 Jean-Marc Valin
2 Copyright (C) 2007-2012 Xiph.Org Foundation */ 2 Copyright (C) 2007-2012 Xiph.Org Foundation */
3 /** 3 /**
4 @file fixed_debug.h 4 @file fixed_debug.h
5 @brief Fixed-point operations with debugging 5 @brief Fixed-point operations with debugging
6 */ 6 */
7 /* 7 /*
8 Redistribution and use in source and binary forms, with or without 8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions 9 modification, are permitted provided that the following conditions
10 are met: 10 are met:
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 489 }
490 if (Q==15) 490 if (Q==15)
491 celt_mips+=4; 491 celt_mips+=4;
492 else 492 else
493 celt_mips+=5; 493 celt_mips+=5;
494 return res; 494 return res;
495 } 495 }
496 496
497 #define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15) 497 #define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15)
498 #define MAC16_32_Q15(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q15((a),(b)))) 498 #define MAC16_32_Q15(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q15((a),(b))))
499 #define MAC16_32_Q16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q16((a),(b))))
499 500
500 static OPUS_INLINE int SATURATE(int a, int b) 501 static OPUS_INLINE int SATURATE(int a, int b)
501 { 502 {
502 if (a>b) 503 if (a>b)
503 a=b; 504 a=b;
504 if (a<-b) 505 if (a<-b)
505 a = -b; 506 a = -b;
506 celt_mips+=3; 507 celt_mips+=3;
507 return a; 508 return a;
508 } 509 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 { 761 {
761 fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res , file, line); 762 fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res , file, line);
762 #ifdef FIXED_DEBUG_ASSERT 763 #ifdef FIXED_DEBUG_ASSERT
763 celt_assert(0); 764 celt_assert(0);
764 #endif 765 #endif
765 } 766 }
766 celt_mips+=70; 767 celt_mips+=70;
767 return res; 768 return res;
768 } 769 }
769 770
771 static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x)
772 {
773 x = PSHR32(x, SIG_SHIFT);
774 x = MAX32(x, -32768);
775 x = MIN32(x, 32767);
776 return EXTRACT16(x);
777 }
778 #define SIG2WORD16(x) (SIG2WORD16_generic(x))
779
780
770 #undef PRINT_MIPS 781 #undef PRINT_MIPS
771 #define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", ce lt_mips);} while (0); 782 #define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", ce lt_mips);} while (0);
772 783
773 #endif 784 #endif
OLDNEW
« no previous file with comments | « celt/fixed_c5x.h ('k') | celt/fixed_generic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698