diff options
author | ywan171 <yi.a.wang@intel.com> | 2014-10-10 14:37:22 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-10-13 20:56:21 -0700 |
commit | b35344f5c0b8568df0630efe9fce076e810de8d3 (patch) | |
tree | 997156686151be57e9ffb9fb9d822f6512b659bb | |
parent | ba2d3b1bba4f6221cd2b386d60cbaac08155d88e (diff) | |
download | android_hardware_intel_img_psb_video-b35344f5c0b8568df0630efe9fce076e810de8d3.tar.gz android_hardware_intel_img_psb_video-b35344f5c0b8568df0630efe9fce076e810de8d3.tar.bz2 android_hardware_intel_img_psb_video-b35344f5c0b8568df0630efe9fce076e810de8d3.zip |
add vsp vp8 encoder into build
Bug: 17783054
BZ: 225951
Change-Id: Ic0883ff983c2b34ac7c7c104ce312d5bf33bf405
Signed-off-by: ywan171 <yi.a.wang@intel.com>
-rw-r--r-- | src/Android.mk | 12 | ||||
-rwxr-xr-x | src/android/psb_android_glue.cpp | 6 | ||||
-rwxr-xr-x | src/pnw_rotate.c | 2 | ||||
-rw-r--r-- | src/vsp_VPP.c | 74 | ||||
-rw-r--r-- | src/vsp_VPP.h | 2 | ||||
-rw-r--r-- | src/vsp_cmdbuf.c | 6 | ||||
-rw-r--r-- | src/vsp_compose.h | 2 | ||||
-rw-r--r-- | src/vsp_vp8.c | 6 | ||||
-rw-r--r-- | src/vsp_vp8.h | 2 |
9 files changed, 56 insertions, 56 deletions
diff --git a/src/Android.mk b/src/Android.mk index 7f7b5d0..3710475 100644 --- a/src/Android.mk +++ b/src/Android.mk @@ -94,15 +94,11 @@ LOCAL_SRC_FILES += \ tng_jpegES.c \ tng_slotorder.c \ tng_hostair.c \ - tng_trace.c - -ifeq ($(TARGET_HAS_VPP),true) -LOCAL_SRC_FILES += \ + tng_trace.c \ vsp_VPP.c \ - vsp_cmdbuf.c \ vsp_vp8.c \ - vsp_compose.c -endif + vsp_cmdbuf.c \ + vsp_compose.c \ ifeq ($(TARGET_HAS_VPP),true) @@ -113,6 +109,7 @@ endif ifeq ($(TARGET_HAS_VPP),true) LOCAL_SHARED_LIBRARIES += libvpp_setting +LOCAL_CFLAGS += DPSBVIDEO_MRFL_VPP_SETTING endif @@ -122,6 +119,7 @@ LOCAL_CFLAGS += \ -DPSBVIDEO_VPP_TILING -DSLICE_HEADER_PARSING else LOCAL_CFLAGS += \ + -DPSBVIDEO_MRFL_VPP \ -DPSBVIDEO_MRFL \ -DSLICE_HEADER_PARSING endif diff --git a/src/android/psb_android_glue.cpp b/src/android/psb_android_glue.cpp index 52d4cd7..9d5b88e 100755 --- a/src/android/psb_android_glue.cpp +++ b/src/android/psb_android_glue.cpp @@ -44,7 +44,7 @@ #ifdef TARGET_HAS_MULTIPLE_DISPLAY #include "psb_mds.h" #endif -#if defined (PSBVIDEO_MRFL_VPP) && !defined (TARGET_HAS_MULTIPLE_DISPLAY) +#if defined (PSBVIDEO_MRFL_VPP_SETTING) && !defined (TARGET_HAS_MULTIPLE_DISPLAY) #include <VPPSetting.h> #endif @@ -149,8 +149,12 @@ int psb_android_get_mds_vpp_state(void* output) { #ifdef PSBVIDEO_MRFL_VPP int psb_android_get_vpp_state() { +#ifdef PSBVIDEO_MRFL_VPP_SETTING bool ret = VPPSetting::isVppOn(); return (ret ? 1 : 0); +#else + return 0; +#endif } #endif diff --git a/src/pnw_rotate.c b/src/pnw_rotate.c index d0024d7..ebec022 100755 --- a/src/pnw_rotate.c +++ b/src/pnw_rotate.c @@ -109,7 +109,7 @@ static int get_surface_stride(int width, int tiling) #ifdef PSBVIDEO_MRFL_VPP -static int isVppOn(void* output) { +static int isVppOn(void __maybe_unused *output) { #ifdef TARGET_HAS_MULTIPLE_DISPLAY return psb_android_get_mds_vpp_state(output); #else diff --git a/src/vsp_VPP.c b/src/vsp_VPP.c index 9e7ba9e..5feb3fc 100644 --- a/src/vsp_VPP.c +++ b/src/vsp_VPP.c @@ -135,21 +135,21 @@ struct filter_strength vpp_strength[STRENGTH_NUM] = { * type(0-Denoise,1-Deblock), value_thr, cnt_thr, coef, temp_thr1, temp_thr2, _pad[2] */ .denoise_deblock = { - [QCIF_TO_QVGA] = {1, 15, 47, 35, 0, 0, 0, 0}, - [QVGA_TO_VGA] = {0, 7, 48, 47, 0, 0, 0, 0}, - [VGA_TO_SD] = {0, 10, 8, 9, 1, 3, 0, 0}, - [SD_TO_720P] = {0, 10, 48, 47, 0, 0, 0, 0}, - [HD720P_TO_1080P] = {0, 10, 48, 47, 0, 0, 0, 0} + [QCIF_TO_QVGA] = {1, 15, 47, 35, 0, 0, {0, 0}}, + [QVGA_TO_VGA] = {0, 7, 48, 47, 0, 0, {0, 0}}, + [VGA_TO_SD] = {0, 10, 8, 9, 1, 3, {0, 0}}, + [SD_TO_720P] = {0, 10, 48, 47, 0, 0, {0, 0}}, + [HD720P_TO_1080P] = {0, 10, 48, 47, 0, 0, {0, 0}} }, /* structure: * temp_detect, temp_correct, clip_thr, mid_thr, luma_amm, chroma_amm, _pad[2] */ .enhancer = { - [QCIF_TO_QVGA] = {200, 100, 1, 42, 40, 60, 0, 0}, - [QVGA_TO_VGA] = {220, 180, 1, 42, 40, 60, 0, 0}, - [VGA_TO_SD] = {220, 200, 1, 42, 40, 60, 0, 0}, - [SD_TO_720P] = {100, 100, 5, 33, 0, 0, 0, 0}, - [HD720P_TO_1080P] = {100, 100, 5, 33, 0, 0, 0, 0} + [QCIF_TO_QVGA] = {200, 100, 1, 42, 40, 60, {0, 0}}, + [QVGA_TO_VGA] = {220, 180, 1, 42, 40, 60, {0, 0}}, + [VGA_TO_SD] = {220, 200, 1, 42, 40, 60, {0, 0}}, + [SD_TO_720P] = {100, 100, 5, 33, 0, 0, {0, 0}}, + [HD720P_TO_1080P] = {100, 100, 5, 33, 0, 0, {0, 0}} }, .sharpen = { [QCIF_TO_QVGA] = { .quality = SHARPEN_ON }, @@ -161,18 +161,18 @@ struct filter_strength vpp_strength[STRENGTH_NUM] = { }, [MEDIUM_STRENGTH] = { .denoise_deblock = { - [QCIF_TO_QVGA] = {1, 25, 47, 12, 0, 0, 0, 0}, - [QVGA_TO_VGA] = {0, 10, 48, 47, 0, 0, 0, 0}, - [VGA_TO_SD] = {0, 20, 8, 9, 2, 4, 0, 0}, - [SD_TO_720P] = {0, 10, 48, 47, 0, 0, 0, 0}, - [HD720P_TO_1080P] = {0, 10, 48, 47, 0, 0, 0, 0} + [QCIF_TO_QVGA] = {1, 25, 47, 12, 0, 0, {0, 0}}, + [QVGA_TO_VGA] = {0, 10, 48, 47, 0, 0, {0, 0}}, + [VGA_TO_SD] = {0, 20, 8, 9, 2, 4, {0, 0}}, + [SD_TO_720P] = {0, 10, 48, 47, 0, 0, {0, 0}}, + [HD720P_TO_1080P] = {0, 10, 48, 47, 0, 0, {0, 0}} }, .enhancer = { - [QCIF_TO_QVGA] = {100, 100, 1, 33, 100, 100, 0, 0}, - [QVGA_TO_VGA] = {100, 180, 1, 33, 100, 100, 0, 0}, - [VGA_TO_SD] = {100, 200, 1, 33, 100, 100, 0, 0}, - [SD_TO_720P] = {100, 100, 5, 33, 0, 0, 0, 0}, - [HD720P_TO_1080P] = {100, 100, 5, 33, 0, 0, 0, 0} + [QCIF_TO_QVGA] = {100, 100, 1, 33, 100, 100, {0, 0}}, + [QVGA_TO_VGA] = {100, 180, 1, 33, 100, 100, {0, 0}}, + [VGA_TO_SD] = {100, 200, 1, 33, 100, 100, {0, 0}}, + [SD_TO_720P] = {100, 100, 5, 33, 0, 0, {0, 0}}, + [HD720P_TO_1080P] = {100, 100, 5, 33, 0, 0, {0, 0}} }, .sharpen = { [QCIF_TO_QVGA] = { .quality = SHARPEN_ON }, @@ -184,18 +184,18 @@ struct filter_strength vpp_strength[STRENGTH_NUM] = { }, [HIGH_STRENGTH] = { .denoise_deblock = { - [QCIF_TO_QVGA] = {1, 30, 40, 10, 0, 0, 0, 0}, - [QVGA_TO_VGA] = {0, 15, 45, 25, 0, 0, 0, 0}, - [VGA_TO_SD] = {0, 20, 7, 5, 3, 6, 0, 0}, - [SD_TO_720P] = {0, 10, 48, 47, 0, 0, 0, 0}, - [HD720P_TO_1080P] = {0, 10, 48, 47, 0, 0, 0, 0} + [QCIF_TO_QVGA] = {1, 30, 40, 10, 0, 0, {0, 0}}, + [QVGA_TO_VGA] = {0, 15, 45, 25, 0, 0, {0, 0}}, + [VGA_TO_SD] = {0, 20, 7, 5, 3, 6, {0, 0}}, + [SD_TO_720P] = {0, 10, 48, 47, 0, 0, {0, 0}}, + [HD720P_TO_1080P] = {0, 10, 48, 47, 0, 0, {0, 0}} }, .enhancer = { - [QCIF_TO_QVGA] = {100, 100, 5, 33, 150, 200, 0, 0}, - [QVGA_TO_VGA] = {100, 180, 5, 33, 150, 200, 0, 0}, - [VGA_TO_SD] = {100, 200, 5, 33, 100, 150, 0, 0}, - [SD_TO_720P] = {100, 100, 5, 33, 0, 0, 0, 0}, - [HD720P_TO_1080P] = {100, 100, 5, 33, 0, 0, 0, 0} + [QCIF_TO_QVGA] = {100, 100, 5, 33, 150, 200, {0, 0}}, + [QVGA_TO_VGA] = {100, 180, 5, 33, 150, 200, {0, 0}}, + [VGA_TO_SD] = {100, 200, 5, 33, 100, 150, {0, 0}}, + [SD_TO_720P] = {100, 100, 5, 33, 0, 0, {0, 0}}, + [HD720P_TO_1080P] = {100, 100, 5, 33, 0, 0, {0, 0}} }, .sharpen = { [QCIF_TO_QVGA] = { .quality = SHARPEN_ON }, @@ -215,10 +215,10 @@ static int check_resolution(int width, int height); static int check_vpp_strength(int value); static void vsp_VPP_QueryConfigAttributes( - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, - int num_attribs) + VAProfile __maybe_unused profile, + VAEntrypoint __maybe_unused entrypoint, + VAConfigAttrib __maybe_unused *attrib_list, + int __maybe_unused num_attribs) { /* No VPP specific attributes */ return; @@ -538,8 +538,8 @@ static VAStatus vsp__VPP_process_pipeline_param(context_VPP_p ctx, object_contex #endif /* According to VIED's design, the width must be multiple of 16 */ width = ALIGN_TO_16(input_surface->width); - if (width > input_surface->psb_surface->stride) - width = input_surface->psb_surface->stride; + if (width > (int)input_surface->psb_surface->stride) + width = (int)input_surface->psb_surface->stride; /* Setup input surface */ cell_proc_picture_param->num_input_pictures = 1; @@ -633,7 +633,7 @@ static VAStatus vsp__VPP_process_pipeline_param(context_VPP_p ctx, object_contex /* According to VIED's design, the width must be multiple of 16 */ width = ALIGN_TO_16(cur_output_surf->width); - if (width > cur_output_surf->psb_surface->stride) + if (width > (int)cur_output_surf->psb_surface->stride) width = cur_output_surf->psb_surface->stride; height = cur_output_surf->height_origin; stride = cur_output_surf->psb_surface->stride; diff --git a/src/vsp_VPP.h b/src/vsp_VPP.h index 579c762..afd7162 100644 --- a/src/vsp_VPP.h +++ b/src/vsp_VPP.h @@ -30,7 +30,7 @@ #define _VSP_VPP_H_ #include "psb_drv_video.h" -#include <linux/vsp_fw.h> +#include "vsp_fw.h" #define CONTEXT_VPP_ID 0 #define CONTEXT_VP8_ID 1 diff --git a/src/vsp_cmdbuf.c b/src/vsp_cmdbuf.c index 6ee7b83..a5a6ee3 100644 --- a/src/vsp_cmdbuf.c +++ b/src/vsp_cmdbuf.c @@ -284,7 +284,7 @@ static int vspDRMCmdBuf(int fd, int ioctl_offset, psb_buffer_p *buffer_list, int buffer_count, unsigned cmdBufHandle, unsigned cmdBufOffset, unsigned cmdBufSize, unsigned relocBufHandle, unsigned relocBufOffset, - unsigned numRelocs, int damage, + unsigned __maybe_unused numRelocs, int __maybe_unused damage, unsigned engine, unsigned fence_flags, struct psb_ttm_fence_rep *fence_rep) { drm_psb_cmdbuf_arg_t ca; @@ -292,7 +292,6 @@ vspDRMCmdBuf(int fd, int ioctl_offset, psb_buffer_p *buffer_list, int buffer_cou int i; int ret = 0; uint64_t mask = PSB_GPU_ACCESS_MASK; - arg_list = (struct psb_validate_arg *) calloc(1, sizeof(struct psb_validate_arg) * buffer_count); if (arg_list == NULL) { drv_debug_msg(VIDEO_DEBUG_ERROR, "Allocate memory failed\n"); @@ -382,9 +381,8 @@ out: * * Returns 0 on success */ -int vsp_context_submit_cmdbuf(object_context_p obj_context) +int vsp_context_submit_cmdbuf(object_context_p __maybe_unused obj_context) { - return 0; } diff --git a/src/vsp_compose.h b/src/vsp_compose.h index 1900ebf..8876d93 100644 --- a/src/vsp_compose.h +++ b/src/vsp_compose.h @@ -31,7 +31,7 @@ #include "psb_drv_video.h" #include "vsp_VPP.h" -#include <linux/vsp_fw.h> +#include "vsp_fw.h" VAStatus vsp_compose_process_pipeline_param(context_VPP_p ctx, object_context_p obj_context, object_buffer_p obj_buffer); diff --git a/src/vsp_vp8.c b/src/vsp_vp8.c index e5e3269..2e0315e 100644 --- a/src/vsp_vp8.c +++ b/src/vsp_vp8.c @@ -102,8 +102,8 @@ static void vsp_VP8_DestroyContext(object_context_p obj_context); static VAStatus vsp__VP8_check_legal_picture(object_context_p obj_context, object_config_p obj_config); static void vsp_VP8_QueryConfigAttributes( - VAProfile profile, - VAEntrypoint entrypoint, + VAProfile __maybe_unused profile, + VAEntrypoint __maybe_unused entrypoint, VAConfigAttrib *attrib_list, int num_attribs) { @@ -115,7 +115,7 @@ static void vsp_VP8_QueryConfigAttributes( case VAConfigAttribRTFormat: break; case VAConfigAttribRateControl: - attrib_list[i].value = VA_RC_CBR | VA_RC_VCM; + attrib_list[i].value = VA_RC_CBR | VA_RC_VCM | VA_RC_VBR; break; case VAConfigAttribEncAutoReference: attrib_list[i].value = 1; diff --git a/src/vsp_vp8.h b/src/vsp_vp8.h index d01214b..029862a 100644 --- a/src/vsp_vp8.h +++ b/src/vsp_vp8.h @@ -31,7 +31,7 @@ #define _VSP_VP8_H_ #include "psb_drv_video.h" -#include <linux/vsp_fw.h> +#include "vsp_fw.h" extern struct format_vtable_s vsp_VP8_vtable; |