[Libva] [PATCH] jpeg: fix submission of quantization and Huffman tables.

Gwenole Beauchesne gb.devel at gmail.com
Mon May 28 07:07:49 PDT 2012


Upload quantiser and Huffman tables only if they are marked as dirty.
i.e. the user requested to load them.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
 src/gen7_mfd.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gen7_mfd.c b/src/gen7_mfd.c
index ff1c15f..c4f001a 100644
--- a/src/gen7_mfd.c
+++ b/src/gen7_mfd.c
@@ -2121,6 +2121,8 @@ gen7_mfd_jpeg_huff_table_state(VADriverContextP ctx,
 
     for (index = 0; index < num_tables; index++) {
         int id = va_to_gen7_jpeg_hufftable[index];
+        if (!huffman_table->load_huffman_table[index])
+            continue;
         BEGIN_BCS_BATCH(batch, 53);
         OUT_BCS_BATCH(batch, MFX_JPEG_HUFF_TABLE_STATE | (53 - 2));
         OUT_BCS_BATCH(batch, id);
@@ -2164,6 +2166,9 @@ gen7_mfd_jpeg_qm_state(VADriverContextP ctx,
         unsigned char raster_qm[64];
         int j;
 
+        if (!iq_matrix->load_quantiser_table[pic_param->components[index].quantiser_table_selector])
+            continue;
+
         assert(precision == 8);
 
         for (j = 0; j < 64; j++)
-- 
1.7.5.4



More information about the Libva mailing list