i965_drv_video: implement vaPutImage by post process pipeline
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 28 Jul 2011 01:10:47 +0000 (09:10 +0800)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 25 Aug 2011 12:29:01 +0000 (14:29 +0200)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
14 files changed:
src/i965_drv_video.c
src/i965_drv_video.h
src/i965_post_processing.c
src/i965_post_processing.h
src/shaders/post_processing/Makefile.am
src/shaders/post_processing/nv12_load_save_pl3.asm [new file with mode: 0644]
src/shaders/post_processing/nv12_load_save_pl3.g4b.gen5 [new file with mode: 0644]
src/shaders/post_processing/nv12_load_save_pl3.g6b [new file with mode: 0644]
src/shaders/post_processing/pl3_load_save_nv12.asm [new file with mode: 0644]
src/shaders/post_processing/pl3_load_save_nv12.g4b.gen5 [new file with mode: 0644]
src/shaders/post_processing/pl3_load_save_nv12.g6b [new file with mode: 0644]
src/shaders/post_processing/pl3_load_save_pl3.asm [new file with mode: 0644]
src/shaders/post_processing/pl3_load_save_pl3.g4b.gen5 [new file with mode: 0644]
src/shaders/post_processing/pl3_load_save_pl3.g6b [new file with mode: 0644]

index 3f14015..7839981 100644 (file)
@@ -586,7 +586,55 @@ i965_PutImage(VADriverContextP ctx,
               unsigned int dest_width,
               unsigned int dest_height)
 {
-    return VA_STATUS_SUCCESS;
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    struct object_surface *obj_surface = SURFACE(surface);
+    struct object_image *obj_image = IMAGE(image);
+    struct i965_surface src_surface, dst_surface;
+    VAStatus va_status = VA_STATUS_SUCCESS;
+    VARectangle src_rect, dst_rect;
+
+    if (!obj_surface)
+        return VA_STATUS_ERROR_INVALID_SURFACE;
+
+    if (!obj_image || !obj_image->bo)
+        return VA_STATUS_ERROR_INVALID_IMAGE;
+
+    if (src_x < 0 ||
+        src_y < 0 ||
+        src_x + src_width > obj_image->image.width ||
+        src_y + src_height > obj_image->image.height)
+        return VA_STATUS_ERROR_INVALID_PARAMETER;
+
+    if (dest_x < 0 ||
+        dest_y < 0 ||
+        dest_x + dest_width > obj_surface->orig_width ||
+        dest_y + dest_height > obj_surface->orig_height)
+        return VA_STATUS_ERROR_INVALID_PARAMETER;
+
+    if (!obj_surface->bo)
+        i965_check_alloc_surface_bo(ctx, obj_surface, HAS_TILED_SURFACE(i965), obj_image->image.format.fourcc);
+
+    src_surface.id = image;
+    src_surface.flag = I965_SURFACE_IMAGE;
+    src_rect.x = src_x;
+    src_rect.y = src_y;
+    src_rect.width = src_width;
+    src_rect.height = src_height;
+
+    dst_surface.id = surface;
+    dst_surface.flag = I965_SURFACE_SURFACE;
+    dst_rect.x = dest_x;
+    dst_rect.y = dest_y;
+    dst_rect.width = dest_width;
+    dst_rect.height = dest_height;
+
+    va_status = i965_image_processing(ctx,
+                                      &src_surface,
+                                      &src_rect,
+                                      &dst_surface,
+                                      &dst_rect);
+
+    return  va_status;
 }
 
 VAStatus 
index 9c9a403..c2d9b1d 100644 (file)
 #define INTEL_STR_DRIVER_VENDOR                 "Intel"
 #define INTEL_STR_DRIVER_NAME                   "i965"
 
+#define I965_SURFACE_IMAGE      0
+#define I965_SURFACE_SURFACE    1
+
+struct i965_surface
+{
+    VAGenericID id;
+    int flag;
+};
+
 struct i965_kernel 
 {
     char *name;
index adff453..35f55a6 100644 (file)
@@ -49,10 +49,22 @@ static const uint32_t pp_null_gen5[][4] = {
 #include "shaders/post_processing/null.g4b.gen5"
 };
 
-static const uint32_t pp_nv12_load_save_gen5[][4] = {
+static const uint32_t pp_nv12_load_save_nv12_gen5[][4] = {
 #include "shaders/post_processing/nv12_load_save_nv12.g4b.gen5"
 };
 
+static const uint32_t pp_nv12_load_save_pl3_gen5[][4] = {
+#include "shaders/post_processing/nv12_load_save_pl3.g4b.gen5"
+};
+
+static const uint32_t pp_pl3_load_save_nv12_gen5[][4] = {
+#include "shaders/post_processing/pl3_load_save_nv12.g4b.gen5"
+};
+
+static const uint32_t pp_pl3_load_save_pl3_gen5[][4] = {
+#include "shaders/post_processing/pl3_load_save_pl3.g4b.gen5"
+};
+
 static const uint32_t pp_nv12_scaling_gen5[][4] = {
 #include "shaders/post_processing/nv12_scaling_nv12.g4b.gen5"
 };
@@ -66,20 +78,30 @@ static const uint32_t pp_nv12_dndi_gen5[][4] = {
 };
 
 static void pp_null_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                               VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                               const VARectangle *src_rect, const VARectangle *dst_rect);
+                               const struct i965_surface *src_surface,
+                               const VARectangle *src_rect,
+                               const struct i965_surface *dst_surface,
+                               const VARectangle *dst_rect);
 static void pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                                   VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                                   const VARectangle *src_rect, const VARectangle *dst_rect);
+                                   const struct i965_surface *src_surface,
+                                   const VARectangle *src_rect,
+                                   const struct i965_surface *dst_surface,
+                                   const VARectangle *dst_rect);
 static void pp_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                                       VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                                       const VARectangle *src_rect, const VARectangle *dst_rect);
-static void pp_nv12_load_save_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                                         VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                                         const VARectangle *src_rect, const VARectangle *dst_rect);
+                                       const struct i965_surface *src_surface,
+                                       const VARectangle *src_rect,
+                                       const struct i965_surface *dst_surface,
+                                       const VARectangle *dst_rect);
+static void pp_plx_load_save_plx_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
+                                            const struct i965_surface *src_surface,
+                                            const VARectangle *src_rect,
+                                            const struct i965_surface *dst_surface,
+                                            const VARectangle *dst_rect);
 static void pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                                    VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                                    const VARectangle *src_rect, const VARectangle *dst_rect);
+                                    const struct i965_surface *src_surface,
+                                    const VARectangle *src_rect,
+                                    const struct i965_surface *dst_surface,
+                                    const VARectangle *dst_rect);
 
 static struct pp_module pp_modules_gen5[] = {
     {
@@ -96,14 +118,50 @@ static struct pp_module pp_modules_gen5[] = {
 
     {
         {
-            "NV12 Load & Save module",
-            PP_NV12_LOAD_SAVE,
-            pp_nv12_load_save_gen5,
-            sizeof(pp_nv12_load_save_gen5),
+            "NV12_NV12",
+            PP_NV12_LOAD_SAVE_N12,
+            pp_nv12_load_save_nv12_gen5,
+            sizeof(pp_nv12_load_save_nv12_gen5),
+            NULL,
+        },
+
+        pp_plx_load_save_plx_initialize,
+    },
+
+    {
+        {
+            "NV12_PL3",
+            PP_NV12_LOAD_SAVE_PL3,
+            pp_nv12_load_save_pl3_gen5,
+            sizeof(pp_nv12_load_save_pl3_gen5),
+            NULL,
+        },
+
+        pp_plx_load_save_plx_initialize,
+    },
+
+    {
+        {
+            "PL3_NV12",
+            PP_PL3_LOAD_SAVE_N12,
+            pp_pl3_load_save_nv12_gen5,
+            sizeof(pp_pl3_load_save_nv12_gen5),
             NULL,
         },
 
-        pp_nv12_load_save_initialize,
+        pp_plx_load_save_plx_initialize,
+    },
+
+    {
+        {
+            "PL3_PL3",
+            PP_PL3_LOAD_SAVE_N12,
+            pp_pl3_load_save_pl3_gen5,
+            sizeof(pp_pl3_load_save_pl3_gen5),
+            NULL,
+        },
+
+        pp_plx_load_save_plx_initialize
     },
 
     {
@@ -147,10 +205,22 @@ static const uint32_t pp_null_gen6[][4] = {
 #include "shaders/post_processing/null.g6b"
 };
 
-static const uint32_t pp_nv12_load_save_gen6[][4] = {
+static const uint32_t pp_nv12_load_save_nv12_gen6[][4] = {
 #include "shaders/post_processing/nv12_load_save_nv12.g6b"
 };
 
+static const uint32_t pp_nv12_load_save_pl3_gen6[][4] = {
+#include "shaders/post_processing/nv12_load_save_pl3.g6b"
+};
+
+static const uint32_t pp_pl3_load_save_nv12_gen6[][4] = {
+#include "shaders/post_processing/pl3_load_save_nv12.g6b"
+};
+
+static const uint32_t pp_pl3_load_save_pl3_gen6[][4] = {
+#include "shaders/post_processing/pl3_load_save_pl3.g6b"
+};
+
 static const uint32_t pp_nv12_scaling_gen6[][4] = {
 #include "shaders/post_processing/nv12_scaling_nv12.g6b"
 };
@@ -178,14 +248,50 @@ static struct pp_module pp_modules_gen6[] = {
 
     {
         {
-            "NV12 Load & Save module",
-            PP_NV12_LOAD_SAVE,
-            pp_nv12_load_save_gen6,
-            sizeof(pp_nv12_load_save_gen6),
+            "NV12_NV12",
+            PP_NV12_LOAD_SAVE_N12,
+            pp_nv12_load_save_nv12_gen6,
+            sizeof(pp_nv12_load_save_nv12_gen6),
             NULL,
         },
 
-        pp_nv12_load_save_initialize,
+        pp_plx_load_save_plx_initialize,
+    },
+
+    {
+        {
+            "NV12_PL3",
+            PP_NV12_LOAD_SAVE_PL3,
+            pp_nv12_load_save_pl3_gen6,
+            sizeof(pp_nv12_load_save_pl3_gen6),
+            NULL,
+        },
+        
+        pp_plx_load_save_plx_initialize,
+    },
+
+    {
+        {
+            "PL3_NV12",
+            PP_PL3_LOAD_SAVE_N12,
+            pp_pl3_load_save_nv12_gen6,
+            sizeof(pp_pl3_load_save_nv12_gen6),
+            NULL,
+        },
+
+        pp_plx_load_save_plx_initialize,
+    },
+
+    {
+        {
+            "PL3_PL3",
+            PP_PL3_LOAD_SAVE_N12,
+            pp_pl3_load_save_pl3_gen6,
+            sizeof(pp_pl3_load_save_pl3_gen6),
+            NULL,
+        },
+
+        pp_plx_load_save_plx_initialize,
     },
 
     {
@@ -228,6 +334,23 @@ static struct pp_module pp_modules_gen6[] = {
 #define pp_static_parameter     pp_context->pp_static_parameter
 #define pp_inline_parameter     pp_context->pp_inline_parameter
 
+static int
+pp_get_surface_fourcc(VADriverContextP ctx, const struct i965_surface *surface)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    int fourcc;
+
+    if (surface->flag == I965_SURFACE_IMAGE) {
+        struct object_image *obj_image = IMAGE(surface->id);
+        fourcc = obj_image->image.format.fourcc;
+    } else {
+        struct object_surface *obj_surface = SURFACE(surface->id);
+        fourcc = obj_surface->fourcc;
+    }
+
+    return fourcc;
+}
+
 static void
 pp_set_surface_tiling(struct i965_surface_state *ss, unsigned int tiling)
 {
@@ -616,6 +739,98 @@ i965_pp_set_surface2_state(VADriverContextP ctx, struct i965_post_processing_con
     dri_bo_unmap(ss2_bo);
 }
 
+static void 
+pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
+                                const struct i965_surface *surface, 
+                                int base_index, int is_target,
+                                int *width, int *height, int *pitch, int *offset)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    struct object_surface *obj_surface;
+    struct object_image *obj_image;
+    dri_bo *bo;
+    int fourcc = pp_get_surface_fourcc(ctx, surface);
+    const int Y = 0;
+    const int U = fourcc == VA_FOURCC('Y', 'V', '1', '2') ? 2 : 1;
+    const int V = fourcc == VA_FOURCC('Y', 'V', '1', '2') ? 1 : 2;
+    const int UV = 1;
+    int interleaved_uv = fourcc == VA_FOURCC('N', 'V', '1', '2');
+
+    if (surface->flag == I965_SURFACE_SURFACE) {
+        obj_surface = SURFACE(surface->id);
+        bo = obj_surface->bo;
+        width[0] = obj_surface->orig_width;
+        height[0] = obj_surface->orig_height;
+        pitch[0] = obj_surface->width;
+        offset[0] = 0;
+
+        if (interleaved_uv) {
+            width[1] = obj_surface->orig_width;
+            height[1] = obj_surface->orig_height / 2;
+            pitch[1] = obj_surface->width;
+            offset[1] = offset[0] + obj_surface->width * obj_surface->height;
+        } else {
+            width[1] = obj_surface->orig_width / 2;
+            height[1] = obj_surface->orig_height / 2;
+            pitch[1] = obj_surface->width / 2;
+            offset[1] = offset[0] + obj_surface->width * obj_surface->height;
+            width[2] = obj_surface->orig_width / 2;
+            height[2] = obj_surface->orig_height / 2;
+            pitch[2] = obj_surface->width / 2;
+            offset[2] = offset[1] + (obj_surface->width / 2) * (obj_surface->height / 2);
+        }
+    } else {
+        obj_image = IMAGE(surface->id);
+        bo = obj_image->bo;
+        width[0] = obj_image->image.width;
+        height[0] = obj_image->image.height;
+        pitch[0] = obj_image->image.pitches[0];
+        offset[0] = obj_image->image.offsets[0];
+
+        if (interleaved_uv) {
+            width[1] = obj_image->image.width;
+            height[1] = obj_image->image.height / 2;
+            pitch[1] = obj_image->image.pitches[1];
+            offset[1] = obj_image->image.offsets[1];
+        } else {
+            width[1] = obj_image->image.width / 2;
+            height[1] = obj_image->image.height / 2;
+            pitch[1] = obj_image->image.pitches[1];
+            offset[1] = obj_image->image.offsets[1];
+            width[2] = obj_image->image.width / 2;
+            height[2] = obj_image->image.height / 2;
+            pitch[2] = obj_image->image.pitches[2];
+            offset[2] = obj_image->image.offsets[2];
+        }
+    }
+
+    /* Y surface */
+    i965_pp_set_surface_state(ctx, pp_context,
+                              bo, offset[Y],
+                              width[Y] / 4, height[Y], pitch[Y], I965_SURFACEFORMAT_R8_UNORM,
+                              base_index, is_target);
+
+    if (interleaved_uv) {
+        i965_pp_set_surface_state(ctx, pp_context,
+                                  bo, offset[UV],
+                                  width[UV] / 4, height[UV], pitch[UV], I965_SURFACEFORMAT_R8_UNORM,
+                                  base_index + 1, is_target);
+    } else {
+        /* U surface */
+        i965_pp_set_surface_state(ctx, pp_context,
+                                  bo, offset[U],
+                                  width[U] / 4, height[U], pitch[U], I965_SURFACEFORMAT_R8_UNORM,
+                                  base_index + 1, is_target);
+
+        /* V surface */
+        i965_pp_set_surface_state(ctx, pp_context,
+                                  bo, offset[V],
+                                  width[V] / 4, height[V], pitch[V], I965_SURFACEFORMAT_R8_UNORM,
+                                  base_index + 2, is_target);
+    }
+
+}
+
 static int
 pp_null_x_steps(void *private_context)
 {
@@ -636,8 +851,10 @@ pp_null_set_block_parameter(struct i965_post_processing_context *pp_context, int
 
 static void
 pp_null_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                   VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                   const VARectangle *src_rect, const VARectangle *dst_rect)
+                   const struct i965_surface *src_surface,
+                   const VARectangle *src_rect,
+                   const struct i965_surface *dst_surface,
+                   const VARectangle *dst_rect)
 {
     /* private function & data */
     pp_context->pp_x_steps = pp_null_x_steps;
@@ -671,63 +888,33 @@ pp_load_save_set_block_parameter(struct i965_post_processing_context *pp_context
 }
 
 static void
-pp_nv12_load_save_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                             VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                             const VARectangle *src_rect, const VARectangle *dst_rect)
+pp_plx_load_save_plx_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
+                                const struct i965_surface *src_surface,
+                                const VARectangle *src_rect,
+                                const struct i965_surface *dst_surface,
+                                const VARectangle *dst_rect)
 {
-    struct i965_driver_data *i965 = i965_driver_data(ctx);
     struct pp_load_save_context *pp_load_save_context = (struct pp_load_save_context *)&pp_context->private_context;
-    struct object_surface *obj_surface;
-    int w, h;
-    int orig_w, orig_h;
+    int width[3], height[3], pitch[3], offset[3];
+    const int Y = 0;
 
     /* source surface */
-    obj_surface = SURFACE(in_surface_id);
-    orig_w = obj_surface->orig_width;
-    orig_h = obj_surface->orig_height;
-    w = obj_surface->width;
-    h = obj_surface->height;
-
-    /* source Y surface index 1 */
-    i965_pp_set_surface_state(ctx, pp_context,
-                              obj_surface->bo, 0,
-                              orig_w / 4, orig_h, w, I965_SURFACEFORMAT_R8_UNORM,
-                              1, 0);
-
-    /* source UV surface index 2 */
-    i965_pp_set_surface_state(ctx, pp_context,
-                              obj_surface->bo, w * h,
-                              orig_w / 4, orig_h / 2, w, I965_SURFACEFORMAT_R8G8_UNORM,
-                              2, 0);
+    pp_set_media_rw_message_surface(ctx, pp_context, src_surface, 1, 0,
+                                    width, height, pitch, offset);
 
     /* destination surface */
-    obj_surface = SURFACE(out_surface_id);
-    orig_w = obj_surface->orig_width;
-    orig_h = obj_surface->orig_height;
-    w = obj_surface->width;
-    h = obj_surface->height;
-
-    /* destination Y surface index 7 */
-    i965_pp_set_surface_state(ctx, pp_context,
-                              obj_surface->bo, 0,
-                              orig_w / 4, orig_h, w, I965_SURFACEFORMAT_R8_UNORM,
-                              7, 1);
-
-    /* destination UV surface index 8 */
-    i965_pp_set_surface_state(ctx, pp_context,
-                              obj_surface->bo, w * h,
-                              orig_w / 4, orig_h / 2, w, I965_SURFACEFORMAT_R8G8_UNORM,
-                              8, 1);
+    pp_set_media_rw_message_surface(ctx, pp_context, dst_surface, 7, 1,
+                                    width, height, pitch, offset);
 
     /* private function & data */
     pp_context->pp_x_steps = pp_load_save_x_steps;
     pp_context->pp_y_steps = pp_load_save_y_steps;
     pp_context->pp_set_block_parameter = pp_load_save_set_block_parameter;
-    pp_load_save_context->dest_h = h;
-    pp_load_save_context->dest_w = w;
+    pp_load_save_context->dest_h = ALIGN(height[Y], 16);
+    pp_load_save_context->dest_w = ALIGN(width[Y], 16);
 
-    pp_inline_parameter.grf5.block_count_x = w / 16;   /* 1 x N */
-    pp_inline_parameter.grf5.number_blocks = w / 16;
+    pp_inline_parameter.grf5.block_count_x = ALIGN(width[Y], 16) / 16;   /* 1 x N */
+    pp_inline_parameter.grf5.number_blocks = ALIGN(width[Y], 16) / 16;
 }
 
 static int
@@ -761,8 +948,10 @@ pp_scaling_set_block_parameter(struct i965_post_processing_context *pp_context,
 
 static void
 pp_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                           VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                           const VARectangle *src_rect, const VARectangle *dst_rect)
+                           const struct i965_surface *src_surface,
+                           const VARectangle *src_rect,
+                           const struct i965_surface *dst_surface,
+                           const VARectangle *dst_rect)
 {
     struct i965_driver_data *i965 = i965_driver_data(ctx);
     struct pp_scaling_context *pp_scaling_context = (struct pp_scaling_context *)&pp_context->private_context;
@@ -772,7 +961,7 @@ pp_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_con
     int out_w, out_h, out_wpitch, out_hpitch;
 
     /* source surface */
-    obj_surface = SURFACE(in_surface_id);
+    obj_surface = SURFACE(src_surface->id);
     in_w = obj_surface->orig_width;
     in_h = obj_surface->orig_height;
     in_wpitch = obj_surface->width;
@@ -791,7 +980,7 @@ pp_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_con
                               2, 0);
 
     /* destination surface */
-    obj_surface = SURFACE(out_surface_id);
+    obj_surface = SURFACE(dst_surface->id);
     out_w = obj_surface->orig_width;
     out_h = obj_surface->orig_height;
     out_wpitch = obj_surface->width;
@@ -963,8 +1152,10 @@ pp_avs_set_block_parameter(struct i965_post_processing_context *pp_context, int
 
 static void
 pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                       VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                       const VARectangle *src_rect, const VARectangle *dst_rect)
+                       const struct i965_surface *src_surface,
+                       const VARectangle *src_rect,
+                       const struct i965_surface *dst_surface,
+                       const VARectangle *dst_rect)
 {
     struct i965_driver_data *i965 = i965_driver_data(ctx);
     struct pp_avs_context *pp_avs_context = (struct pp_avs_context *)&pp_context->private_context;
@@ -976,7 +1167,7 @@ pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context
     int out_w, out_h, out_wpitch, out_hpitch;
 
     /* surface */
-    obj_surface = SURFACE(in_surface_id);
+    obj_surface = SURFACE(src_surface->id);
     in_w = obj_surface->orig_width;
     in_h = obj_surface->orig_height;
     in_wpitch = obj_surface->width;
@@ -999,7 +1190,7 @@ pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context
                                2);
 
     /* destination surface */
-    obj_surface = SURFACE(out_surface_id);
+    obj_surface = SURFACE(dst_surface->id);
     out_w = obj_surface->orig_width;
     out_h = obj_surface->orig_height;
     out_wpitch = obj_surface->width;
@@ -1227,8 +1418,10 @@ pp_dndi_set_block_parameter(struct i965_post_processing_context *pp_context, int
 
 static 
 void pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                             VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                             const VARectangle *src_rect, const VARectangle *dst_rect)
+                             const struct i965_surface *src_surface,
+                             const VARectangle *src_rect,
+                             const struct i965_surface *dst_surface,
+                             const VARectangle *dst_rect)
 {
     struct i965_driver_data *i965 = i965_driver_data(ctx);
     struct pp_dndi_context *pp_dndi_context = (struct pp_dndi_context *)&pp_context->private_context;
@@ -1239,7 +1432,7 @@ void pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c
     int orig_w, orig_h;
 
     /* surface */
-    obj_surface = SURFACE(in_surface_id);
+    obj_surface = SURFACE(src_surface->id);
     orig_w = obj_surface->orig_width;
     orig_h = obj_surface->orig_height;
     w = obj_surface->width;
@@ -1274,7 +1467,7 @@ void pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c
                               20, 1);
 
     /* destination surface */
-    obj_surface = SURFACE(out_surface_id);
+    obj_surface = SURFACE(dst_surface->id);
     orig_w = obj_surface->orig_width;
     orig_h = obj_surface->orig_height;
     w = obj_surface->width;
@@ -1374,9 +1567,9 @@ static void
 ironlake_pp_initialize(
     VADriverContextP   ctx,
     struct i965_post_processing_context *pp_context,
-    VASurfaceID        in_surface_id,
-    VASurfaceID        out_surface_id,
+    const struct i965_surface *src_surface,
     const VARectangle *src_rect,
+    const struct i965_surface *dst_surface,
     const VARectangle *dst_rect,
     int                pp_index
 )
@@ -1462,22 +1655,24 @@ ironlake_pp_initialize(
     
     if (pp_module->initialize)
         pp_module->initialize(ctx, pp_context,
-                              in_surface_id, out_surface_id,
-                              src_rect, dst_rect);
+                              src_surface,
+                              src_rect,
+                              dst_surface,
+                              dst_rect);
 }
 
 static void
 ironlake_post_processing(
     VADriverContextP   ctx,
     struct i965_post_processing_context *pp_context,
-    VASurfaceID        in_surface_id,
-    VASurfaceID        out_surface_id,
+    const struct i965_surface *src_surface,
     const VARectangle *src_rect,
+    const struct i965_surface *dst_surface,
     const VARectangle *dst_rect,
     int                pp_index
 )
 {
-    ironlake_pp_initialize(ctx, pp_context, in_surface_id, out_surface_id, src_rect, dst_rect, pp_index);
+    ironlake_pp_initialize(ctx, pp_context, src_surface, src_rect, dst_surface, dst_rect, pp_index);
     ironlake_pp_states_setup(ctx, pp_context);
     ironlake_pp_pipeline_setup(ctx, pp_context);
 }
@@ -1486,9 +1681,9 @@ static void
 gen6_pp_initialize(
     VADriverContextP   ctx,
     struct i965_post_processing_context *pp_context,
-    VASurfaceID        in_surface_id,
-    VASurfaceID        out_surface_id,
+    const struct i965_surface *src_surface,
     const VARectangle *src_rect,
+    const struct i965_surface *dst_surface,
     const VARectangle *dst_rect,
     int                pp_index
 )
@@ -1574,8 +1769,10 @@ gen6_pp_initialize(
     
     if (pp_module->initialize)
         pp_module->initialize(ctx, pp_context,
-                              in_surface_id, out_surface_id,
-                              src_rect, dst_rect);
+                              src_surface,
+                              src_rect,
+                              dst_surface,
+                              dst_rect);
 }
 
 static void
@@ -1819,14 +2016,19 @@ static void
 gen6_post_processing(
     VADriverContextP   ctx,
     struct i965_post_processing_context *pp_context,
-    VASurfaceID        in_surface_id,
-    VASurfaceID        out_surface_id,
+    const struct i965_surface *src_surface,
     const VARectangle *src_rect,
+    const struct i965_surface *dst_surface,
     const VARectangle *dst_rect,
     int                pp_index
 )
 {
-    gen6_pp_initialize(ctx, pp_context, in_surface_id, out_surface_id, src_rect, dst_rect, pp_index);
+    gen6_pp_initialize(ctx, pp_context,
+                       src_surface,
+                       src_rect,
+                       dst_surface,
+                       dst_rect,
+                       pp_index);
     gen6_pp_states_setup(ctx, pp_context);
     gen6_pp_pipeline_setup(ctx, pp_context);
 }
@@ -1835,9 +2037,9 @@ static void
 i965_post_processing_internal(
     VADriverContextP   ctx,
     struct i965_post_processing_context *pp_context,
-    VASurfaceID        in_surface_id,
-    VASurfaceID        out_surface_id,
+    const struct i965_surface *src_surface,
     const VARectangle *src_rect,
+    const struct i965_surface *dst_surface,
     const VARectangle *dst_rect,
     int                pp_index
 )
@@ -1846,9 +2048,9 @@ i965_post_processing_internal(
 
     if (IS_GEN6(i965->intel.device_id) ||
         IS_GEN7(i965->intel.device_id))
-        gen6_post_processing(ctx, pp_context, in_surface_id, out_surface_id, src_rect, dst_rect, pp_index);
+        gen6_post_processing(ctx, pp_context, src_surface, src_rect, dst_surface, dst_rect, pp_index);
     else
-        ironlake_post_processing(ctx, pp_context, in_surface_id, out_surface_id, src_rect, dst_rect, pp_index);
+        ironlake_post_processing(ctx, pp_context, src_surface, src_rect, dst_surface, dst_rect, pp_index);
 }
 
 VAStatus 
@@ -1881,6 +2083,8 @@ i965_post_processing(
         if (i965->render_state.interleaved_uv) {
             struct object_surface *obj_surface;
             VAStatus status;
+            struct i965_surface src_surface;
+            struct i965_surface dst_surface;
 
             if (flags & I965_PP_FLAG_DEINTERLACING) {
                 obj_surface = SURFACE(in_surface_id);
@@ -1893,9 +2097,17 @@ i965_post_processing(
                 assert(status == VA_STATUS_SUCCESS);
                 obj_surface = SURFACE(out_surface_id);
                 i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC('N','V','1','2'));
+
+                src_surface.id = in_surface_id;
+                src_surface.flag = I965_SURFACE_SURFACE;
+                dst_surface.id = out_surface_id;
+                dst_surface.flag = I965_SURFACE_SURFACE;
+
                 i965_post_processing_internal(ctx, i965->pp_context,
-                                              in_surface_id, out_surface_id,
-                                              src_rect, dst_rect,
+                                              &src_surface,
+                                              src_rect,
+                                              &dst_surface,
+                                              dst_rect,
                                               PP_NV12_DNDI);
             }
 
@@ -1915,9 +2127,17 @@ i965_post_processing(
                 assert(status == VA_STATUS_SUCCESS);
                 obj_surface = SURFACE(out_surface_id);
                 i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC('N','V','1','2'));
+
+                src_surface.id = in_surface_id;
+                src_surface.flag = I965_SURFACE_SURFACE;
+                dst_surface.id = out_surface_id;
+                dst_surface.flag = I965_SURFACE_SURFACE;
+
                 i965_post_processing_internal(ctx, i965->pp_context,
-                                              in_surface_id, out_surface_id,
-                                              src_rect, dst_rect,
+                                              &src_surface,
+                                              src_rect,
+                                              &dst_surface,
+                                              dst_rect,
                                               PP_NV12_AVS);
 
                 if (in_surface_id != surface)
@@ -1931,6 +2151,110 @@ i965_post_processing(
     return out_surface_id;
 }       
 
+static VAStatus
+i965_image_i420_processing(VADriverContextP ctx,
+                           const struct i965_surface *src_surface,
+                           const VARectangle *src_rect,
+                           const struct i965_surface *dst_surface,
+                           const VARectangle *dst_rect)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    struct i965_post_processing_context *pp_context = i965->pp_context;
+    int fourcc = pp_get_surface_fourcc(ctx, dst_surface);
+
+    if (fourcc == VA_FOURCC('N', 'V', '1', '2')) {
+        i965_post_processing_internal(ctx, i965->pp_context,
+                                      src_surface,
+                                      src_rect,
+                                      dst_surface,
+                                      dst_rect,
+                                      PP_PL3_LOAD_SAVE_N12);
+    } else {
+        i965_post_processing_internal(ctx, i965->pp_context,
+                                      src_surface,
+                                      src_rect,
+                                      dst_surface,
+                                      dst_rect,
+                                      PP_PL3_LOAD_SAVE_PL3);
+    }
+
+    intel_batchbuffer_flush(pp_context->batch);
+
+    return VA_STATUS_SUCCESS;
+}
+
+static VAStatus
+i965_image_nv12_processing(VADriverContextP ctx,
+                           const struct i965_surface *src_surface,
+                           const VARectangle *src_rect,
+                           const struct i965_surface *dst_surface,
+                           const VARectangle *dst_rect)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    struct i965_post_processing_context *pp_context = i965->pp_context;
+    int fourcc = pp_get_surface_fourcc(ctx, dst_surface);
+
+    if (fourcc == VA_FOURCC('N', 'V', '1', '2')) {
+        i965_post_processing_internal(ctx, i965->pp_context,
+                                      src_surface,
+                                      src_rect,
+                                      dst_surface,
+                                      dst_rect,
+                                      PP_NV12_LOAD_SAVE_N12);
+    } else {
+        i965_post_processing_internal(ctx, i965->pp_context,
+                                      src_surface,
+                                      src_rect,
+                                      dst_surface,
+                                      dst_rect,
+                                      PP_NV12_LOAD_SAVE_PL3);
+    }
+
+    intel_batchbuffer_flush(pp_context->batch);
+
+    return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_image_processing(VADriverContextP ctx,
+                      const struct i965_surface *src_surface,
+                      const VARectangle *src_rect,
+                      const struct i965_surface *dst_surface,
+                      const VARectangle *dst_rect)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    VAStatus status = VA_STATUS_ERROR_UNIMPLEMENTED;
+
+    if (HAS_PP(i965)) {
+        int fourcc = pp_get_surface_fourcc(ctx, src_surface);
+
+        switch (fourcc) {
+        case VA_FOURCC('Y', 'V', '1', '2'):
+        case VA_FOURCC('I', '4', '2', '0'):
+            status = i965_image_i420_processing(ctx,
+                                                src_surface,
+                                                src_rect,
+                                                dst_surface,
+                                                dst_rect);
+            break;
+
+        case  VA_FOURCC('N', 'V', '1', '2'):
+            status = i965_image_nv12_processing(ctx,
+                                                src_surface,
+                                                src_rect,
+                                                dst_surface,
+                                                dst_rect);
+            break;
+
+        default:
+            status = VA_STATUS_ERROR_UNIMPLEMENTED;
+            break;
+        }
+    }
+
+    return status;
+}       
+
 static void
 i965_post_processing_context_finalize(struct i965_post_processing_context *pp_context)
 {
@@ -2025,12 +2349,16 @@ i965_post_processing_context_init(VADriverContextP ctx,
     for (i = 0; i < NUM_PP_MODULES; i++) {
         struct pp_module *pp_module = &pp_context->pp_modules[i];
         dri_bo_unreference(pp_module->kernel.bo);
-        pp_module->kernel.bo = dri_bo_alloc(i965->intel.bufmgr,
-                                            pp_module->kernel.name,
-                                            pp_module->kernel.size,
-                                            4096);
-        assert(pp_module->kernel.bo);
-        dri_bo_subdata(pp_module->kernel.bo, 0, pp_module->kernel.size, pp_module->kernel.bin);
+        if (pp_module->kernel.bin) {
+            pp_module->kernel.bo = dri_bo_alloc(i965->intel.bufmgr,
+                                                pp_module->kernel.name,
+                                                pp_module->kernel.size,
+                                                4096);
+            assert(pp_module->kernel.bo);
+            dri_bo_subdata(pp_module->kernel.bo, 0, pp_module->kernel.size, pp_module->kernel.bin);
+        } else {
+            pp_module->kernel.bo = NULL;
+        }
     }
 
     pp_context->batch = batch;
@@ -2065,15 +2393,24 @@ i965_proc_picture(VADriverContextP ctx,
     VAProcPipelineParameterBuffer *pipeline_param = (VAProcPipelineParameterBuffer *)proc_state->pipeline_param->buffer;
     VAProcInputParameterBuffer *input_param = (VAProcInputParameterBuffer *)proc_state->input_param->buffer;
     struct object_surface *obj_surface;
+    struct i965_surface src_surface, dst_surface;
 
     assert(input_param->surface != VA_INVALID_ID);
     assert(proc_state->current_render_target != VA_INVALID_ID);
 
     obj_surface = SURFACE(proc_state->current_render_target);
     i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC('N','V','1','2'));
+
+    src_surface.id = input_param->surface;
+    src_surface.flag = I965_SURFACE_SURFACE;
+    dst_surface.id = proc_state->current_render_target;
+    dst_surface.flag = I965_SURFACE_SURFACE;
+
     i965_post_processing_internal(ctx, &proc_context->pp_context,
-                                  input_param->surface, proc_state->current_render_target,
-                                  &input_param->region, &pipeline_param->output_region,
+                                  &src_surface,
+                                  &input_param->region,
+                                  &dst_surface,
+                                  &pipeline_param->output_region,
                                   PP_NV12_AVS);
 
     intel_batchbuffer_flush(hw_context->batch);
index 9667a55..4b3835d 100644 (file)
 enum
 {
     PP_NULL = 0,
-    PP_NV12_LOAD_SAVE,
+    PP_NV12_LOAD_SAVE_N12,
+    PP_NV12_LOAD_SAVE_PL3,
+    PP_PL3_LOAD_SAVE_N12,
+    PP_PL3_LOAD_SAVE_PL3,
     PP_NV12_SCALING,
     PP_NV12_AVS,
     PP_NV12_DNDI,
 };
 
-#define NUM_PP_MODULES                  5
+#define NUM_PP_MODULES                  8
 
 struct i965_post_processing_context;
 
@@ -87,8 +90,10 @@ struct pp_module
     
     /* others */
     void (*initialize)(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
-                       VASurfaceID in_surface_id, VASurfaceID out_surface_id,
-                       const VARectangle *src_rect, const VARectangle *dst_rect);
+                       const struct i965_surface *src_surface,
+                       const VARectangle *src_rect,
+                       const struct i965_surface *dst_surface,
+                       const VARectangle *dst_rect);
 };
 
 struct pp_static_parameter
@@ -377,6 +382,13 @@ i965_post_processing(
     int                *has_done_scaling 
 );
 
+VAStatus
+i965_image_processing(VADriverContextP ctx,
+                      const struct i965_surface *src_surface,
+                      const VARectangle *src_rect,
+                      const struct i965_surface *dst_surface,
+                      const VARectangle *dst_rect);
+
 Bool
 i965_post_processing_terminate(VADriverContextP ctx);
 Bool
index a6fc525..d1b951a 100644 (file)
@@ -11,21 +11,30 @@ INTEL_PP_G4B_GEN5 = \
        nv12_avs_nv12.g4b.gen5                  \
        nv12_dndi_nv12.g4b.gen5                 \
        nv12_load_save_nv12.g4b.gen5            \
+       nv12_load_save_pl3.g4b.gen5             \
        nv12_scaling_nv12.g4b.gen5              \
+       pl3_load_save_nv12.g4b.gen5             \
+       pl3_load_save_pl3.g4b.gen5              \
        $(NULL)
 
 INTEL_PP_G6B = \
        nv12_avs_nv12.g6b                       \
        nv12_dndi_nv12.g6b                      \
        nv12_load_save_nv12.g6b                 \
+       nv12_load_save_pl3.g6b                  \
        nv12_scaling_nv12.g6b                   \
+       pl3_load_save_nv12.g6b                  \
+       pl3_load_save_pl3.g6b                   \
        $(NULL)
 
 INTEL_PP_ASM = \
        nv12_avs_nv12.asm                       \
        nv12_dndi_nv12.asm                      \
        nv12_load_save_nv12.asm                 \
+       nv12_load_save_pl3.asm                  \
        nv12_scaling_nv12.asm                   \
+       pl3_load_save_nv12.asm                  \
+       pl3_load_save_pl3.asm                   \
        $(NULL)
 
 INTEL_PP_ASM += \
diff --git a/src/shaders/post_processing/nv12_load_save_pl3.asm b/src/shaders/post_processing/nv12_load_save_pl3.asm
new file mode 100644 (file)
index 0000000..9fa44a1
--- /dev/null
@@ -0,0 +1,17 @@
+// Module name: NV12_LOAD_SAVE_PL3
+.kernel NV12_LOAD_SAVE_PL3
+.code
+
+#include "SetupVPKernel.asm"
+#include "Multiple_Loop_Head.asm"
+#include "NV12_Load_8x4.asm"        
+#include "PL8x4_Save_IMC3.asm"
+#include "Multiple_Loop.asm"
+
+END_THREAD  // End of Thread
+
+.end_code  
+
+.end_kernel
+
+// end of nv12_load_save_pl3.asm
diff --git a/src/shaders/post_processing/nv12_load_save_pl3.g4b.gen5 b/src/shaders/post_processing/nv12_load_save_pl3.g4b.gen5
new file mode 100644 (file)
index 0000000..9ca4063
--- /dev/null
@@ -0,0 +1,105 @@
+   { 0x00600001, 0x21000021, 0x008d0000, 0x00000000 },
+   { 0x00000441, 0x20842e2d, 0x000000b7, 0x00100010 },
+   { 0x00000c01, 0x2086022d, 0x000000bb, 0x00000000 },
+   { 0x00000801, 0x208a01ad, 0x000000a0, 0x00000000 },
+   { 0x00200001, 0x209403bd, 0x006600a4, 0x00000000 },
+   { 0x00000040, 0x208435ad, 0x00000084, 0x000000a0 },
+   { 0x00200040, 0x210035a5, 0x004500a0, 0x00450074 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x27000c01, 0x408d0000, 0x0248a001 },
+   { 0x0000000c, 0x21043ca5, 0x00000104, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0003000f },
+   { 0x00600001, 0x20400022, 0x008d0100, 0x00000000 },
+   { 0x02600031, 0x28000c01, 0x408d0000, 0x0228a002 },
+   { 0x00800001, 0x22200229, 0x00b10770, 0x00000000 },
+   { 0x00800001, 0x22000229, 0x00b10760, 0x00000000 },
+   { 0x00800001, 0x21e00229, 0x00b10750, 0x00000000 },
+   { 0x00800001, 0x21c00229, 0x00b10740, 0x00000000 },
+   { 0x00800001, 0x21a00229, 0x00b10730, 0x00000000 },
+   { 0x00800001, 0x21800229, 0x00b10720, 0x00000000 },
+   { 0x00800001, 0x21600229, 0x00b10710, 0x00000000 },
+   { 0x00800001, 0x21400229, 0x00b10700, 0x00000000 },
+   { 0x00800001, 0x22600229, 0x00d20820, 0x00000000 },
+   { 0x00800001, 0x23600229, 0x00d20821, 0x00000000 },
+   { 0x00800001, 0x22400229, 0x00d20800, 0x00000000 },
+   { 0x00800001, 0x23400229, 0x00d20801, 0x00000000 },
+   { 0x00000005, 0x24000c20, 0x000000b8, 0x00ffffff },
+   { 0x04000010, 0x20000c04, 0x00000400, 0x00ffffff },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000052 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x27000c01, 0x408d0000, 0x0248a007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x28000c01, 0x408d0000, 0x0218a008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x29000c01, 0x408d0000, 0x0218a009 },
+   { 0x00800001, 0x28200229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x29200229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x28000229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x29000229, 0x008d0900, 0x00000000 },
+   { 0x00000001, 0x26000228, 0x000000ba, 0x00000000 },
+   { 0x00610001, 0x24400129, 0x000000b8, 0x00000000 },
+   { 0x00710001, 0x24400169, 0x00000000, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000440, 0x00000000 },
+   { 0x00910001, 0x41400231, 0x02b10700, 0x00000000 },
+   { 0x00910001, 0x22400231, 0x028d0800, 0x00000000 },
+   { 0x00910001, 0x23400231, 0x028d0900, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000442, 0x00000000 },
+   { 0x00910001, 0x41410231, 0x02b10701, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000444, 0x00000000 },
+   { 0x00910001, 0x41800231, 0x02b10720, 0x00000000 },
+   { 0x00910001, 0x22500231, 0x028d0810, 0x00000000 },
+   { 0x00910001, 0x23500231, 0x028d0910, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000446, 0x00000000 },
+   { 0x00910001, 0x41810231, 0x02b10721, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000448, 0x00000000 },
+   { 0x00910001, 0x41c00231, 0x02b10740, 0x00000000 },
+   { 0x00910001, 0x22600231, 0x028d0820, 0x00000000 },
+   { 0x00910001, 0x23600231, 0x028d0920, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044a, 0x00000000 },
+   { 0x00910001, 0x41c10231, 0x02b10741, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044c, 0x00000000 },
+   { 0x00910001, 0x42000231, 0x02b10760, 0x00000000 },
+   { 0x00910001, 0x22700231, 0x028d0830, 0x00000000 },
+   { 0x00910001, 0x23700231, 0x028d0930, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044e, 0x00000000 },
+   { 0x00910001, 0x42010231, 0x02b10761, 0x00000000 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20140, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20160, 0x00000000 },
+   { 0x00800001, 0x20600232, 0x00d20180, 0x00000000 },
+   { 0x00800001, 0x20700232, 0x00d201a0, 0x00000000 },
+   { 0x00800001, 0x20800232, 0x00d201c0, 0x00000000 },
+   { 0x00800001, 0x20900232, 0x00d201e0, 0x00000000 },
+   { 0x00800001, 0x20a00232, 0x00d20200, 0x00000000 },
+   { 0x00800001, 0x20b00232, 0x00d20220, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x0a082007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20240, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20260, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x04082008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20340, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20360, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x04082009 },
+   { 0x01000040, 0x20863dad, 0x00000086, 0xffffffff },
+   { 0x00000040, 0x20a03dad, 0x000000a0, 0x00100010 },
+   { 0x05000010, 0x200035ac, 0x020000a0, 0x00000084 },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00010220, 0x34001c00, 0x02001400, 0xffffff4a },
+   { 0x00000001, 0x20a001ad, 0x0000008a, 0x00000000 },
+   { 0x00000040, 0x20a23dad, 0x000000a2, 0x00080008 },
+   { 0x00000220, 0x34001c00, 0x00001400, 0xffffff44 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x0f000031, 0x20000c04, 0x708d0000, 0x82000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x0f000031, 0x20000c04, 0x708d0000, 0x82000000 },
diff --git a/src/shaders/post_processing/nv12_load_save_pl3.g6b b/src/shaders/post_processing/nv12_load_save_pl3.g6b
new file mode 100644 (file)
index 0000000..819280d
--- /dev/null
@@ -0,0 +1,178 @@
+   { 0x00600001, 0x20e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000021, 0x008d0000, 0x00000000 },
+   { 0x00000441, 0x20842e2d, 0x000000b7, 0x00100010 },
+   { 0x00000c01, 0x2086022d, 0x000000bb, 0x00000000 },
+   { 0x00000801, 0x208a01ad, 0x000000a0, 0x00000000 },
+   { 0x00200001, 0x209403bd, 0x006600a4, 0x00000000 },
+   { 0x00000040, 0x208435ad, 0x00000084, 0x000000a0 },
+   { 0x00200040, 0x210035a5, 0x004500a0, 0x00450074 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x27000cc1, 0x00000020, 0x02498001 },
+   { 0x0000000c, 0x21043ca5, 0x00000104, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0003000f },
+   { 0x00600001, 0x20400022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x28000cc1, 0x00000040, 0x02298002 },
+   { 0x00800001, 0x22200229, 0x00b10770, 0x00000000 },
+   { 0x00800001, 0x22000229, 0x00b10760, 0x00000000 },
+   { 0x00800001, 0x21e00229, 0x00b10750, 0x00000000 },
+   { 0x00800001, 0x21c00229, 0x00b10740, 0x00000000 },
+   { 0x00800001, 0x21a00229, 0x00b10730, 0x00000000 },
+   { 0x00800001, 0x21800229, 0x00b10720, 0x00000000 },
+   { 0x00800001, 0x21600229, 0x00b10710, 0x00000000 },
+   { 0x00800001, 0x21400229, 0x00b10700, 0x00000000 },
+   { 0x00800001, 0x22600229, 0x00d20820, 0x00000000 },
+   { 0x00800001, 0x23600229, 0x00d20821, 0x00000000 },
+   { 0x00800001, 0x22400229, 0x00d20800, 0x00000000 },
+   { 0x00800001, 0x23400229, 0x00d20801, 0x00000000 },
+   { 0x00000005, 0x24000c20, 0x000000b8, 0x00ffffff },
+   { 0x04000010, 0x20000c04, 0x00000400, 0x00ffffff },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000052 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x27000cc1, 0x00000020, 0x02498007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x28000cc1, 0x00000020, 0x02198008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x29000cc1, 0x00000020, 0x02198009 },
+   { 0x00800001, 0x28200229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x29200229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x28000229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x29000229, 0x008d0900, 0x00000000 },
+   { 0x00000001, 0x26000228, 0x000000ba, 0x00000000 },
+   { 0x00610001, 0x24400129, 0x000000b8, 0x00000000 },
+   { 0x00710001, 0x24400169, 0x00000000, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000440, 0x00000000 },
+   { 0x00910001, 0x41400231, 0x02b10700, 0x00000000 },
+   { 0x00910001, 0x22400231, 0x028d0800, 0x00000000 },
+   { 0x00910001, 0x23400231, 0x028d0900, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000442, 0x00000000 },
+   { 0x00910001, 0x41410231, 0x02b10701, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000444, 0x00000000 },
+   { 0x00910001, 0x41800231, 0x02b10720, 0x00000000 },
+   { 0x00910001, 0x22500231, 0x028d0810, 0x00000000 },
+   { 0x00910001, 0x23500231, 0x028d0910, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000446, 0x00000000 },
+   { 0x00910001, 0x41810231, 0x02b10721, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000448, 0x00000000 },
+   { 0x00910001, 0x41c00231, 0x02b10740, 0x00000000 },
+   { 0x00910001, 0x22600231, 0x028d0820, 0x00000000 },
+   { 0x00910001, 0x23600231, 0x028d0920, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044a, 0x00000000 },
+   { 0x00910001, 0x41c10231, 0x02b10741, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044c, 0x00000000 },
+   { 0x00910001, 0x42000231, 0x02b10760, 0x00000000 },
+   { 0x00910001, 0x22700231, 0x028d0830, 0x00000000 },
+   { 0x00910001, 0x23700231, 0x028d0930, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044e, 0x00000000 },
+   { 0x00910001, 0x42010231, 0x02b10761, 0x00000000 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20140, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20160, 0x00000000 },
+   { 0x00800001, 0x20600232, 0x00d20180, 0x00000000 },
+   { 0x00800001, 0x20700232, 0x00d201a0, 0x00000000 },
+   { 0x00800001, 0x20800232, 0x00d201c0, 0x00000000 },
+   { 0x00800001, 0x20900232, 0x00d201e0, 0x00000000 },
+   { 0x00800001, 0x20a00232, 0x00d20200, 0x00000000 },
+   { 0x00800001, 0x20b00232, 0x00d20220, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x0a094007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20240, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20260, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x04094008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20340, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20360, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x04094009 },
+   { 0x01000040, 0x20863dad, 0x00000086, 0xffffffff },
+   { 0x00000040, 0x20a03dad, 0x000000a0, 0x00100010 },
+   { 0x05000010, 0x200035ac, 0x020000a0, 0x00000084 },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00010220, 0x34001c00, 0x02001400, 0xffffff4a },
+   { 0x00000001, 0x20a001ad, 0x0000008a, 0x00000000 },
+   { 0x00000040, 0x20a23dad, 0x000000a2, 0x00080008 },
+   { 0x00000220, 0x34001c00, 0x00001400, 0xffffff44 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x07000031, 0x20001cc4, 0x000001e0, 0x82000010 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x07000031, 0x20001cc4, 0x000001e0, 0x82000010 },
diff --git a/src/shaders/post_processing/pl3_load_save_nv12.asm b/src/shaders/post_processing/pl3_load_save_nv12.asm
new file mode 100644 (file)
index 0000000..cd1b5fe
--- /dev/null
@@ -0,0 +1,17 @@
+// Module name: PL3_LOAD_SAVE_NV12
+.kernel PL3_LOAD_SAVE_NV12
+.code
+
+#include "SetupVPKernel.asm"
+#include "Multiple_Loop_Head.asm"
+#include "IMC3_Load_8x4.asm"        
+#include "PL8x4_Save_NV12.asm"
+#include "Multiple_Loop.asm"
+
+END_THREAD  // End of Thread
+
+.end_code  
+
+.end_kernel
+
+// end of pl3_load_save_nv12.asm
diff --git a/src/shaders/post_processing/pl3_load_save_nv12.g4b.gen5 b/src/shaders/post_processing/pl3_load_save_nv12.g4b.gen5
new file mode 100644 (file)
index 0000000..cf31c50
--- /dev/null
@@ -0,0 +1,108 @@
+   { 0x00600001, 0x21000021, 0x008d0000, 0x00000000 },
+   { 0x00000441, 0x20842e2d, 0x000000b7, 0x00100010 },
+   { 0x00000c01, 0x2086022d, 0x000000bb, 0x00000000 },
+   { 0x00000801, 0x208a01ad, 0x000000a0, 0x00000000 },
+   { 0x00200001, 0x209403bd, 0x006600a4, 0x00000000 },
+   { 0x00000040, 0x208435ad, 0x00000084, 0x000000a0 },
+   { 0x00200040, 0x210035a5, 0x004500a0, 0x00450074 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x27000c01, 0x408d0000, 0x0248a001 },
+   { 0x0020000c, 0x21003ca5, 0x00450100, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20400022, 0x008d0100, 0x00000000 },
+   { 0x02600031, 0x28000c01, 0x408d0000, 0x0218a002 },
+   { 0x00600001, 0x20600022, 0x008d0100, 0x00000000 },
+   { 0x02600031, 0x29000c01, 0x408d0000, 0x0218a003 },
+   { 0x00800001, 0x22200229, 0x00b10770, 0x00000000 },
+   { 0x00800001, 0x22000229, 0x00b10760, 0x00000000 },
+   { 0x00800001, 0x21e00229, 0x00b10750, 0x00000000 },
+   { 0x00800001, 0x21c00229, 0x00b10740, 0x00000000 },
+   { 0x00800001, 0x21a00229, 0x00b10730, 0x00000000 },
+   { 0x00800001, 0x21800229, 0x00b10720, 0x00000000 },
+   { 0x00800001, 0x21600229, 0x00b10710, 0x00000000 },
+   { 0x00800001, 0x21400229, 0x00b10700, 0x00000000 },
+   { 0x00800001, 0x22600229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x23600229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x22400229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x23400229, 0x008d0900, 0x00000000 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00200001, 0x202001a6, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x20280062, 0x00000000, 0x0007000f },
+   { 0x00000005, 0x24000c20, 0x000000b8, 0x00ffffff },
+   { 0x04000010, 0x20000c04, 0x00000400, 0x00ffffff },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000056 },
+   { 0x01600031, 0x27000c01, 0x408d0000, 0x0248a007 },
+   { 0x0000040c, 0x21043da1, 0x000000a2, 0x00010001 },
+   { 0x00000801, 0x21080061, 0x00000000, 0x0003000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x28000c01, 0x408d0000, 0x0228a008 },
+   { 0x00200001, 0x210001a1, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00000001, 0x26020228, 0x000000ba, 0x00000000 },
+   { 0x00610001, 0x24400129, 0x020000b8, 0x00000000 },
+   { 0x00710001, 0x24400169, 0x02000000, 0x00000000 },
+   { 0x00000001, 0x24600061, 0x00000000, 0x00040001 },
+   { 0x00000001, 0x24640061, 0x00000000, 0x00400010 },
+   { 0x00000001, 0x24680061, 0x00000000, 0x04000100 },
+   { 0x00000001, 0x246c0061, 0x00000000, 0x40001000 },
+   { 0x00000001, 0x26020128, 0x00000440, 0x00000000 },
+   { 0x00910001, 0x41400231, 0x02b10700, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x02000440, 0x008d0460 },
+   { 0x00710001, 0x42400231, 0x02ae0800, 0x00000000 },
+   { 0x00710001, 0x43400231, 0x02ae0801, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000442, 0x00000000 },
+   { 0x00910001, 0x41600231, 0x02b10710, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000444, 0x00000000 },
+   { 0x00910001, 0x41800231, 0x02b10720, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x02000444, 0x008d0460 },
+   { 0x00710001, 0x42500231, 0x02ae0810, 0x00000000 },
+   { 0x00710001, 0x43500231, 0x02ae0811, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000446, 0x00000000 },
+   { 0x00910001, 0x41a00231, 0x02b10730, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000448, 0x00000000 },
+   { 0x00910001, 0x41c00231, 0x02b10740, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x02000448, 0x008d0460 },
+   { 0x00710001, 0x42600231, 0x02ae0820, 0x00000000 },
+   { 0x00710001, 0x43600231, 0x02ae0821, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044a, 0x00000000 },
+   { 0x00910001, 0x41e00231, 0x02b10750, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044c, 0x00000000 },
+   { 0x00910001, 0x42000231, 0x02b10760, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x0200044c, 0x008d0460 },
+   { 0x00710001, 0x42700231, 0x02ae0830, 0x00000000 },
+   { 0x00710001, 0x43700231, 0x02ae0831, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044e, 0x00000000 },
+   { 0x00910001, 0x42200231, 0x02b10770, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20140, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20160, 0x00000000 },
+   { 0x00800001, 0x20600232, 0x00d20180, 0x00000000 },
+   { 0x00800001, 0x20700232, 0x00d201a0, 0x00000000 },
+   { 0x00800001, 0x20800232, 0x00d201c0, 0x00000000 },
+   { 0x00800001, 0x20900232, 0x00d201e0, 0x00000000 },
+   { 0x00800001, 0x20a00232, 0x00d20200, 0x00000000 },
+   { 0x00800001, 0x20b00232, 0x00d20220, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x0a082007 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x0000000c, 0x21043ca5, 0x00000104, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0003000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x40400232, 0x00d20240, 0x00000000 },
+   { 0x00800001, 0x40410232, 0x00d20340, 0x00000000 },
+   { 0x00800001, 0x40600232, 0x00d20260, 0x00000000 },
+   { 0x00800001, 0x40610232, 0x00d20360, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x06082008 },
+   { 0x01000040, 0x20863dad, 0x00000086, 0xffffffff },
+   { 0x00000040, 0x20a03dad, 0x000000a0, 0x00100010 },
+   { 0x05000010, 0x200035ac, 0x020000a0, 0x00000084 },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00010220, 0x34001c00, 0x02001400, 0xffffff44 },
+   { 0x00000001, 0x20a001ad, 0x0000008a, 0x00000000 },
+   { 0x00000040, 0x20a23dad, 0x000000a2, 0x00080008 },
+   { 0x00000220, 0x34001c00, 0x00001400, 0xffffff3e },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x0f000031, 0x20000c04, 0x708d0000, 0x82000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x0f000031, 0x20000c04, 0x708d0000, 0x82000000 },
diff --git a/src/shaders/post_processing/pl3_load_save_nv12.g6b b/src/shaders/post_processing/pl3_load_save_nv12.g6b
new file mode 100644 (file)
index 0000000..437ba56
--- /dev/null
@@ -0,0 +1,181 @@
+   { 0x00600001, 0x20e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000021, 0x008d0000, 0x00000000 },
+   { 0x00000441, 0x20842e2d, 0x000000b7, 0x00100010 },
+   { 0x00000c01, 0x2086022d, 0x000000bb, 0x00000000 },
+   { 0x00000801, 0x208a01ad, 0x000000a0, 0x00000000 },
+   { 0x00200001, 0x209403bd, 0x006600a4, 0x00000000 },
+   { 0x00000040, 0x208435ad, 0x00000084, 0x000000a0 },
+   { 0x00200040, 0x210035a5, 0x004500a0, 0x00450074 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x27000cc1, 0x00000020, 0x02498001 },
+   { 0x0020000c, 0x21003ca5, 0x00450100, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20400022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x28000cc1, 0x00000040, 0x02198002 },
+   { 0x00600001, 0x20600022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x29000cc1, 0x00000040, 0x02198003 },
+   { 0x00800001, 0x22200229, 0x00b10770, 0x00000000 },
+   { 0x00800001, 0x22000229, 0x00b10760, 0x00000000 },
+   { 0x00800001, 0x21e00229, 0x00b10750, 0x00000000 },
+   { 0x00800001, 0x21c00229, 0x00b10740, 0x00000000 },
+   { 0x00800001, 0x21a00229, 0x00b10730, 0x00000000 },
+   { 0x00800001, 0x21800229, 0x00b10720, 0x00000000 },
+   { 0x00800001, 0x21600229, 0x00b10710, 0x00000000 },
+   { 0x00800001, 0x21400229, 0x00b10700, 0x00000000 },
+   { 0x00800001, 0x22600229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x23600229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x22400229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x23400229, 0x008d0900, 0x00000000 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00200001, 0x202001a6, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x20280062, 0x00000000, 0x0007000f },
+   { 0x00000005, 0x24000c20, 0x000000b8, 0x00ffffff },
+   { 0x04000010, 0x20000c04, 0x00000400, 0x00ffffff },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000056 },
+   { 0x04600031, 0x27000cc1, 0x00000020, 0x02498007 },
+   { 0x0000040c, 0x21043da1, 0x000000a2, 0x00010001 },
+   { 0x00000801, 0x21080061, 0x00000000, 0x0003000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x28000cc1, 0x00000020, 0x02298008 },
+   { 0x00200001, 0x210001a1, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00000001, 0x26020228, 0x000000ba, 0x00000000 },
+   { 0x00610001, 0x24400129, 0x020000b8, 0x00000000 },
+   { 0x00710001, 0x24400169, 0x02000000, 0x00000000 },
+   { 0x00000001, 0x24600061, 0x00000000, 0x00040001 },
+   { 0x00000001, 0x24640061, 0x00000000, 0x00400010 },
+   { 0x00000001, 0x24680061, 0x00000000, 0x04000100 },
+   { 0x00000001, 0x246c0061, 0x00000000, 0x40001000 },
+   { 0x00000001, 0x26020128, 0x00000440, 0x00000000 },
+   { 0x00910001, 0x41400231, 0x02b10700, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x02000440, 0x008d0460 },
+   { 0x00710001, 0x42400231, 0x02ae0800, 0x00000000 },
+   { 0x00710001, 0x43400231, 0x02ae0801, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000442, 0x00000000 },
+   { 0x00910001, 0x41600231, 0x02b10710, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000444, 0x00000000 },
+   { 0x00910001, 0x41800231, 0x02b10720, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x02000444, 0x008d0460 },
+   { 0x00710001, 0x42500231, 0x02ae0810, 0x00000000 },
+   { 0x00710001, 0x43500231, 0x02ae0811, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000446, 0x00000000 },
+   { 0x00910001, 0x41a00231, 0x02b10730, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000448, 0x00000000 },
+   { 0x00910001, 0x41c00231, 0x02b10740, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x02000448, 0x008d0460 },
+   { 0x00710001, 0x42600231, 0x02ae0820, 0x00000000 },
+   { 0x00710001, 0x43600231, 0x02ae0821, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044a, 0x00000000 },
+   { 0x00910001, 0x41e00231, 0x02b10750, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044c, 0x00000000 },
+   { 0x00910001, 0x42000231, 0x02b10760, 0x00000000 },
+   { 0x02600005, 0x2000252c, 0x0200044c, 0x008d0460 },
+   { 0x00710001, 0x42700231, 0x02ae0830, 0x00000000 },
+   { 0x00710001, 0x43700231, 0x02ae0831, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044e, 0x00000000 },
+   { 0x00910001, 0x42200231, 0x02b10770, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20140, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20160, 0x00000000 },
+   { 0x00800001, 0x20600232, 0x00d20180, 0x00000000 },
+   { 0x00800001, 0x20700232, 0x00d201a0, 0x00000000 },
+   { 0x00800001, 0x20800232, 0x00d201c0, 0x00000000 },
+   { 0x00800001, 0x20900232, 0x00d201e0, 0x00000000 },
+   { 0x00800001, 0x20a00232, 0x00d20200, 0x00000000 },
+   { 0x00800001, 0x20b00232, 0x00d20220, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x0a094007 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x0000000c, 0x21043ca5, 0x00000104, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0003000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x40400232, 0x00d20240, 0x00000000 },
+   { 0x00800001, 0x40410232, 0x00d20340, 0x00000000 },
+   { 0x00800001, 0x40600232, 0x00d20260, 0x00000000 },
+   { 0x00800001, 0x40610232, 0x00d20360, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x06094008 },
+   { 0x01000040, 0x20863dad, 0x00000086, 0xffffffff },
+   { 0x00000040, 0x20a03dad, 0x000000a0, 0x00100010 },
+   { 0x05000010, 0x200035ac, 0x020000a0, 0x00000084 },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00010220, 0x34001c00, 0x02001400, 0xffffff44 },
+   { 0x00000001, 0x20a001ad, 0x0000008a, 0x00000000 },
+   { 0x00000040, 0x20a23dad, 0x000000a2, 0x00080008 },
+   { 0x00000220, 0x34001c00, 0x00001400, 0xffffff3e },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x07000031, 0x20001cc4, 0x000001e0, 0x82000010 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x07000031, 0x20001cc4, 0x000001e0, 0x82000010 },
diff --git a/src/shaders/post_processing/pl3_load_save_pl3.asm b/src/shaders/post_processing/pl3_load_save_pl3.asm
new file mode 100644 (file)
index 0000000..f2e9406
--- /dev/null
@@ -0,0 +1,17 @@
+// Module name: PL3_LOAD_SAVE_pl3
+.kernel PL3_LOAD_SAVE_PL3
+.code
+
+#include "SetupVPKernel.asm"
+#include "Multiple_Loop_Head.asm"
+#include "IMC3_Load_8x4.asm"        
+#include "PL8x4_Save_IMC3.asm"
+#include "Multiple_Loop.asm"
+
+END_THREAD  // End of Thread
+
+.end_code  
+
+.end_kernel
+
+// end of pl3_load_save_pl3.asm
diff --git a/src/shaders/post_processing/pl3_load_save_pl3.g4b.gen5 b/src/shaders/post_processing/pl3_load_save_pl3.g4b.gen5
new file mode 100644 (file)
index 0000000..26fa256
--- /dev/null
@@ -0,0 +1,107 @@
+   { 0x00600001, 0x21000021, 0x008d0000, 0x00000000 },
+   { 0x00000441, 0x20842e2d, 0x000000b7, 0x00100010 },
+   { 0x00000c01, 0x2086022d, 0x000000bb, 0x00000000 },
+   { 0x00000801, 0x208a01ad, 0x000000a0, 0x00000000 },
+   { 0x00200001, 0x209403bd, 0x006600a4, 0x00000000 },
+   { 0x00000040, 0x208435ad, 0x00000084, 0x000000a0 },
+   { 0x00200040, 0x210035a5, 0x004500a0, 0x00450074 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x27000c01, 0x408d0000, 0x0248a001 },
+   { 0x0020000c, 0x21003ca5, 0x00450100, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20400022, 0x008d0100, 0x00000000 },
+   { 0x02600031, 0x28000c01, 0x408d0000, 0x0218a002 },
+   { 0x00600001, 0x20600022, 0x008d0100, 0x00000000 },
+   { 0x02600031, 0x29000c01, 0x408d0000, 0x0218a003 },
+   { 0x00800001, 0x22200229, 0x00b10770, 0x00000000 },
+   { 0x00800001, 0x22000229, 0x00b10760, 0x00000000 },
+   { 0x00800001, 0x21e00229, 0x00b10750, 0x00000000 },
+   { 0x00800001, 0x21c00229, 0x00b10740, 0x00000000 },
+   { 0x00800001, 0x21a00229, 0x00b10730, 0x00000000 },
+   { 0x00800001, 0x21800229, 0x00b10720, 0x00000000 },
+   { 0x00800001, 0x21600229, 0x00b10710, 0x00000000 },
+   { 0x00800001, 0x21400229, 0x00b10700, 0x00000000 },
+   { 0x00800001, 0x22600229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x23600229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x22400229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x23400229, 0x008d0900, 0x00000000 },
+   { 0x00000005, 0x24000c20, 0x000000b8, 0x00ffffff },
+   { 0x04000010, 0x20000c04, 0x00000400, 0x00ffffff },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000052 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x27000c01, 0x408d0000, 0x0248a007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x28000c01, 0x408d0000, 0x0218a008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x01600031, 0x29000c01, 0x408d0000, 0x0218a009 },
+   { 0x00800001, 0x28200229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x29200229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x28000229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x29000229, 0x008d0900, 0x00000000 },
+   { 0x00000001, 0x26000228, 0x000000ba, 0x00000000 },
+   { 0x00610001, 0x24400129, 0x000000b8, 0x00000000 },
+   { 0x00710001, 0x24400169, 0x00000000, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000440, 0x00000000 },
+   { 0x00910001, 0x41400231, 0x02b10700, 0x00000000 },
+   { 0x00910001, 0x22400231, 0x028d0800, 0x00000000 },
+   { 0x00910001, 0x23400231, 0x028d0900, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000442, 0x00000000 },
+   { 0x00910001, 0x41410231, 0x02b10701, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000444, 0x00000000 },
+   { 0x00910001, 0x41800231, 0x02b10720, 0x00000000 },
+   { 0x00910001, 0x22500231, 0x028d0810, 0x00000000 },
+   { 0x00910001, 0x23500231, 0x028d0910, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000446, 0x00000000 },
+   { 0x00910001, 0x41810231, 0x02b10721, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000448, 0x00000000 },
+   { 0x00910001, 0x41c00231, 0x02b10740, 0x00000000 },
+   { 0x00910001, 0x22600231, 0x028d0820, 0x00000000 },
+   { 0x00910001, 0x23600231, 0x028d0920, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044a, 0x00000000 },
+   { 0x00910001, 0x41c10231, 0x02b10741, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044c, 0x00000000 },
+   { 0x00910001, 0x42000231, 0x02b10760, 0x00000000 },
+   { 0x00910001, 0x22700231, 0x028d0830, 0x00000000 },
+   { 0x00910001, 0x23700231, 0x028d0930, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044e, 0x00000000 },
+   { 0x00910001, 0x42010231, 0x02b10761, 0x00000000 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20140, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20160, 0x00000000 },
+   { 0x00800001, 0x20600232, 0x00d20180, 0x00000000 },
+   { 0x00800001, 0x20700232, 0x00d201a0, 0x00000000 },
+   { 0x00800001, 0x20800232, 0x00d201c0, 0x00000000 },
+   { 0x00800001, 0x20900232, 0x00d201e0, 0x00000000 },
+   { 0x00800001, 0x20a00232, 0x00d20200, 0x00000000 },
+   { 0x00800001, 0x20b00232, 0x00d20220, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x0a082007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20240, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20260, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x04082008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20340, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20360, 0x00000000 },
+   { 0x01600031, 0x20000c04, 0x508d0000, 0x04082009 },
+   { 0x01000040, 0x20863dad, 0x00000086, 0xffffffff },
+   { 0x00000040, 0x20a03dad, 0x000000a0, 0x00100010 },
+   { 0x05000010, 0x200035ac, 0x020000a0, 0x00000084 },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00010220, 0x34001c00, 0x02001400, 0xffffff46 },
+   { 0x00000001, 0x20a001ad, 0x0000008a, 0x00000000 },
+   { 0x00000040, 0x20a23dad, 0x000000a2, 0x00080008 },
+   { 0x00000220, 0x34001c00, 0x00001400, 0xffffff40 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x0f000031, 0x20000c04, 0x708d0000, 0x82000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x0f000031, 0x20000c04, 0x708d0000, 0x82000000 },
diff --git a/src/shaders/post_processing/pl3_load_save_pl3.g6b b/src/shaders/post_processing/pl3_load_save_pl3.g6b
new file mode 100644 (file)
index 0000000..c9ee1a1
--- /dev/null
@@ -0,0 +1,180 @@
+   { 0x00600001, 0x20e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x23e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x24e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x25e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x26e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x27e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x28e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29000061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29200061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29400061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29600061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29800061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29a00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29c00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x29e00061, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000021, 0x008d0000, 0x00000000 },
+   { 0x00000441, 0x20842e2d, 0x000000b7, 0x00100010 },
+   { 0x00000c01, 0x2086022d, 0x000000bb, 0x00000000 },
+   { 0x00000801, 0x208a01ad, 0x000000a0, 0x00000000 },
+   { 0x00200001, 0x209403bd, 0x006600a4, 0x00000000 },
+   { 0x00000040, 0x208435ad, 0x00000084, 0x000000a0 },
+   { 0x00200040, 0x210035a5, 0x004500a0, 0x00450074 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x27000cc1, 0x00000020, 0x02498001 },
+   { 0x0020000c, 0x21003ca5, 0x00450100, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20400022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x28000cc1, 0x00000040, 0x02198002 },
+   { 0x00600001, 0x20600022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x29000cc1, 0x00000040, 0x02198003 },
+   { 0x00800001, 0x22200229, 0x00b10770, 0x00000000 },
+   { 0x00800001, 0x22000229, 0x00b10760, 0x00000000 },
+   { 0x00800001, 0x21e00229, 0x00b10750, 0x00000000 },
+   { 0x00800001, 0x21c00229, 0x00b10740, 0x00000000 },
+   { 0x00800001, 0x21a00229, 0x00b10730, 0x00000000 },
+   { 0x00800001, 0x21800229, 0x00b10720, 0x00000000 },
+   { 0x00800001, 0x21600229, 0x00b10710, 0x00000000 },
+   { 0x00800001, 0x21400229, 0x00b10700, 0x00000000 },
+   { 0x00800001, 0x22600229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x23600229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x22400229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x23400229, 0x008d0900, 0x00000000 },
+   { 0x00000005, 0x24000c20, 0x000000b8, 0x00ffffff },
+   { 0x04000010, 0x20000c04, 0x00000400, 0x00ffffff },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000052 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x27000cc1, 0x00000020, 0x02498007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x28000cc1, 0x00000020, 0x02198008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x04600031, 0x29000cc1, 0x00000020, 0x02198009 },
+   { 0x00800001, 0x28200229, 0x008d0810, 0x00000000 },
+   { 0x00800001, 0x29200229, 0x008d0910, 0x00000000 },
+   { 0x00800001, 0x28000229, 0x008d0800, 0x00000000 },
+   { 0x00800001, 0x29000229, 0x008d0900, 0x00000000 },
+   { 0x00000001, 0x26000228, 0x000000ba, 0x00000000 },
+   { 0x00610001, 0x24400129, 0x000000b8, 0x00000000 },
+   { 0x00710001, 0x24400169, 0x00000000, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000440, 0x00000000 },
+   { 0x00910001, 0x41400231, 0x02b10700, 0x00000000 },
+   { 0x00910001, 0x22400231, 0x028d0800, 0x00000000 },
+   { 0x00910001, 0x23400231, 0x028d0900, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000442, 0x00000000 },
+   { 0x00910001, 0x41410231, 0x02b10701, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000444, 0x00000000 },
+   { 0x00910001, 0x41800231, 0x02b10720, 0x00000000 },
+   { 0x00910001, 0x22500231, 0x028d0810, 0x00000000 },
+   { 0x00910001, 0x23500231, 0x028d0910, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000446, 0x00000000 },
+   { 0x00910001, 0x41810231, 0x02b10721, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x00000448, 0x00000000 },
+   { 0x00910001, 0x41c00231, 0x02b10740, 0x00000000 },
+   { 0x00910001, 0x22600231, 0x028d0820, 0x00000000 },
+   { 0x00910001, 0x23600231, 0x028d0920, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044a, 0x00000000 },
+   { 0x00910001, 0x41c10231, 0x02b10741, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044c, 0x00000000 },
+   { 0x00910001, 0x42000231, 0x02b10760, 0x00000000 },
+   { 0x00910001, 0x22700231, 0x028d0830, 0x00000000 },
+   { 0x00910001, 0x23700231, 0x028d0930, 0x00000000 },
+   { 0x00000001, 0x26020128, 0x0000044e, 0x00000000 },
+   { 0x00910001, 0x42010231, 0x02b10761, 0x00000000 },
+   { 0x00200001, 0x210001a5, 0x004500a0, 0x00000000 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x0007000f },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20140, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20160, 0x00000000 },
+   { 0x00800001, 0x20600232, 0x00d20180, 0x00000000 },
+   { 0x00800001, 0x20700232, 0x00d201a0, 0x00000000 },
+   { 0x00800001, 0x20800232, 0x00d201c0, 0x00000000 },
+   { 0x00800001, 0x20900232, 0x00d201e0, 0x00000000 },
+   { 0x00800001, 0x20a00232, 0x00d20200, 0x00000000 },
+   { 0x00800001, 0x20b00232, 0x00d20220, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x0a094007 },
+   { 0x0020000c, 0x21003da5, 0x004500a0, 0x00010001 },
+   { 0x00000001, 0x21080061, 0x00000000, 0x00030007 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20240, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20260, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x04094008 },
+   { 0x00600001, 0x20200022, 0x008d0100, 0x00000000 },
+   { 0x00800001, 0x20400232, 0x00d20340, 0x00000000 },
+   { 0x00800001, 0x20500232, 0x00d20360, 0x00000000 },
+   { 0x05600031, 0x20000cc4, 0x00000020, 0x04094009 },
+   { 0x01000040, 0x20863dad, 0x00000086, 0xffffffff },
+   { 0x00000040, 0x20a03dad, 0x000000a0, 0x00100010 },
+   { 0x05000010, 0x200035ac, 0x020000a0, 0x00000084 },
+   { 0x00010220, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00010220, 0x34001c00, 0x02001400, 0xffffff46 },
+   { 0x00000001, 0x20a001ad, 0x0000008a, 0x00000000 },
+   { 0x00000040, 0x20a23dad, 0x000000a2, 0x00080008 },
+   { 0x00000220, 0x34001c00, 0x00001400, 0xffffff40 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x07000031, 0x20001cc4, 0x000001e0, 0x82000010 },
+   { 0x00600001, 0x21e00022, 0x008d0000, 0x00000000 },
+   { 0x07000031, 0x20001cc4, 0x000001e0, 0x82000010 },