hardware/intel/intel-driver
Révision | 36d07d4c21892d76cc3d62bb57f8aa933fd2b159 (tree) |
---|---|
l'heure | 2015-09-06 16:13:58 |
Auteur | Lim Siew Hoon <siew.hoon.lim@inte...> |
Commiter | Xiang, Haihao |
Fix memset initialize value for huff_size_table and huff_code_table
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit d69346b33e31efac0e7338bc24718eef76f329da)
@@ -2908,8 +2908,8 @@ convert_hufftable_to_codes(VAHuffmanTableBufferJPEGBaseline *huff_buffer, uint32 | ||
2908 | 2908 | uint8_t huff_size_table[huff_val_size+1]; //The +1 for adding 0 at the end of huff_val_size |
2909 | 2909 | uint16_t huff_code_table[huff_val_size]; |
2910 | 2910 | |
2911 | - memset(huff_size_table, 0, huff_val_size); | |
2912 | - memset(huff_code_table, 0, huff_val_size); | |
2911 | + memset(huff_size_table, 0, sizeof(huff_size_table)); | |
2912 | + memset(huff_code_table, 0, sizeof(huff_code_table)); | |
2913 | 2913 | |
2914 | 2914 | huff_bits = (type == 0) ? (huff_buffer->huffman_table[index].num_dc_codes) : (huff_buffer->huffman_table[index].num_ac_codes); |
2915 | 2915 | huff_vals = (type == 0) ? (huff_buffer->huffman_table[index].dc_values) : (huff_buffer->huffman_table[index].ac_values); |