]> git.videolan.org Git - x264.git/commitdiff
analyse: "It correct the size of array i_mb_b16x8_cost_table
authorLaurent Aimar <fenrir@videolan.org>
Fri, 22 Jul 2005 15:43:16 +0000 (15:43 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 22 Jul 2005 15:43:16 +0000 (15:43 +0000)
   from 16 to 17,otherwise,it can result a mismatch of b16x8
   mb type cost and can result memory read overflow on it." Patch by lurui.

git-svn-id: svn://svn.videolan.org/x264/trunk@278 df754926-b1dd-0310-bc7b-ec298dee348c

encoder/analyse.c

index 959abb66d2e90891a9538af44f8fb646a63a5820..4740759a60794866ce833ea5ef5567378e33c4b4 100644 (file)
@@ -152,8 +152,8 @@ static const uint8_t block_idx_y[16] = {
 static const int i_mb_b_cost_table[19] = {
     9, 9, 9, 9, 0, 0, 0, 1, 3, 7, 7, 7, 3, 7, 7, 7, 5, 9, 0
 };
-static const int i_mb_b16x8_cost_table[16] = {
-    0, 0, 0, 0, 0, 0, 0, 5, 7, 7, 7, 5, 7, 9, 9, 9
+static const int i_mb_b16x8_cost_table[17] = {
+    0, 0, 0, 0, 0, 0, 0, 5, 7, 7, 7, 5, 7, 9, 9, 9, 9
 };
 static const int i_sub_mb_b_cost_table[13] = {
     7, 5, 5, 3, 7, 5, 7, 3, 7, 7, 7, 5, 1