Changeset 4528
- Timestamp:
- 08/02/07 14:36:03 (6 years ago)
- Location:
- SigProc/trunk/SigProc
- Files:
-
- 12 modified
-
. (modified) (1 prop)
-
.ignore (modified) (1 diff)
-
Doxyfile (modified) (1 diff)
-
Makefile.am (modified) (1 diff)
-
SigProc.h (modified) (3 diffs)
-
fec_conv.cpp (modified) (1 diff)
-
filters.cpp (modified) (9 diffs)
-
modem.cpp (modified) (1 diff)
-
pll.cpp (modified) (1 diff)
-
scaling.cpp (modified) (1 diff)
-
sources.cpp (modified) (1 diff)
-
utility.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
SigProc/trunk/SigProc
- Property svn:ignore
-
old new 3 3 autotest 4 4 autotest.cpp 5 doc s5 documentation 6 6 html 7 7 latex
-
- Property svn:ignore
-
SigProc/trunk/SigProc/.ignore
r4394 r4528 3 3 autotest 4 4 autotest.cpp 5 doc s5 documentation 6 6 html 7 7 latex -
SigProc/trunk/SigProc/Doxyfile
r4394 r4528 31 31 # where doxygen was started. If left blank the current directory will be used. 32 32 33 OUTPUT_DIRECTORY = 33 OUTPUT_DIRECTORY = documentation 34 34 35 35 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -
SigProc/trunk/SigProc/Makefile.am
r4394 r4528 46 46 47 47 # --- documentation --- 48 .PHONY: docs documentation 48 49 49 50 docs : -
SigProc/trunk/SigProc/SigProc.h
r4394 r4528 3 3 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE Decimator.6 7 OSSIE Decimator is free software; you can redistribute it and/or modify8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version.11 12 OSSIE Decimator is distributed in the hope that it will be useful,13 but WITHOUT ANY WARRANTY; without even the implied warranty of5 This file is part of the OSSIE Signal Processing Library. 6 7 OSSIE Signal Processing Library is free software; you can redistribute it 8 and/or modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the License, 10 or (at your option) any later version. 11 12 OSSIE Signal Processing Library is distributed in the hope that it will be 13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 15 GNU General Public License for more details. 16 16 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Decimator; if not, write to the Free Software19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA17 You should have received a copy of the GNU General Public License along 18 with OSSIE Signal Processing Library; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 21 21 … … 871 871 } 872 872 873 874 enum DemodScheme { 875 HARD = 0, 876 SOFT_TRUE = 1, 877 SOFT_STANDARD = 2, 878 SOFT_HIGHSNR = 3 879 }; 880 881 void DemodQAM(unsigned int M, signed short X, signed short Y, DemodScheme scheme, signed char *bitsOut); 882 883 void DemodPSK(unsigned int M, signed short X, signed short Y, DemodScheme scheme, signed char *bitsOut); 884 885 886 887 #define BPSK_LEVEL 10000 ///< BPSK amplitude (RMS=10000) 888 889 #define QPSK_LEVEL 7071 ///< QPSK amplitude (RMS=10000) 890 891 #define PSK8_LEVEL_1 7071 ///< Low 8-PSK amplitude (RMS=10000) 892 #define PSK8_LEVEL_2 10000 ///< High 8-PSK amplitude (RMS=10000) 893 894 #define QAM16_LEVEL_1 3162 ///< Low 16-QAM amplitude (RMS=10000) 895 #define QAM16_LEVEL_2 9487 ///< High 16-QAM amplitude (RMS=10000) 896 897 #define PAM4_LEVEL_1 4472 ///< Low 4-PAM amplitude (RMS=10000) 898 #define PAM4_LEVEL_2 13416 ///< High 4-PAM amplitude (RMS=10000) 873 // enum DemodScheme { 874 // HARD = 0, 875 // SOFT_TRUE = 1, 876 // SOFT_STANDARD = 2, 877 // SOFT_HIGHSNR = 3 878 // }; 879 880 // void DemodQAM(unsigned int M, signed short X, signed short Y, DemodScheme scheme, signed char *bitsOut); 881 882 // void DemodPSK(unsigned int M, signed short X, signed short Y, DemodScheme scheme, signed char *bitsOut); 883 884 885 #define BPSK_LEVEL 10000 ///< BPSK amplitude (RMS=10000) 886 #define QPSK_LEVEL 7071 ///< QPSK amplitude (RMS=10000) 887 #define PSK8_LEVEL_1 7071 ///< Low 8-PSK amplitude (RMS=10000) 888 #define PSK8_LEVEL_2 10000 ///< High 8-PSK amplitude (RMS=10000) 889 #define QAM16_LEVEL_1 3162 ///< Low 16-QAM amplitude (RMS=10000) 890 #define QAM16_LEVEL_2 9487 ///< High 16-QAM amplitude (RMS=10000) 891 #define PAM4_LEVEL_1 4472 ///< Low 4-PAM amplitude (RMS=10000) 892 #define PAM4_LEVEL_2 13416 ///< High 4-PAM amplitude (RMS=10000) 899 893 900 894 /// Modulates a symbol into an I/Q pair for binary phase shift keying … … 935 929 936 930 #define QAM16_THRESHOLD 6324 ///< 16-QAM threshold for RMS=10000 signal 937 #define PAM4_THRESHOLD 8944///< 4-PAM threshold for RMS=10000 signal931 #define PAM4_THRESHOLD 8944 ///< 4-PAM threshold for RMS=10000 signal 938 932 939 933 /// -
SigProc/trunk/SigProc/fec_conv.cpp
r4187 r4528 1 /**************************************************************************** 2 3 Copyright 2007, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.11 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 10 11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 Lesser GNU General Public License for more details. 16 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/ -
SigProc/trunk/SigProc/filters.cpp
r4176 r4528 1 /**************************************************************************** 2 3 Copyright 2006, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.11 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 10 11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 Lesser GNU General Public License for more details. 16 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/ … … 486 486 487 487 for (unsigned int i = 0; i < len_a; ++i) 488 A[i] = a_coeff[i];488 A[i] = a_coeff[i]; 489 489 490 490 for (unsigned int i = 0; i < len_b; ++i) 491 B[i] = b_coeff[i];491 B[i] = b_coeff[i]; 492 492 493 493 if (len_A > len_B) 494 len_v = len_A;494 len_v = len_A; 495 495 else 496 len_v = len_B;496 len_v = len_B; 497 497 498 498 v = new float[len_v]; 499 499 500 for (unsigned int i = 0; i < len_v; ++i)501 v[i] = 0;502 503 }504 505 void iir_filter::ResetBuffer()506 {507 500 for (unsigned int i = 0; i < len_v; ++i) 508 501 v[i] = 0; 502 503 } 504 505 void iir_filter::ResetBuffer() 506 { 507 for (unsigned int i = 0; i < len_v; ++i) 508 v[i] = 0; 509 509 } 510 510 … … 518 518 for (unsigned int i = 1; i < len_A; ++i) { 519 519 520 --v_idx;521 if (v_idx < 0)522 v_idx += len_v;523 524 v[next_v] -= (short) (A[i] * v[v_idx]);525 520 --v_idx; 521 if (v_idx < 0) 522 v_idx += len_v; 523 524 v[next_v] -= (short) (A[i] * v[v_idx]); 525 526 526 } 527 527 … … 531 531 532 532 for (unsigned int i = 0; i < len_B; ++i) { 533 out += (B[i] * v[v_idx]);534 535 --v_idx;536 if (v_idx < 0)537 v_idx += len_v;533 out += (B[i] * v[v_idx]); 534 535 --v_idx; 536 if (v_idx < 0) 537 v_idx += len_v; 538 538 } 539 539 … … 541 541 542 542 if (out < SHRT_MIN) 543 y = SHRT_MIN;543 y = SHRT_MIN; 544 544 else if (out > SHRT_MAX) 545 y = SHRT_MAX;545 y = SHRT_MAX; 546 546 else 547 y = (short) out;547 y = (short) out; 548 548 } 549 549 … … 561 561 for (unsigned int i = 0; i < len_a; ++i) 562 562 #ifdef FPM 563 A[i] = mad_f_tofixed(a_coeff[i]);563 A[i] = mad_f_tofixed(a_coeff[i]); 564 564 #else 565 A[i] = a_coeff[i];565 A[i] = a_coeff[i]; 566 566 #endif 567 567 568 568 569 569 for (unsigned int i = 0; i < len_v; ++i) 570 v[i] = 0;570 v[i] = 0; 571 571 572 572 … … 582 582 583 583 if (!run_filter) { // Do not create an output value 584 y = 0;585 return;584 y = 0; 585 return; 586 586 } 587 587 … … 594 594 595 595 for (unsigned int i = 0; i < len_A; ++i) { 596 if (v[v_idx]) {596 if (v[v_idx]) { 597 597 #ifdef FPM 598 out = mad_f_add(out, mad_f_mul(A[i], v[v_idx]));598 out = mad_f_add(out, mad_f_mul(A[i], v[v_idx])); 599 599 #else 600 out += (A[i] * v[v_idx]);600 out += (A[i] * v[v_idx]); 601 601 #endif 602 }603 604 --v_idx;605 if (v_idx < 0)606 v_idx += len_v;602 } 603 604 --v_idx; 605 if (v_idx < 0) 606 v_idx += len_v; 607 607 } 608 608 609 609 #ifdef FPM 610 y = (short) out;610 y = (short) out; 611 611 #else 612 612 if (out < SHRT_MIN) 613 y = SHRT_MIN;613 y = SHRT_MIN; 614 614 else if (out > SHRT_MAX) 615 y = SHRT_MAX;615 y = SHRT_MAX; 616 616 else 617 y = (short) out;617 y = (short) out; 618 618 #endif 619 619 } … … 623 623 624 624 for (unsigned int i = 0; i < len_v; ++i) 625 v[i] = 0;625 v[i] = 0; 626 626 627 627 next_v = 0; -
SigProc/trunk/SigProc/modem.cpp
r4505 r4528 1 /**************************************************************************** 2 3 Copyright 2007, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.11 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 10 11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 Lesser GNU General Public License for more details. 16 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/ -
SigProc/trunk/SigProc/pll.cpp
r4176 r4528 1 /**************************************************************************** 2 3 Copyright 2006, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 11 10 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 LesserGNU General Public License for more details.14 GNU General Public License for more details. 16 15 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/ -
SigProc/trunk/SigProc/scaling.cpp
r4176 r4528 1 /**************************************************************************** 2 3 Copyright 2006, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.11 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 10 11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 Lesser GNU General Public License for more details. 16 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/ -
SigProc/trunk/SigProc/sources.cpp
r4176 r4528 1 /**************************************************************************** 2 3 Copyright 2006, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 11 10 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 LesserGNU General Public License for more details.14 GNU General Public License for more details. 16 15 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/ -
SigProc/trunk/SigProc/utility.cpp
r4176 r4528 1 /**************************************************************************** 2 3 Copyright 2006, Virginia Polytechnic Institute and State University 1 /**************************************************************************** 2 Copyright 2005,2006 Virginia Polytechnic Institute and State University 4 3 5 4 This file is part of the OSSIE Signal Processing Library. 6 5 7 OSSIE Core Framework is free software; you can redistribute it and/or modify8 it under the terms of the Lesser GNU General Public License as published by 9 the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version.6 OSSIE Signal Processing Library is free software; you can redistribute it 7 and/or modify it under the terms of the GNU General Public License as 8 published by the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 11 10 12 The OSSIE Signal Processing library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of11 OSSIE Signal Processing Library is distributed in the hope that it will be 12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 LesserGNU General Public License for more details.14 GNU General Public License for more details. 16 15 17 You should have received a copy of the Lesser GNU General Public License 18 along with OSSIE Core Framework; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 You should have received a copy of the GNU General Public License along 17 with OSSIE Signal Processing Library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 20 21 21 ****************************************************************************/