diff options
author | Yaowu Xu <yaowu@google.com> | 2011-12-06 07:37:39 -0800 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2011-12-07 10:56:39 -0800 |
commit | b1823a7dd290b233739fa437673d9ff385d5f273 (patch) | |
tree | 13d77ca48e9c3fe33b164898d68f55744c6855b7 /vp8/encoder/encodeframe.c | |
parent | d0e3acf98cc24db8bbb75119d7384e4b673c5ecf (diff) | |
download | libvpx-b1823a7dd290b233739fa437673d9ff385d5f273.tar libvpx-b1823a7dd290b233739fa437673d9ff385d5f273.tar.gz libvpx-b1823a7dd290b233739fa437673d9ff385d5f273.tar.bz2 libvpx-b1823a7dd290b233739fa437673d9ff385d5f273.zip |
fixed a crash when MODE_STATS is enabled
The MODE_STATS macro was used to #ifdef around code for mode entropy
stats collection, this commit fixed a crash when MODE_STATS is on.
The commit also changed a number of array definitions to use defined
macros instead of hard-coded numbers.
Change-Id: I114592f53a1e44e31e455f5725f036ae6168735a
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r-- | vp8/encoder/encodeframe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index ac3058106..9474b999d 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -65,10 +65,10 @@ static void adjust_act_zbin( VP8_COMP *cpi, MACROBLOCK *x ); #ifdef MODE_STATS -unsigned int inter_y_modes[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +unsigned int inter_y_modes[MB_MODE_COUNT] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; unsigned int inter_uv_modes[VP8_UV_MODES] = {0, 0, 0, 0}; -unsigned int inter_b_modes[15] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -unsigned int y_modes[VP8_YMODES] = {0, 0, 0, 0, 0}; +unsigned int inter_b_modes[B_MODE_COUNT] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +unsigned int y_modes[VP8_YMODES] = {0, 0, 0, 0, 0, 0}; unsigned int i8x8_modes[VP8_I8X8_MODES]={0 }; unsigned int uv_modes[VP8_UV_MODES] = {0, 0, 0, 0}; unsigned int uv_modes_y[VP8_YMODES][VP8_UV_MODES]= @@ -80,7 +80,7 @@ unsigned int uv_modes_y[VP8_YMODES][VP8_UV_MODES]= {0, 0, 0, 0}, {0, 0, 0, 0} }; -unsigned int b_modes[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +unsigned int b_modes[B_MODE_COUNT] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; #endif |