On 9/25/11 12:26 PM, Janne Grunau wrote:
From: Carl Eugen Hoyos<ceho...@ag.or.at>

Copy the Inter 8x8 scaling list as second 8x8 matrix into DXVA2's
quantization matrix data structure instead of a potentially unset
Intra chroma scaling matrix.

Fix dxva2 decoding for some H264 samples.

I assume it works, could you just please use i instead of j? it would feel more consistent.

Signed-off-by: Janne Grunau<janne-li...@jannau.net>
---
  libavcodec/dxva2_h264.c |   14 ++++++++------
  1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 090bce6..5d9fa15 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -162,17 +162,19 @@ static void fill_scaling_lists(struct dxva_context *ctx, 
const H264Context *h, D
              for (j = 0; j<  16; j++)
                  qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][j];

-        for (i = 0; i<  2; i++)
-            for (j = 0; j<  64; j++)
-                qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][j];
+        for (j = 0; j<  64; j++) {
+            qm->bScalingLists8x8[0][j] = h->pps.scaling_matrix8[0][j];
+            qm->bScalingLists8x8[1][j] = h->pps.scaling_matrix8[3][j];
+        }
      } else {
          for (i = 0; i<  6; i++)
              for (j = 0; j<  16; j++)
                  qm->bScalingLists4x4[i][j] = 
h->pps.scaling_matrix4[i][zigzag_scan[j]];

-        for (i = 0; i<  2; i++)
-            for (j = 0; j<  64; j++)
-                qm->bScalingLists8x8[i][j] = 
h->pps.scaling_matrix8[i][ff_zigzag_direct[j]];
+        for (j = 0; j<  64; j++) {
+            qm->bScalingLists8x8[0][j] = 
h->pps.scaling_matrix8[0][ff_zigzag_direct[j]];
+            qm->bScalingLists8x8[1][j] = 
h->pps.scaling_matrix8[3][ff_zigzag_direct[j]];
+        }
      }
  }


_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to