summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFritz Koenig <frkoenig@google.com>2011-11-04 15:35:42 -0700
committerFritz Koenig <frkoenig@google.com>2011-11-04 18:19:26 -0700
commitf0c01413fb2d8a4db9ba6965ca2ee64edd0a0517 (patch)
tree12ff9d22daf9b66e4325c4fcc328df26fb7fe31b
parent44b5f76e3476e27840371539cf68ed04a6f85c6c (diff)
downloadlibvpx-f0c01413fb2d8a4db9ba6965ca2ee64edd0a0517.tar
libvpx-f0c01413fb2d8a4db9ba6965ca2ee64edd0a0517.tar.gz
libvpx-f0c01413fb2d8a4db9ba6965ca2ee64edd0a0517.tar.bz2
libvpx-f0c01413fb2d8a4db9ba6965ca2ee64edd0a0517.zip
Compiler warning fix for const array.
Fix compiler warning for passing a non const array to a function expecting a const array by using an intermediary pointer and casting. Change-Id: I9bdd358ebdc926223993fb8fb2098ffedd2f3fc7
-rw-r--r--vp8/encoder/bitstream.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index 45086cbbe..748b60778 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -1214,20 +1214,20 @@ static int independent_coef_context_savings(VP8_COMP *cpi)
int k = 0;
unsigned int prev_coef_count_sum[MAX_ENTROPY_TOKENS] = {0};
int prev_coef_savings[MAX_ENTROPY_TOKENS] = {0};
+ const unsigned int (*probs)[MAX_ENTROPY_TOKENS];
/* Calculate new probabilities given the constraint that
* they must be equal over the prev coef contexts
*/
+
+ probs = (const unsigned int (*)[MAX_ENTROPY_TOKENS])
+ cpi->coef_counts[i][j];
+
+ /* Reset to default probabilities at key frames */
if (cpi->common.frame_type == KEY_FRAME)
- {
- /* Reset to default probabilities at key frames */
- sum_probs_over_prev_coef_context(default_coef_counts[i][j],
- prev_coef_count_sum);
- }
- else
- {
- sum_probs_over_prev_coef_context(cpi->coef_counts[i][j],
- prev_coef_count_sum);
- }
+ probs = default_coef_counts[i][j];
+
+ sum_probs_over_prev_coef_context(probs, prev_coef_count_sum);
+
do
{
/* at every context */