summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-06-23 14:12:47 -0700
committerNick Pelly <npelly@google.com>2010-06-23 17:07:16 -0700
commit090b8e2b897c4f59d0bbafe983390c2e22c972fe (patch)
treee6b1ca9460df03048f321fd29accf322489c823b
parent47e37c4428509524ee576920a98381f3e4872493 (diff)
downloadandroid_hardware_qcom_media-090b8e2b897c4f59d0bbafe983390c2e22c972fe.tar.gz
android_hardware_qcom_media-090b8e2b897c4f59d0bbafe983390c2e22c972fe.tar.bz2
android_hardware_qcom_media-090b8e2b897c4f59d0bbafe983390c2e22c972fe.zip
Fix Android.mk and compiler warnings.
I removed dozens of warnings, and then gave up - there are dozens more. Change-Id: I7385ae73eac9d07654016a20de6b69d37c867463
-rw-r--r--omx/mm-core/Android.mk8
-rw-r--r--omx/mm-core/omxcore/Android.mk31
-rw-r--r--omx/mm-core/omxcore/src/common/qc_omx_core.c2
-rw-r--r--omx/mm-video/Android.mk17
-rw-r--r--omx/mm-video/vidc/vdec/Android.mk18
-rw-r--r--omx/mm-video/vidc/vdec/inc/omx_vdec.h2
-rw-r--r--omx/mm-video/vidc/vdec/src/frameparser.cpp6
-rw-r--r--omx/mm-video/vidc/vdec/src/omx_vdec.cpp35
-rw-r--r--omx/mm-video/vidc/vdec/test/decoder_driver_test.c20
-rw-r--r--omx/mm-video/vidc/vdec/test/omx_vdec_test.cpp208
-rw-r--r--omx/mm-video/vidc/venc/Android.mk13
-rw-r--r--omx/mm-video/vidc/venc/inc/omx_video_base.h2
12 files changed, 88 insertions, 274 deletions
diff --git a/omx/mm-core/Android.mk b/omx/mm-core/Android.mk
index 8e93b98a..ad9949a6 100644
--- a/omx/mm-core/Android.mk
+++ b/omx/mm-core/Android.mk
@@ -29,4 +29,10 @@
OMX_CORE_PATH := $(call my-dir)
include $(CLEAR_VARS)
-include $(OMX_CORE_PATH)/omxcore/Android.mk
+ifneq ($(BUILD_TINY_ANDROID),true)
+
+ifeq ($(TARGET_BOARD_PLATFORM),msm7x30)
+ include $(OMX_CORE_PATH)/omxcore/Android.mk
+endif
+
+endif #BUILD_TINY_ANDROID
diff --git a/omx/mm-core/omxcore/Android.mk b/omx/mm-core/omxcore/Android.mk
index de91b220..aa9383e3 100644
--- a/omx/mm-core/omxcore/Android.mk
+++ b/omx/mm-core/omxcore/Android.mk
@@ -25,34 +25,18 @@
#OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#--------------------------------------------------------------------------
-ifneq ($(BUILD_TINY_ANDROID),true)
-
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-OMXCORE_CFLAGS := -g -O3 -DVERBOSE
-OMXCORE_CFLAGS += -O0 -fno-inline -fno-short-enums
+#OMXCORE_CFLAGS := -g -O3 -DVERBOSE
+#OMXCORE_CFLAGS += -O0 -fno-inline -fno-short-enums
OMXCORE_CFLAGS += -D_ANDROID_
OMXCORE_CFLAGS += -D_ENABLE_QC_MSG_LOG_
-#===============================================================================
-# Figure out the targets
-#===============================================================================
-
-ifeq "$(findstring qsd8250,$(TARGET_PRODUCT))" "qsd8250"
-MM_CORE_TARGET = 8250
-else ifeq "$(findstring msm7627,$(TARGET_PRODUCT))" "msm7627"
-MM_CORE_TARGET = 7627
-else ifeq "$(findstring msm7625,$(TARGET_PRODUCT))" "msm7625"
-MM_CORE_TARGET = 7625
-else ifeq "$(findstring msm7630,$(TARGET_PRODUCT))" "msm7630"
-MM_CORE_TARGET = 7630
-else ifeq "$(findstring msm8660,$(TARGET_PRODUCT))" "msm8660"
-MM_CORE_TARGET = 8660
-else ifeq "$(findstring qsd8650a,$(TARGET_PRODUCT))" "qsd8650a"
-MM_CORE_TARGET =8x50A
+ifeq ($(TARGET_BOARD_PLATFORM),msm7x30)
+ MM_CORE_TARGET = 7630
else
-MM_CORE_TARGET = default
+ $(error Unsupported target platform $(TARGET_BOARD_PLATFORM))
endif
#===============================================================================
@@ -77,14 +61,12 @@ LOCAL_COPY_HEADERS += inc/qc_omx_msg.h
LOCAL_COPY_HEADERS += inc/QOMX_AudioExtensions.h
LOCAL_COPY_HEADERS += inc/QOMX_AudioIndexExtensions.h
-
#===============================================================================
# LIBRARY for Android apps
#===============================================================================
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/common
LOCAL_C_INCLUDES += $(LOCAL_PATH)/inc
-LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := libOmxCore
LOCAL_SHARED_LIBRARIES := liblog libdl
LOCAL_CFLAGS := $(OMXCORE_CFLAGS)
@@ -103,7 +85,6 @@ include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/common
LOCAL_C_INCLUDES += $(LOCAL_PATH)/inc
-LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := libmm-omxcore
LOCAL_SHARED_LIBRARIES := liblog libdl
LOCAL_CFLAGS := $(OMXCORE_CFLAGS)
@@ -113,5 +94,3 @@ LOCAL_SRC_FILES += src/common/qc_omx_core.c
LOCAL_SRC_FILES += src/$(MM_CORE_TARGET)/qc_registry_table.c
include $(BUILD_SHARED_LIBRARY)
-
-endif #BUILD_TINY_ANDROID
diff --git a/omx/mm-core/omxcore/src/common/qc_omx_core.c b/omx/mm-core/omxcore/src/common/qc_omx_core.c
index 88df1fc2..95493a06 100644
--- a/omx/mm-core/omxcore/src/common/qc_omx_core.c
+++ b/omx/mm-core/omxcore/src/common/qc_omx_core.c
@@ -522,7 +522,7 @@ OMX_FreeHandle(OMX_IN OMX_HANDLETYPE hComp)
if ((eRet = qc_omx_component_deinit(hComp)) == OMX_ErrorNone)
{
/* Unload component library */
- if( (i < SIZE_OF_CORE) && core[i].so_lib_handle)
+ if( ((unsigned int)i < SIZE_OF_CORE) && core[i].so_lib_handle)
{
if(check_lib_unload(i))
{
diff --git a/omx/mm-video/Android.mk b/omx/mm-video/Android.mk
index bb2622ee..13756a29 100644
--- a/omx/mm-video/Android.mk
+++ b/omx/mm-video/Android.mk
@@ -29,22 +29,11 @@
OMX_VIDEO_PATH := $(call my-dir)
include $(CLEAR_VARS)
-ifeq "$(findstring qsd8250,$(TARGET_PRODUCT))" "qsd8250"
- include $(OMX_VIDEO_PATH)/qdsp6/vdec/Android.mk
- include $(OMX_VIDEO_PATH)/qdsp6/venc/Android.mk
-endif
-
-ifeq "$(findstring qsd8650a,$(TARGET_PRODUCT))" "qsd8650a"
- include $(OMX_VIDEO_PATH)/qdsp6/vdec/Android.mk
- include $(OMX_VIDEO_PATH)/qdsp6/venc/Android.mk
-endif
+ifneq ($(BUILD_TINY_ANDROID),true)
-ifeq "$(findstring msm7630,$(TARGET_PRODUCT))" "msm7630"
+ifeq ($(TARGET_BOARD_PLATFORM),msm7x30)
include $(OMX_VIDEO_PATH)/vidc/vdec/Android.mk
include $(OMX_VIDEO_PATH)/vidc/venc/Android.mk
endif
-ifeq "$(findstring msm8660,$(TARGET_PRODUCT))" "msm8660"
- include $(OMX_VIDEO_PATH)/vidc/vdec/Android.mk
- include $(OMX_VIDEO_PATH)/vidc/venc/Android.mk
-endif \ No newline at end of file
+endif #BUILD_TINY_ANDROID
diff --git a/omx/mm-video/vidc/vdec/Android.mk b/omx/mm-video/vidc/vdec/Android.mk
index d02d0cb0..bb6c6909 100644
--- a/omx/mm-video/vidc/vdec/Android.mk
+++ b/omx/mm-video/vidc/vdec/Android.mk
@@ -26,8 +26,6 @@
#ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#--------------------------------------------------------------------------
-ifneq ($(BUILD_TINY_ANDROID),true)
-
ROOT_DIR := $(call my-dir)
include $(CLEAR_VARS)
@@ -50,12 +48,8 @@ libOmxVdec-def += -UENABLE_DEBUG_LOW
libOmxVdec-def += -DENABLE_DEBUG_HIGH
libOmxVdec-def += -DENABLE_DEBUG_ERROR
libOmxVdec-def += -UMULTI_DEC_INST
-ifeq "$(findstring msm7630,$(TARGET_PRODUCT))" "msm7630"
libOmxVdec-def += -DMAX_RES_720P
-endif
-ifeq "$(findstring msm8660,$(TARGET_PRODUCT))" "msm8660"
-libOmxVdec-def += -DMAX_RES_1080P
-endif
+
# ---------------------------------------------------------------------------------
# Make the Shared library (libOmxVdec)
# ---------------------------------------------------------------------------------
@@ -86,10 +80,10 @@ include $(CLEAR_VARS)
mm-vdec-test-inc := $(TARGET_OUT_HEADERS)/mm-core/omxcore
mm-vdec-test-inc += $(LOCAL_PATH)/inc
+LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := mm-vdec-omx-test
LOCAL_CFLAGS := $(libOmxVdec-def)
LOCAL_C_INCLUDES := $(mm-vdec-test-inc)
-LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libutils libOmxCore libOmxVdec libbinder
LOCAL_SRC_FILES := src/queue.c
@@ -105,18 +99,12 @@ include $(CLEAR_VARS)
mm-vdec-drv-test-inc := $(TARGET_OUT_HEADERS)/mm-core/omxcore
mm-vdec-drv-test-inc += $(LOCAL_PATH)/inc
+LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := mm-video-driver-test
LOCAL_CFLAGS := $(libOmxVdec-def)
LOCAL_C_INCLUDES := $(mm-vdec-drv-test-inc)
-LOCAL_PRELINK_MODULE := false
LOCAL_SRC_FILES := src/message_queue.c
LOCAL_SRC_FILES += test/decoder_driver_test.c
include $(BUILD_EXECUTABLE)
-
-endif #BUILD_TINY_ANDROID
-
-# ---------------------------------------------------------------------------------
-# END
-# ---------------------------------------------------------------------------------
diff --git a/omx/mm-video/vidc/vdec/inc/omx_vdec.h b/omx/mm-video/vidc/vdec/inc/omx_vdec.h
index 557deddc..5b6c379d 100644
--- a/omx/mm-video/vidc/vdec/inc/omx_vdec.h
+++ b/omx/mm-video/vidc/vdec/inc/omx_vdec.h
@@ -49,7 +49,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C"{
#include<utils/Log.h>
}
-#define LOG_TAG "OMX-VDEC-720P"
+//#define LOG_TAG "OMX-VDEC-720P"
#ifdef ENABLE_DEBUG_LOW
#define DEBUG_PRINT_LOW LOGE
#else
diff --git a/omx/mm-video/vidc/vdec/src/frameparser.cpp b/omx/mm-video/vidc/vdec/src/frameparser.cpp
index 97cd8761..46ad9e88 100644
--- a/omx/mm-video/vidc/vdec/src/frameparser.cpp
+++ b/omx/mm-video/vidc/vdec/src/frameparser.cpp
@@ -46,14 +46,14 @@ static unsigned char H263_mask_code[4] = {0xFF,0xFF,0xFC,0x00};
static unsigned char VC1_AP_start_code[4] = {0x00,0x00,0x01,0x0D};
static unsigned char VC1_AP_mask_code[4] = {0xFF,0xFF,0xFF,0xFF};
-frame_parse::frame_parse():parse_state(A0),
+frame_parse::frame_parse():mutils(NULL),
+ parse_state(A0),
last_byte(0),
prev_one(0),
state_nal(NAL_LENGTH_ACC),
nal_length(0),
accum_length(0),
bytes_tobeparsed(0),
- mutils(NULL),
time_stamp (0),
flags (0)
{
@@ -338,6 +338,8 @@ int frame_parse::parse_mpeg4_frame ( OMX_BUFFERHEADERTYPE *source,
parse_state = A0;
}
break;
+ default:
+ break;
}
/*Found the code break*/
diff --git a/omx/mm-video/vidc/vdec/src/omx_vdec.cpp b/omx/mm-video/vidc/vdec/src/omx_vdec.cpp
index 33150665..ff82ad0d 100644
--- a/omx/mm-video/vidc/vdec/src/omx_vdec.cpp
+++ b/omx/mm-video/vidc/vdec/src/omx_vdec.cpp
@@ -253,8 +253,8 @@ omx_vdec::omx_vdec(): m_state(OMX_StateInvalid),
m_out_mem_ptr(NULL),
pending_input_buffers(0),
pending_output_buffers(0),
- m_out_buf_count(0),
m_out_bm_count(0),
+ m_out_buf_count(0),
m_inp_buf_count(OMX_VIDEO_DEC_NUM_INPUT_BUFFERS),
m_inp_buf_size(OMX_VIDEO_DEC_INPUT_BUFFER_SIZE),
m_inp_bm_count(0),
@@ -272,11 +272,11 @@ omx_vdec::omx_vdec(): m_state(OMX_StateInvalid),
m_inp_bEnabled(OMX_TRUE),
m_out_bEnabled(OMX_TRUE),
m_event_port_settings_sent(false),
+ input_flush_progress (false),
+ output_flush_progress (false),
m_platform_list(NULL),
m_platform_entry(NULL),
m_pmem_info(NULL),
- output_flush_progress (false),
- input_flush_progress (false),
input_use_buffer (false),
output_use_buffer (false),
m_ineos_reached (0),
@@ -290,8 +290,8 @@ omx_vdec::omx_vdec(): m_state(OMX_StateInvalid),
codec_type_parse ((codec_type)0),
first_frame_meta (true),
frame_count (0),
- nal_length(0),
nal_count (0),
+ nal_length(0),
look_ahead_nal (false),
first_frame(0),
first_buffer(NULL),
@@ -299,10 +299,10 @@ omx_vdec::omx_vdec(): m_state(OMX_StateInvalid),
set_seq_header_done(false),
gate_output_buffers(true),
gate_input_buffers(false),
- sent_first_frame(false),
stride(0),
- scan_lines(0),
+ sent_first_frame(false),
m_error_propogated(false),
+ scan_lines(0),
m_device_file_ptr(NULL),
m_vc1_profile((vc1_profile_type)0)
{
@@ -442,7 +442,7 @@ void omx_vdec::process_event_cb(void *ctxt, unsigned char id)
pThis->m_cb.EventHandler(&pThis->m_cmp, pThis->m_app_data,
OMX_EventError, OMX_ErrorInvalidState, p2, NULL);
}
- else if (p2 == OMX_ErrorHardware)
+ else if (p2 == (unsigned)OMX_ErrorHardware)
{
pThis->omx_report_error();
}
@@ -5517,14 +5517,14 @@ int omx_vdec::async_message_process (void *context, void* message)
output_respbuf = (struct vdec_output_frameinfo *)\
omxhdr->pOutputPortPrivate;
- output_respbuf->framesize.n_bottom = \
- vdec_msg->msgdata.output_frame.framesize.n_bottom;
- output_respbuf->framesize.n_left = \
- vdec_msg->msgdata.output_frame.framesize.n_left;
- output_respbuf->framesize.n_right = \
- vdec_msg->msgdata.output_frame.framesize.n_right;
- output_respbuf->framesize.n_top = \
- vdec_msg->msgdata.output_frame.framesize.n_top;
+ output_respbuf->framesize.bottom = \
+ vdec_msg->msgdata.output_frame.framesize.bottom;
+ output_respbuf->framesize.left = \
+ vdec_msg->msgdata.output_frame.framesize.left;
+ output_respbuf->framesize.right = \
+ vdec_msg->msgdata.output_frame.framesize.right;
+ output_respbuf->framesize.top = \
+ vdec_msg->msgdata.output_frame.framesize.top;
output_respbuf->len = vdec_msg->msgdata.output_frame.len;
output_respbuf->offset = vdec_msg->msgdata.output_frame.offset;
output_respbuf->time_stamp = vdec_msg->msgdata.output_frame.time_stamp;
@@ -6176,6 +6176,10 @@ bool omx_vdec::register_output_buffers()
bool omx_vdec::align_pmem_buffers(int pmem_fd, OMX_U32 buffer_size,
OMX_U32 alignment)
{
+//TODO: figure out if this is really necessary (PMEM_ALLOCATE_ALIGNED is a
+// QCOM extension to pmem
+ return true;
+#if 0
struct pmem_allocation allocation;
allocation.size = buffer_size;
allocation.align = clip2(alignment);
@@ -6189,5 +6193,6 @@ bool omx_vdec::align_pmem_buffers(int pmem_fd, OMX_U32 buffer_size,
return false;
}
return true;
+#endif
}
diff --git a/omx/mm-video/vidc/vdec/test/decoder_driver_test.c b/omx/mm-video/vidc/vdec/test/decoder_driver_test.c
index b6a324aa..c4c424f2 100644
--- a/omx/mm-video/vidc/vdec/test/decoder_driver_test.c
+++ b/omx/mm-video/vidc/vdec/test/decoder_driver_test.c
@@ -1009,14 +1009,14 @@ static void* async_thread (void *context)
DEBUG_PRINT ("\n Client Data value in %p", \
vdec_msg.msgdata.output_frame.client_data);
outputframe->bufferaddr = vdec_msg.msgdata.output_frame.bufferaddr;
- outputframe->framesize.n_bottom = \
- vdec_msg.msgdata.output_frame.framesize.n_bottom;
- outputframe->framesize.n_left = \
- vdec_msg.msgdata.output_frame.framesize.n_left;
- outputframe->framesize.n_right = \
- vdec_msg.msgdata.output_frame.framesize.n_right;
- outputframe->framesize.n_top = \
- vdec_msg.msgdata.output_frame.framesize.n_top;
+ outputframe->framesize.bottom = \
+ vdec_msg.msgdata.output_frame.framesize.bottom;
+ outputframe->framesize.left = \
+ vdec_msg.msgdata.output_frame.framesize.left;
+ outputframe->framesize.right = \
+ vdec_msg.msgdata.output_frame.framesize.right;
+ outputframe->framesize.top = \
+ vdec_msg.msgdata.output_frame.framesize.top;
outputframe->framesize = vdec_msg.msgdata.output_frame.framesize;
outputframe->len = vdec_msg.msgdata.output_frame.len;
outputframe->time_stamp = vdec_msg.msgdata.output_frame.time_stamp;
@@ -1162,7 +1162,7 @@ static int Read_Buffer_From_DAT_File(unsigned char *dataptr, unsigned int length
unsigned char *read_buffer=NULL;
char c = '1'; //initialize to anything except '\0'(0)
char inputFrameSize[10];
- int count =0; char cnt =0;
+ int count =0; int cnt =0;
memset(temp_buffer, 0, sizeof(temp_buffer));
while (cnt < 10)
@@ -1176,7 +1176,7 @@ static int Read_Buffer_From_DAT_File(unsigned char *dataptr, unsigned int length
inputFrameSize[cnt]='\0';
frameSize = atoi(inputFrameSize);
//length = 0;
- DEBUG_PRINT ("\n Frame Size is %d",frameSize);
+ DEBUG_PRINT ("\n Frame Size is %ld",frameSize);
/* get the frame length */
fseek(inputBufferFile, -1, SEEK_CUR);
diff --git a/omx/mm-video/vidc/vdec/test/omx_vdec_test.cpp b/omx/mm-video/vidc/vdec/test/omx_vdec_test.cpp
index a7c0cc52..2c45f27a 100644
--- a/omx/mm-video/vidc/vdec/test/omx_vdec_test.cpp
+++ b/omx/mm-video/vidc/vdec/test/omx_vdec_test.cpp
@@ -29,6 +29,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
An Open max test application ....
*/
+#define LOG_TAG "OMX-VDEC-TEST"
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -49,7 +51,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C"{
#include<utils/Log.h>
}
-#define LOG_TAG "OMX-VDEC-TEST"
#define DEBUG_PRINT
#define DEBUG_PRINT_ERROR
@@ -146,10 +147,9 @@ FILE * inputBufferFile;
FILE * outputBufferFile;
FILE * seqFile;
int takeYuvLog = 0;
-int displayYuv = 0;
int displayWindow = 0;
int realtime_display = 0;
-struct timeval t_avsync={0};
+struct timeval t_avsync={0,0};
Queue *etb_queue = NULL;
Queue *fbd_queue = NULL;
@@ -185,8 +185,6 @@ OMX_ERRORTYPE error;
static int fb_fd = -1;
static struct fb_var_screeninfo vinfo;
static struct fb_fix_screeninfo finfo;
-static struct mdp_overlay overlay, *overlayp;
-static struct msmfb_overlay_data ov_front;
static int vid_buf_front_id;
int overlay_fb(struct OMX_BUFFERHEADERTYPE *pBufHdr);
void overlay_set();
@@ -196,7 +194,7 @@ void render_fb(struct OMX_BUFFERHEADERTYPE *pBufHdr);
/************************************************************************/
/* GLOBAL INIT */
/************************************************************************/
-int input_buf_cnt = 0;
+unsigned int input_buf_cnt = 0;
int height =0, width =0;
int sliceheight = 0, stride = 0;
int used_ip_buf_cnt = 0;
@@ -347,7 +345,7 @@ void process_current_command(const char *seq_command)
else if(strstr(seq_command, "resume") == seq_command)
{
printf("\n\n $$$$$ RESUME $$$$$");
- printf("\n Immediate effect", data);
+ printf("\n Immediate effect");
printf("\n Sending PAUSE cmd to OMX compt");
OMX_SendCommand(dec_handle, OMX_CommandStateSet, OMX_StateExecuting,0);
wait_for_event();
@@ -516,13 +514,6 @@ void* fbd_thread(void* pArg)
}
}
- if (!flush_in_progress && displayYuv && canDisplay && pBuffer->nFilledLen > 0)
- {
- if(overlay_fb(pBuffer))
- break;
- contigous_drop_frame = 0;
- }
-
if (!flush_in_progress && takeYuvLog) {
pthread_mutex_lock(&fbd_lock);
bytes_written = fwrite((const char *)pBuffer->pBuffer,
@@ -668,10 +659,6 @@ OMX_ERRORTYPE FillBufferDone(OMX_OUT OMX_HANDLETYPE hComponent,
currentStatus = GOOD_STATE;
waitForPortSettingsChanged = 0;
- if(displayYuv)
- {
- overlay_set();
- }
event_complete();
}
@@ -727,7 +714,7 @@ int main(int argc, char **argv)
printf(" 3--> H263\n");
printf(" 4--> VC1\n");
fflush(stdin);
- scanf("%d", &codec_format_option);
+ scanf("%d", (int *)&codec_format_option);
fflush(stdin);
if (codec_format_option > CODEC_FORMAT_MAX)
@@ -755,7 +742,7 @@ int main(int argc, char **argv)
printf(" 4--> VC1 clip Advance Profile (.vc1)\n");
}
fflush(stdin);
- scanf("%d", &file_type_option);
+ scanf("%d", (int *)&file_type_option);
fflush(stdin);
}
@@ -805,9 +792,9 @@ int main(int argc, char **argv)
displayWindow = 0;
}
- if((file_type_option == FILE_TYPE_PICTURE_START_CODE) ||
- (file_type_option == FILE_TYPE_RCV) ||
- (file_type_option == FILE_TYPE_VC1) && argc > 8)
+ if(file_type_option == FILE_TYPE_PICTURE_START_CODE ||
+ file_type_option == FILE_TYPE_RCV ||
+ (file_type_option == FILE_TYPE_VC1 && argc > 8))
{
realtime_display = atoi(argv[8]);
}
@@ -950,19 +937,19 @@ int main(int argc, char **argv)
printf(" ENTER THE SEQ FILE NAME\n");
printf(" *********************************************\n");
fflush(stdin);
- scanf("%[^\n]", &seq_file_name);
+ scanf("%[^\n]", (char *)&seq_file_name);
fflush(stdin);
}
if (outputOption == 0)
{
- displayYuv = 0;
takeYuvLog = 0;
realtime_display = 0;
}
else if (outputOption == 1)
{
- displayYuv = 1;
+ printf("Sorry, cannot display to screen\n");
+ return -1;
}
else if (outputOption == 2)
{
@@ -971,13 +958,14 @@ int main(int argc, char **argv)
}
else if (outputOption == 3)
{
- displayYuv = 1;
- takeYuvLog = !realtime_display;
+ printf("Sorry, cannot display to screen\n");
+ return -1;
}
else
{
- printf("Wrong option. Assume you want to see the YUV display\n");
- displayYuv = 1;
+ printf("Wrong option. Assume you want to take YUV log\n");
+ takeYuvLog = 1;
+ realtime_display = 0;
}
if (test_option == 2)
@@ -990,7 +978,7 @@ int main(int argc, char **argv)
printf(" 3 --> Call Free Handle at the OMX_StateExecuting\n");
printf(" 4 --> Call Free Handle at the OMX_StatePause\n");
fflush(stdin);
- scanf("%d", &freeHandle_option);
+ scanf("%d", (int *)&freeHandle_option);
fflush(stdin);
}
else
@@ -1049,36 +1037,6 @@ int main(int argc, char **argv)
return -1;
}
- if (displayYuv)
- {
- //QPERF_RESET(render_fb);
-#ifdef _ANDROID_
- DEBUG_PRINT("\n Opening /dev/graphics/fb0");
- fb_fd = open("/dev/graphics/fb0", O_RDWR);
-#else
- DEBUG_PRINT("\n Opening /dev/fb0");
- fb_fd = open("/dev/fb0", O_RDWR);
-#endif
- if (fb_fd < 0) {
- printf("[omx_vdec_test] - ERROR - can't open framebuffer!\n");
- return -1;
- }
-
- DEBUG_PRINT("\n fb_fd = %d", fb_fd);
- if (ioctl(fb_fd, FBIOGET_FSCREENINFO, &finfo) < 0)
- {
- printf("[omx_vdec_test] - ERROR - can't retrieve fscreenInfo!\n");
- close(fb_fd);
- return -1;
- }
- if (ioctl(fb_fd, FBIOGET_VSCREENINFO, &vinfo) < 0)
- {
- printf("[omx_vdec_test] - ERROR - can't retrieve vscreenInfo!\n");
- close(fb_fd);
- return -1;
- }
- }
-
run_tests();
pthread_cond_destroy(&cond);
pthread_mutex_destroy(&lock);
@@ -1106,13 +1064,6 @@ int main(int argc, char **argv)
{
DEBUG_PRINT_ERROR("Error - sem_destroy failed %d\n", errno);
}
- if (displayYuv)
- {
- overlay_unset();
- close(fb_fd);
- fb_fd = -1;
- //QPERF_TERMINATE(render_fb);
- }
//QPERF_TERMINATE(client_decode);
return 0;
}
@@ -1208,7 +1159,7 @@ int run_tests()
// Wait till EOS is reached...
if(bOutputEosReached)
{
- int bufCnt = 0;
+ unsigned int bufCnt = 0;
DEBUG_PRINT("Moving the decoder to idle state \n");
OMX_SendCommand(dec_handle, OMX_CommandStateSet, OMX_StateIdle,0);
@@ -1291,11 +1242,11 @@ int Init_Decoder()
OMX_U32 total = 0;
char vdecCompNames[50];
typedef OMX_U8* OMX_U8_PTR;
- char *role ="video_decoder";
+ char role[] ="video_decoder";
static OMX_CALLBACKTYPE call_back = {&EventHandler, &EmptyBufferDone, &FillBufferDone};
- int i = 0;
+ unsigned int i = 0;
long bufCnt = 0;
/* Init. the OpenMAX Core */
@@ -1427,7 +1378,8 @@ int Init_Decoder()
int Play_Decoder()
{
- int i, bufCnt;
+ int i;
+ unsigned int bufCnt;
int frameSize=0;
DEBUG_PRINT("Inside %s \n", __FUNCTION__);
OMX_ERRORTYPE ret;
@@ -1779,11 +1731,6 @@ int Play_Decoder()
DEBUG_PRINT("OMX_FillThisBuffer success!\n");
}
}
-
- if(displayYuv)
- {
- overlay_set();
- }
}
if (freeHandle_option == FREE_HANDLE_AT_EXECUTING)
@@ -1849,7 +1796,7 @@ static OMX_ERRORTYPE Allocate_Buffer ( OMX_COMPONENTTYPE *dec_handle,
static void do_freeHandle_and_clean_up(bool isDueToError)
{
- int bufCnt = 0;
+ unsigned int bufCnt = 0;
for(bufCnt=0; bufCnt < input_buf_cnt; ++bufCnt)
{
@@ -1924,7 +1871,8 @@ static int Read_Buffer_From_DAT_File(OMX_BUFFERHEADERTYPE *pBufHdr)
unsigned char *read_buffer=NULL;
char c = '1'; //initialize to anything except '\0'(0)
char inputFrameSize[10];
- int count =0; char cnt =0;
+ int count =0;
+ int cnt = 0;
memset(temp_buffer, 0, sizeof(temp_buffer));
DEBUG_PRINT("Inside %s \n", __FUNCTION__);
@@ -2051,7 +1999,7 @@ static int Read_Buffer_From_Size_Nal(OMX_BUFFERHEADERTYPE *pBufHdr)
int i = 0;
int j = 0;
unsigned int size = 0; // Need to make sure that uint32 has SIZE_NAL_FIELD_MAX (4) bytes
- int bytes_read = 0;
+ unsigned int bytes_read = 0;
// read the "size_nal_field"-byte size field
bytes_read = fread(pBufHdr->pBuffer + pBufHdr->nOffset, 1, nalSize, inputBufferFile);
@@ -2322,7 +2270,7 @@ void swap_byte(char *pByte, int nbyte)
int drawBG(void)
{
int result;
- int i;
+ unsigned int i;
#ifdef FRAMEBUFFER_32
long * p;
#else
@@ -2359,100 +2307,6 @@ int drawBG(void)
return 0;
}
-void overlay_set()
-{
- overlayp = &overlay;
- overlayp->src.width = stride;
- overlayp->src.height = sliceheight;
- overlayp->src.format = MDP_Y_CRCB_H2V2;
- overlayp->src_rect.x = 0;
- overlayp->src_rect.y = 0;
- overlayp->src_rect.w = width;
- overlayp->src_rect.h = height;
-
- if(width >= vinfo.xres)
- {
- overlayp->dst_rect.x = 0;
- overlayp->dst_rect.w = vinfo.xres;
- }
- else
- {
- overlayp->dst_rect.x = (vinfo.xres - width)/2;
- overlayp->dst_rect.w = width;
- }
-
- if(height >= vinfo.yres)
- {
- overlayp->dst_rect.y = 0;
- overlayp->dst_rect.h = vinfo.yres;
- }
- else
- {
- overlayp->dst_rect.y = (vinfo.yres - height)/2;
- overlayp->dst_rect.h = height;
- }
-
- overlayp->z_order = 0;
- printf("overlayp->dst_rect.x = %u \n", overlayp->dst_rect.x);
- printf("overlayp->dst_rect.y = %u \n", overlayp->dst_rect.y);
- printf("overlayp->dst_rect.w = %u \n", overlayp->dst_rect.w);
- printf("overlayp->dst_rect.h = %u \n", overlayp->dst_rect.h);
-
- overlayp->alpha = 0x0;
- overlayp->transp_mask = 0xFFFFFFFF;
- overlayp->flags = 0;
- overlayp->is_fg = 1;
-
- overlayp->id = MSMFB_NEW_REQUEST;
- vid_buf_front_id = ioctl(fb_fd, MSMFB_OVERLAY_SET, overlayp);
- if (vid_buf_front_id < 0)
- {
- printf("ERROR: MSMFB_OVERLAY_SET failed! line=%d\n", __LINE__);
- }
- vid_buf_front_id = overlayp->id;
- DEBUG_PRINT("\n vid_buf_front_id = %u", vid_buf_front_id);
- drawBG();
-}
-
-int overlay_fb(struct OMX_BUFFERHEADERTYPE *pBufHdr)
-{
- OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO *pPMEMInfo = NULL;
- struct msmfb_overlay_data ov_front;
- MemoryHeapBase *vheap = NULL;
- ov_front.id = overlayp->id;
- pPMEMInfo = (OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO *)
- ((OMX_QCOM_PLATFORM_PRIVATE_LIST *)
- pBufHdr->pPlatformPrivate)->entryList->entry;
- vheap = (MemoryHeapBase*)pPMEMInfo->pmem_fd;
-
-#ifdef _ANDROID_
- ov_front.data.memory_id = vheap->getHeapID();
-#else
- ov_front.data.memory_id = pPMEMInfo->pmem_fd;
-#endif
- ov_front.data.offset = pPMEMInfo->offset;
-
- DEBUG_PRINT("\n ov_front.data.memory_id = %d", ov_front.data.memory_id);
- DEBUG_PRINT("\n ov_front.data.offset = %u", ov_front.data.offset);
-
- if (ioctl(fb_fd, MSMFB_OVERLAY_PLAY, (void*)&ov_front))
- {
- printf("\nERROR! MSMFB_OVERLAY_PLAY failed at frame (Line %d)\n",
- __LINE__);
- return -1;
- }
- DEBUG_PRINT("\nMSMFB_OVERLAY_PLAY successfull");
- return 0;
-}
-
-void overlay_unset()
-{
- if (ioctl(fb_fd, MSMFB_OVERLAY_UNSET, &vid_buf_front_id))
- {
- printf("\nERROR! MSMFB_OVERLAY_UNSET failed! (Line %d)\n", __LINE__);
- }
-}
-
void render_fb(struct OMX_BUFFERHEADERTYPE *pBufHdr)
{
unsigned int addr = 0;
@@ -2489,13 +2343,13 @@ void render_fb(struct OMX_BUFFERHEADERTYPE *pBufHdr)
// read to the end of existing extra data sections
pExtraData = (OMX_OTHER_EXTRADATATYPE*)addr;
- while (addr < end && pExtraData->eType != OMX_ExtraDataFrameInfo)
+ while (addr < end && pExtraData->eType != (enum OMX_EXTRADATATYPE)OMX_ExtraDataFrameInfo)
{
addr += pExtraData->nSize;
pExtraData = (OMX_OTHER_EXTRADATATYPE*)addr;
}
- if (pExtraData->eType != OMX_ExtraDataFrameInfo)
+ if (pExtraData->eType != (enum OMX_EXTRADATATYPE)OMX_ExtraDataFrameInfo)
{
DEBUG_PRINT_ERROR("pExtraData->eType %d pExtraData->nSize %d\n",pExtraData->eType,pExtraData->nSize);
}
diff --git a/omx/mm-video/vidc/venc/Android.mk b/omx/mm-video/vidc/venc/Android.mk
index 3eb7464b..df77c828 100644
--- a/omx/mm-video/vidc/venc/Android.mk
+++ b/omx/mm-video/vidc/venc/Android.mk
@@ -26,8 +26,6 @@
#ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#--------------------------------------------------------------------------
-ifneq ($(BUILD_TINY_ANDROID),true)
-
ROOT_DIR := $(call my-dir)
include $(CLEAR_VARS)
@@ -77,10 +75,10 @@ include $(CLEAR_VARS)
mm-venc-test720p-inc := $(TARGET_OUT_HEADERS)/mm-core/omxcore
mm-venc-test720p-inc += $(LOCAL_PATH)/inc
+LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := mm-venc-omx-test720p
LOCAL_CFLAGS := $(libmm-venc-def)
LOCAL_C_INCLUDES := $(mm-venc-test720p-inc)
-LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libmm-omxcore libOmxVenc libbinder
LOCAL_SRC_FILES := test/venc_test.cpp
@@ -98,18 +96,11 @@ include $(CLEAR_VARS)
venc-test-inc += $(LOCAL_PATH)/inc
+LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := mm-video-encdrv-test
LOCAL_C_INCLUDES := $(venc-test-inc)
-LOCAL_PRELINK_MODULE := false
LOCAL_SRC_FILES := test/video_encoder_test.c
LOCAL_SRC_FILES += test/queue.c
include $(BUILD_EXECUTABLE)
-
-endif #BUILD_TINY_ANDROID
-
-# ---------------------------------------------------------------------------------
-# END
-# ---------------------------------------------------------------------------------
-
diff --git a/omx/mm-video/vidc/venc/inc/omx_video_base.h b/omx/mm-video/vidc/venc/inc/omx_video_base.h
index 1c14b22c..79340ae3 100644
--- a/omx/mm-video/vidc/venc/inc/omx_video_base.h
+++ b/omx/mm-video/vidc/venc/inc/omx_video_base.h
@@ -66,7 +66,7 @@ public:
};
#include <utils/Log.h>
-#define LOG_TAG "OMX-VENC-720p"
+//#define LOG_TAG "OMX-VENC-720p"
#ifdef ENABLE_DEBUG_LOW
#define DEBUG_PRINT_LOW LOGE
#else