From 2f5f0962f9a42068c06edc99c591d6915ca5691f Mon Sep 17 00:00:00 2001 From: Austin Yuan Date: Sun, 19 Jun 2011 20:15:23 -0700 Subject: [PATCH] test/putsurface: add UV element into the auto-generated image Signed-off-by: Austin Yuan --- test/encode/h264encode_common.c | 2 +- test/encode/loadsurface.h | 1 - test/{putsurface => }/loadsurface.h | 130 +- test/loadsurface_yuv.h | 28836 ++++++++++++++++++++++++++++++++++ test/putsurface/putsurface_common.c | 2 +- 5 files changed, 28967 insertions(+), 4 deletions(-) delete mode 120000 test/encode/loadsurface.h rename test/{putsurface => }/loadsurface.h (52%) create mode 100644 test/loadsurface_yuv.h diff --git a/test/encode/h264encode_common.c b/test/encode/h264encode_common.c index 97dd719..a1e24d6 100644 --- a/test/encode/h264encode_common.c +++ b/test/encode/h264encode_common.c @@ -52,7 +52,7 @@ if (va_status != VA_STATUS_SUCCESS) { \ exit(1); \ } -#include "loadsurface.h" +#include "../loadsurface.h" #define SURFACE_NUM 18 /* 16 surfaces for src, 2 surface for reconstructed/reference */ #define CODEDBUF_NUM 5 static VADisplay va_dpy; diff --git a/test/encode/loadsurface.h b/test/encode/loadsurface.h deleted file mode 120000 index fb38e2f..0000000 --- a/test/encode/loadsurface.h +++ /dev/null @@ -1 +0,0 @@ -../putsurface/loadsurface.h \ No newline at end of file diff --git a/test/putsurface/loadsurface.h b/test/loadsurface.h similarity index 52% rename from test/putsurface/loadsurface.h rename to test/loadsurface.h index 1aac393..2cd09c3 100644 --- a/test/putsurface/loadsurface.h +++ b/test/loadsurface.h @@ -21,6 +21,120 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include "loadsurface_yuv.h" + +static int scale_2dimage(unsigned char *src_img, int src_imgw, int src_imgh, + unsigned char *dst_img, int dst_imgw, int dst_imgh) +{ + int row=0, col=0; + + for (row=0; row