• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/intel-driver


Commit MetaInfo

Revisiond9572c8d11198f0624ac1aed44c41c0e5930098e (tree)
Zeit2015-12-07 14:31:29
AutorPengfei Qu <Pengfei.Qu@inte...>
CommiterXiang, Haihao

Log Message

VP9 HWDec:add vp9 surface structure and related parameter

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit f36ab3413f814c80f4df4f4570f4ef9a1168b624)

Ändern Zusammenfassung

Diff

--- a/src/i965_defines.h
+++ b/src/i965_defines.h
@@ -437,6 +437,9 @@
437437 #define HCP_PAK_OBJECT HCP(0x21)
438438 #define HCP_INSERT_PAK_OBJECT HCP(0x22)
439439
440+#define HCP_VP9_SEGMENT_STATE HCP(0x32)
441+#define HCP_VP9_PIC_STATE HCP(0x30)
442+
440443 #define I965_DEPTHFORMAT_D32_FLOAT 1
441444
442445 #define BASE_ADDRESS_MODIFY (1 << 0)
@@ -906,6 +909,12 @@
906909
907910 #define HCP_CODEC_HEVC 0
908911
912+#define HCP_CODEC_VP9 1
913+#define HCP_VP9_KEY_FRAME 0
914+#define HCP_VP9_INTER_FRAME 1
915+#define HCP_VP9_PROFILE0 0 /* 8 bit 420 only */
916+#define HCP_VP9_PROFILE2 2 /* 10 bits 420 only */
917+
909918 #define HCP_CODEC_SELECT_DECODE 0
910919 #define HCP_CODEC_SELECT_ENCODE 1
911920
--- a/src/intel_media.h
+++ b/src/intel_media.h
@@ -59,6 +59,17 @@ struct gen_hevc_surface
5959 dri_bo *motion_vector_temporal_bo;
6060 };
6161
62+typedef struct gen_vp9_surface GenVP9Surface;
63+struct gen_vp9_surface
64+{
65+ GenCodecSurface base;
66+ uint16_t frame_width;
67+ uint16_t frame_height;
68+ dri_bo *motion_vector_temporal_bo;
69+};
70+
6271 extern void gen_free_hevc_surface(void **data);
6372
73+extern void gen_free_vp9_surface(void **data);
74+
6475 #endif /* INTEL_MEDIA_H */
--- a/src/intel_media_common.c
+++ b/src/intel_media_common.c
@@ -107,3 +107,27 @@ gen_free_hevc_surface(void **data)
107107
108108 pthread_mutex_unlock(&free_hevc_surface_lock);
109109 }
110+
111+static pthread_mutex_t free_vp9_surface_lock = PTHREAD_MUTEX_INITIALIZER;
112+
113+void gen_free_vp9_surface(void **data)
114+{
115+ GenVP9Surface *vp9_surface;
116+
117+ pthread_mutex_lock(&free_vp9_surface_lock);
118+
119+ vp9_surface = *data;
120+
121+ if (!vp9_surface) {
122+ pthread_mutex_unlock(&free_vp9_surface_lock);
123+ return;
124+ }
125+
126+ dri_bo_unreference(vp9_surface->motion_vector_temporal_bo);
127+ vp9_surface->motion_vector_temporal_bo = NULL;
128+
129+ free(vp9_surface);
130+ *data = NULL;
131+
132+ pthread_mutex_unlock(&free_vp9_surface_lock);
133+}