[Libva] [PATCH 0/7 v2] Add RGBX<-->NV12 conversion in post-processing
Zhao Halley
halley.zhao at intel.com
Thu Jul 19 20:15:33 PDT 2012
Thanks to Haihao and Gwenole's feedback.
V2 update:
- both BGRX and RGBX to/from NV12 is supported, a flag is added
in statci parameter on C programing side
- split RGBX/RGBA/BGRX/BGRA format support to a separate patch
- define more alias in asm code to make it readable
- fix an issue of loop counter control of surface processing
it should be calculated by first plane width in pixel, not in byte
- drop AYUV which is not related to this patch
- remove y/cb/cr info which is not necessary for RGB format
- use more switch than if
- define NUM_PP_MODULES in the enum
History:
V1:
add RGB to NV12 and NV12 to RGB conversion
- either is implemented in 2 ways: 8.8 fix point or float point
however, it doesn't show performance difference in my test
- RGB to NV12 conversion can be used to load video frames for futhure processing
- NV12 to RGB conversion can be used for fine control of video rendering:
for example: RGB565 support, color correction
- for RGBX layout, we follows BMP image, that is: |B|G|R|X| in memory layout
Zhao Halley (7):
add RGB format surface support
distinguish first plane width in pixel or in byte
define RGB layout in static parameter
add GPU shader for RGB->NV12 conversion
add rgbx to nv12 conversion in post-processing
add GPU shader for NV12->RGBX conversion
add nv12 to rgb conversion in post processing
src/i965_defines.h | 1 +
src/i965_drv_video.c | 100 ++-
src/i965_post_processing.c | 211 +++++-
src/i965_post_processing.h | 9 +-
.../gen5_6/Common/NV12_Load_8x4.asm | 32 +-
.../post_processing/gen5_6/Common/PL2_Load.inc | 3 +
.../gen5_6/Common/RGBX_Load_16x8.asm | 57 ++
.../gen5_6/Common/RGBX_Load_16x8.inc | 48 ++
.../gen5_6/Common/RGBX_Save_YUV_Fix.asm | 115 +++
.../gen5_6/Common/RGBX_Save_YUV_Float.asm | 152 ++++
.../gen5_6/Common/RGBX_to_YUV_Coef.asm | 64 ++
.../gen5_6/Common/YUVX_Save_RGBX_Fix.asm | 170 +++++
.../gen5_6/Common/YUVX_Save_RGBX_Float.asm | 287 +++++++
.../gen5_6/Common/YUV_to_RGBX_Coef.asm | 99 +++
src/shaders/post_processing/gen5_6/Makefile.am | 14 +
.../post_processing/gen5_6/nv12_load_save_rgbx.asm | 25 +
.../gen5_6/nv12_load_save_rgbx.g4b.gen5 | 717 ++++++++++++++++++
.../post_processing/gen5_6/nv12_load_save_rgbx.g6b | 790 ++++++++++++++++++++
.../post_processing/gen5_6/rgbx_load_save_nv12.asm | 26 +
.../gen5_6/rgbx_load_save_nv12.g4b.gen5 | 566 ++++++++++++++
.../post_processing/gen5_6/rgbx_load_save_nv12.g6b | 639 ++++++++++++++++
21 files changed, 4081 insertions(+), 44 deletions(-)
mode change 100644 => 100755 src/i965_defines.h
mode change 100644 => 100755 src/shaders/post_processing/gen5_6/Common/NV12_Load_8x4.asm
mode change 100644 => 100755 src/shaders/post_processing/gen5_6/Common/PL2_Load.inc
create mode 100755 src/shaders/post_processing/gen5_6/Common/RGBX_Load_16x8.asm
create mode 100755 src/shaders/post_processing/gen5_6/Common/RGBX_Load_16x8.inc
create mode 100755 src/shaders/post_processing/gen5_6/Common/RGBX_Save_YUV_Fix.asm
create mode 100755 src/shaders/post_processing/gen5_6/Common/RGBX_Save_YUV_Float.asm
create mode 100755 src/shaders/post_processing/gen5_6/Common/RGBX_to_YUV_Coef.asm
create mode 100755 src/shaders/post_processing/gen5_6/Common/YUVX_Save_RGBX_Fix.asm
create mode 100755 src/shaders/post_processing/gen5_6/Common/YUVX_Save_RGBX_Float.asm
create mode 100755 src/shaders/post_processing/gen5_6/Common/YUV_to_RGBX_Coef.asm
create mode 100755 src/shaders/post_processing/gen5_6/nv12_load_save_rgbx.asm
create mode 100644 src/shaders/post_processing/gen5_6/nv12_load_save_rgbx.g4b.gen5
create mode 100644 src/shaders/post_processing/gen5_6/nv12_load_save_rgbx.g6b
create mode 100755 src/shaders/post_processing/gen5_6/rgbx_load_save_nv12.asm
create mode 100644 src/shaders/post_processing/gen5_6/rgbx_load_save_nv12.g4b.gen5
create mode 100644 src/shaders/post_processing/gen5_6/rgbx_load_save_nv12.g6b
--
1.7.4.1
More information about the Libva
mailing list