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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c

Issue 2986163002: Audit of kConstants missing the const qualifier (Closed)
Patch Set: rebase + constexpr Created 3 years, 4 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 /* Routines for inband signaling of bandwitdh estimation */ 1878 /* Routines for inband signaling of bandwitdh estimation */
1879 /* Histograms based on uniform distribution of indices */ 1879 /* Histograms based on uniform distribution of indices */
1880 /* Move global variables later! */ 1880 /* Move global variables later! */
1881 1881
1882 1882
1883 /* cdf array for frame length indicator */ 1883 /* cdf array for frame length indicator */
1884 const uint16_t kFrameLenCdf[4] = { 1884 const uint16_t kFrameLenCdf[4] = {
1885 0, 21845, 43690, 65535}; 1885 0, 21845, 43690, 65535};
1886 1886
1887 /* pointer to cdf array for frame length indicator */ 1887 /* pointer to cdf array for frame length indicator */
1888 const uint16_t *kFrameLenCdfPtr[1] = {kFrameLenCdf}; 1888 const uint16_t * const kFrameLenCdfPtr[1] = {kFrameLenCdf};
1889 1889
1890 /* initial cdf index for decoder of frame length indicator */ 1890 /* initial cdf index for decoder of frame length indicator */
1891 const uint16_t kFrameLenInitIndex[1] = {1}; 1891 const uint16_t kFrameLenInitIndex[1] = {1};
1892 1892
1893 1893
1894 int WebRtcIsacfix_DecodeFrameLen(Bitstr_dec *streamdata, 1894 int WebRtcIsacfix_DecodeFrameLen(Bitstr_dec *streamdata,
1895 size_t *framesamples) 1895 size_t *framesamples)
1896 { 1896 {
1897 1897
1898 int err; 1898 int err;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 return status; 1946 return status;
1947 } 1947 }
1948 1948
1949 /* cdf array for estimated bandwidth */ 1949 /* cdf array for estimated bandwidth */
1950 const uint16_t kBwCdf[25] = { 1950 const uint16_t kBwCdf[25] = {
1951 0, 2731, 5461, 8192, 10923, 13653, 16384, 19114, 21845, 24576, 27306, 30037, 1951 0, 2731, 5461, 8192, 10923, 13653, 16384, 19114, 21845, 24576, 27306, 30037,
1952 32768, 35498, 38229, 40959, 43690, 46421, 49151, 51882, 54613, 57343, 60074, 1952 32768, 35498, 38229, 40959, 43690, 46421, 49151, 51882, 54613, 57343, 60074,
1953 62804, 65535}; 1953 62804, 65535};
1954 1954
1955 /* pointer to cdf array for estimated bandwidth */ 1955 /* pointer to cdf array for estimated bandwidth */
1956 const uint16_t *kBwCdfPtr[1] = {kBwCdf}; 1956 const uint16_t * const kBwCdfPtr[1] = {kBwCdf};
1957 1957
1958 /* initial cdf index for decoder of estimated bandwidth*/ 1958 /* initial cdf index for decoder of estimated bandwidth*/
1959 const uint16_t kBwInitIndex[1] = {7}; 1959 const uint16_t kBwInitIndex[1] = {7};
1960 1960
1961 1961
1962 int WebRtcIsacfix_DecodeSendBandwidth(Bitstr_dec *streamdata, int16_t *BWno) { 1962 int WebRtcIsacfix_DecodeSendBandwidth(Bitstr_dec *streamdata, int16_t *BWno) {
1963 1963
1964 int err; 1964 int err;
1965 int16_t BWno32; 1965 int16_t BWno32;
1966 1966
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 2047
2048 index_gQQ[k] = pos2QQ + WebRtcIsacfix_kQuantMinGain[k]; //ATTN: ok? 2048 index_gQQ[k] = pos2QQ + WebRtcIsacfix_kQuantMinGain[k]; //ATTN: ok?
2049 if (index_gQQ[k] < 0) { 2049 if (index_gQQ[k] < 0) {
2050 index_gQQ[k] = 0; 2050 index_gQQ[k] = 0;
2051 } 2051 }
2052 else if (index_gQQ[k] > WebRtcIsacfix_kMaxIndGain[k]) { 2052 else if (index_gQQ[k] > WebRtcIsacfix_kMaxIndGain[k]) {
2053 index_gQQ[k] = WebRtcIsacfix_kMaxIndGain[k]; 2053 index_gQQ[k] = WebRtcIsacfix_kMaxIndGain[k];
2054 } 2054 }
2055 } 2055 }
2056 } 2056 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698