[Libva] [PATCH 2/6] add YUY2->YV12 conversion in post processing
Zhao halley
halley.zhao at intel.com
Wed May 30 02:18:21 PDT 2012
---
src/i965_post_processing.c | 56 ++++++++++++++++++++++++++++++++++++++++++++
src/i965_post_processing.h | 3 +-
2 files changed, 58 insertions(+), 1 deletions(-)
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index 98bbfa9..a720a99 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -103,6 +103,10 @@ static const uint32_t pp_pa_load_save_nv12_gen5[][4] = {
#include "shaders/post_processing/gen5_6/pa_load_save_nv12.g4b.gen5"
};
+static const uint32_t pp_pa_load_save_pl3_gen5[][4] = {
+#include "shaders/post_processing/gen5_6/pa_load_save_pl3.g4b.gen5"
+};
+
static VAStatus pp_null_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
const struct i965_surface *src_surface,
const VARectangle *src_rect,
@@ -291,6 +295,18 @@ static struct pp_module pp_modules_gen5[] = {
pp_plx_load_save_plx_initialize,
},
+ {
+ {
+ "PA_PL3 module",
+ PP_PA_LOAD_SAVE_PL3,
+ pp_pa_load_save_pl3_gen5,
+ sizeof(pp_pa_load_save_pl3_gen5),
+ NULL,
+ },
+
+ pp_plx_load_save_plx_initialize,
+ },
+
};
static const uint32_t pp_null_gen6[][4] = {
@@ -341,6 +357,10 @@ static const uint32_t pp_pa_load_save_nv12_gen6[][4] = {
#include "shaders/post_processing/gen5_6/pa_load_save_nv12.g6b"
};
+static const uint32_t pp_pa_load_save_pl3_gen6[][4] = {
+#include "shaders/post_processing/gen5_6/pa_load_save_pl3.g6b"
+};
+
static struct pp_module pp_modules_gen6[] = {
{
{
@@ -484,6 +504,18 @@ static struct pp_module pp_modules_gen6[] = {
pp_plx_load_save_plx_initialize,
},
+
+ {
+ {
+ "PA_PL3 module",
+ PP_PA_LOAD_SAVE_PL3,
+ pp_pa_load_save_pl3_gen6,
+ sizeof(pp_pa_load_save_pl3_gen6),
+ NULL,
+ },
+
+ pp_plx_load_save_plx_initialize,
+ },
};
@@ -526,6 +558,8 @@ static const uint32_t pp_pl3_load_save_pa_gen7[][4] = {
};
static const uint32_t pp_pa_load_save_nv12_gen7[][4] = {
};
+static const uint32_t pp_pa_load_save_pl3_gen7[][4] = {
+};
static VAStatus gen7_pp_plx_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
const struct i965_surface *src_surface,
@@ -689,6 +723,18 @@ static struct pp_module pp_modules_gen7[] = {
pp_plx_load_save_plx_initialize,
},
+
+ {
+ {
+ "PA_PL3 module",
+ PP_PA_LOAD_SAVE_PL3,
+ pp_pa_load_save_pl3_gen7,
+ sizeof(pp_pa_load_save_pl3_gen7),
+ NULL,
+ },
+
+ pp_plx_load_save_plx_initialize,
+ },
};
@@ -4000,6 +4046,16 @@ i965_image_pl1_processing(VADriverContextP ctx,
PP_PA_LOAD_SAVE_NV12,
NULL);
}
+ else if (fourcc == VA_FOURCC_YV12) {
+ i965_post_processing_internal(ctx, i965->pp_context,
+ src_surface,
+ src_rect,
+ dst_surface,
+ dst_rect,
+ PP_PA_LOAD_SAVE_PL3,
+ NULL);
+
+ }
else {
return VA_STATUS_ERROR_UNKNOWN;
}
diff --git a/src/i965_post_processing.h b/src/i965_post_processing.h
index 398bd02..21e525c 100755
--- a/src/i965_post_processing.h
+++ b/src/i965_post_processing.h
@@ -50,9 +50,10 @@ enum
PP_NV12_LOAD_SAVE_PA,
PP_PL3_LOAD_SAVE_PA,
PP_PA_LOAD_SAVE_NV12,
+ PP_PA_LOAD_SAVE_PL3,
};
-#define NUM_PP_MODULES 12
+#define NUM_PP_MODULES 13
struct i965_post_processing_context;
--
1.7.5.4
More information about the Libva
mailing list