OSDN Git Service

vatrace: always printf RefPicList
authorAustin Yuan <shengquan.yuan@intel.com>
Fri, 28 Jun 2013 07:24:18 +0000 (15:24 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 17 Mar 2014 01:31:05 +0000 (09:31 +0800)
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit e9e685fe752b9865ba9e28cb63e18ce3f8aed2a0)

va/va_trace.c

index 5c4b468..fa79d4b 100644 (file)
@@ -1344,18 +1344,21 @@ static void va_TraceVASliceParameterBufferH264(
     va_TraceMsg(idx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
     va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
 
-    if (p->slice_type == 0 || p->slice_type == 1) {
-        va_TraceMsg(idx, "\tRefPicList0 =");
-        for (i = 0; (i < p->num_ref_idx_l0_active_minus1 + 1 && i < 32); i++) {
-            va_TraceMsg(idx, "%08d-%08d-0x%08x-%08d-0x%08x\n", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt, p->RefPicList0[i].picture_id, p->RefPicList0[i].frame_idx,  p->RefPicList0[i].flags);
-        }
-        if (p->slice_type == 1) {
-            va_TraceMsg(idx, "\tRefPicList1 =");
-            for (i = 0; (i < p->num_ref_idx_l1_active_minus1 + 1 && i < 32); i++)
-            {
-                va_TraceMsg(idx, "%08d-%08d-0x%08x-%08d-0x%08x\n", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt, p->RefPicList1[i].picture_id, p->RefPicList1[i].frame_idx, p->RefPicList1[i].flags);
-            }
-        }
+    va_TraceMsg(idx, "\tRefPicList0 =");
+    for (i = 0; i < 32; i++) {
+        if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
+            ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
+        va_TraceMsg(idx, "%08d-%08d-0x%08x-%08d-0x%08x\n", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt, p->RefPicList0[i].picture_id, p->RefPicList0[i].frame_idx,  p->RefPicList0[i].flags);
+        else
+            break;
+    }
+    va_TraceMsg(idx, "\tRefPicList1 =");
+    for (i = 0; i < 32; i++) {
+        if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
+            ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
+            va_TraceMsg(idx, "%08d-%08d-0x%08x-%08d-0x%08x\n", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt, p->RefPicList1[i].picture_id, p->RefPicList1[i].frame_idx, p->RefPicList1[i].flags);
+        else
+            break;
     }
     
     va_TraceMsg(idx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);
@@ -1626,37 +1629,33 @@ static void va_TraceVAEncSliceParameterBufferH264(
     va_TraceMsg(idx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
     va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
 
-    if (p->slice_type == 0 || p->slice_type == 1) {
-        va_TraceMsg(idx, "\tRefPicList0 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
-        for (i = 0; i < 32; i++) {
-            if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
-                ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
-                va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
-                            p->RefPicList0[i].TopFieldOrderCnt,
-                            p->RefPicList0[i].BottomFieldOrderCnt,
-                            p->RefPicList0[i].picture_id,
-                            p->RefPicList0[i].frame_idx,
-                            p->RefPicList0[i].flags);
-            else
-                break;
-        }
+    va_TraceMsg(idx, "\tRefPicList0 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
+    for (i = 0; i < 32; i++) {
+        if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
+            ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
+            va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
+                        p->RefPicList0[i].TopFieldOrderCnt,
+                        p->RefPicList0[i].BottomFieldOrderCnt,
+                        p->RefPicList0[i].picture_id,
+                        p->RefPicList0[i].frame_idx,
+                        p->RefPicList0[i].flags);
+        else
+            break;
     }
     
-    if (p->slice_type == 1) {
-        va_TraceMsg(idx, "\tRefPicList1 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
-        for (i = 0; i < 32; i++) {
-            if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
-                ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0))
-                va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08d\n",
-                            p->RefPicList1[i].TopFieldOrderCnt,
-                            p->RefPicList1[i].BottomFieldOrderCnt,
-                            p->RefPicList1[i].picture_id,
-                            p->RefPicList1[i].frame_idx,
-                            p->RefPicList1[i].flags
-                            );
-            else
-                break;
-        }
+    va_TraceMsg(idx, "\tRefPicList1 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
+    for (i = 0; i < 32; i++) {
+        if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
+            ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0))
+            va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08d\n",
+                        p->RefPicList1[i].TopFieldOrderCnt,
+                        p->RefPicList1[i].BottomFieldOrderCnt,
+                        p->RefPicList1[i].picture_id,
+                        p->RefPicList1[i].frame_idx,
+                        p->RefPicList1[i].flags
+                        );
+        else
+            break;
     }
     
     va_TraceMsg(idx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);