OSDN Git Service

decoder: Remove the dependency on H.264 picture parameter
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 20 Jun 2014 15:52:31 +0000 (23:52 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Sat, 13 Dec 2014 16:26:08 +0000 (00:26 +0800)
Only POC is needed in the algorithm

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit a91fbfdda1529af65690e87b46706c9c45dd3754)

src/i965_decoder_utils.c

index 9f3cc68..7772130 100644 (file)
@@ -572,11 +572,11 @@ compare_avc_ref_store_func(const void *p1, const void *p2)
     return fs1->ref_age - fs2->ref_age;
 }
 
-void
-intel_update_avc_frame_store_index(
+static void
+intel_update_codec_frame_store_index(
     VADriverContextP              ctx,
     struct decode_state          *decode_state,
-    VAPictureParameterBufferH264 *pic_param,
+    int poc,
     GenFrameStore                 frame_store[MAX_GEN_REFERENCE_FRAMES],
     GenFrameStoreContext         *fs_ctx
 )
@@ -587,7 +587,6 @@ intel_update_avc_frame_store_index(
     int i, n, num_free_refs;
 
     /* Detect changes of access unit */
-    const int poc = avc_get_picture_poc(&pic_param->CurrPic);
     if (fs_ctx->age == 0 || fs_ctx->prev_poc != poc)
         fs_ctx->age++;
     fs_ctx->prev_poc = poc;
@@ -652,6 +651,22 @@ intel_update_avc_frame_store_index(
 }
 
 void
+intel_update_avc_frame_store_index(
+    VADriverContextP              ctx,
+    struct decode_state          *decode_state,
+    VAPictureParameterBufferH264 *pic_param,
+    GenFrameStore                 frame_store[MAX_GEN_REFERENCE_FRAMES],
+    GenFrameStoreContext         *fs_ctx
+)
+{
+    intel_update_codec_frame_store_index(ctx,
+                                         decode_state,
+                                         avc_get_picture_poc(&pic_param->CurrPic),
+                                         frame_store,
+                                         fs_ctx);
+}
+
+void
 gen75_update_avc_frame_store_index(
     VADriverContextP              ctx,
     struct decode_state          *decode_state,