/**************************************************************** 函数名: CC_CallAlertingInd 功 能 :收到振铃提示事件的处理函数 输入参数:DPARAM param 输出参数:无 编写者 :陈海华 修改记录:创建 2007/8/15 ****************************************************************/ void CC_CallAlertingInd(DPARAM param) { APP_MN_ALERTING_IND_T *pSig = (APP_MN_ALERTING_IND_T*)param; unsigned char buf[2]; //check the param SCI_TRACE_LOW("<<<<<<ccapp.c:enter function CC_CallAlertingInd(), call_id = %d, alerting_type = %d", pSig->call_id, pSig->alerting_type); SCI_PASSERT(PNULL != pSig, ("<<<<<<ccapp.c: CC_CallAlertingInd() pSig == PNULL")); CurrCallId = pSig->call_id; buf[0] = 0; SG_Uart_Send_Msg(buf, 1, RTN_AUTO_REV); switch( pSig->alerting_type ) { case MN_CALL_IN_BAND_AVAILABLE: break; //MO,收到对端发送来的ALERT消息 case MN_CALL_REMOTE_USER_ALERTING: break; //MT,indicate alerting case MN_CALL_LOCAL_USER_ALERTING: SCI_TRACE_LOW("<<<<<<MN_CALL_LOCAL_USER_ALERTING<<<<<<"); MNCALL_IndicateAlert( pSig->call_id, PNULL ); break; default: SCI_TRACE_LOW("<<<<<<ccapp.c:CC_CallAlertingInd() alerting_type = %d", pSig->alerting_type); break; } }
PUBLIC JPEG_RET_E JPEGENC_stop_encode(JPEGENC_PARAMS_T *jpegenc_params) { JPEG_RET_E jpeg_ret_value = JPEG_FAILED; SCI_PASSERT(jpegenc_params, ("[JPEG_6600L_StopEncode], context_ptr is NULL")); jpeg_ret_value = JPEG_HWWriteTail(); if( JPEG_SUCCESS == jpeg_ret_value) { jpegenc_params->stream_size = JPEG_HWGetSize( ); /*if (jpegenc_params->stream_size > jpegenc_params->stream_buf_len) { SCI_TRACE_LOW("[JPEG_StopEncode] jpeg stream buffer is not enough, stream size = %d, target buffer size = %d", jpegenc_params->stream_size, jpegenc_params->stream_buf_len); return JPEG_MEMORY_NOT_ENOUGH; }*/ #if 0 { FILE *fp = NULL; fp = fopen("/data/out_enc.jpeg", "wb"); fwrite(jpegenc_params->stream_virt_buf[0], 1, jpegenc_params->stream_size, fp); fclose(fp); } #endif } SCI_TRACE_LOW("[JPEG_6600L_StopEncode] stop enc, stream_size = %d", jpegenc_params->stream_size); return jpeg_ret_value; }
/**************************************************************** 函数名: MMI_GenDispNumber 功 能 :产生显示的电话号码(bcd to str) 输入参数:MN_NUMBER_TYPE_E number_type // 号码的类型 uint8 party_len // 待转换的bcd数组的长度 uint8 *party_num // 待转换的bcd数组的首地址 uint8 *tele_num // 转换完毕存储str的首地址 uint8 max_tele_len //!!!!!!!!!可显示的号码的最大长度 + 2(/0 字符串结束符号) 输出参数:无 编写者 :郭碧莲 修改记录:创建 2007/8/15 ****************************************************************/ uint8 MMI_GenDispNumber( MN_NUMBER_TYPE_E number_type, uint8 party_len, uint8 *party_num, uint8 *tele_num, uint8 max_tele_len//!!!!!!!!!可显示的号码的最大长度 + 2(/0 字符串结束符号) ) { uint8 offset = 0; uint8 len = 0; //check the param SCI_TRACE_LOW("<<<<<<enter function MMI_GenDispNumber()"); SCI_PASSERT(NULL != tele_num, ("<<<<<<MMI_GenDispNumber() tele_num == NULL")); SCI_PASSERT(NULL != party_num, ("<<<<<<MMI_GenDispNumber() party_num == NULL")); SCI_ASSERT( max_tele_len > 2 ); if(MN_NUM_TYPE_ALPHANUMERIC == number_type) { MMI_MEMCPY(tele_num, max_tele_len, party_num, party_len, party_len); return MIN(max_tele_len, party_len); } //check the tele_num is internation tele if( MN_NUM_TYPE_INTERNATIONAL == number_type ) { offset = 1; tele_num[0] = '+'; } if( 0 == party_len ) { SCI_TRACE_LOW("<<<<<<MMI_GenDispNumber: called_num->num_len = 0"); return (offset); } len = party_len << 1; SCI_ASSERT( len <= (max_tele_len - offset - 1)); MMI_BcdToStr(PACKED_LSB_FIRST ,party_num, len, (char*)( tele_num + offset ) ); return (uint8)strlen((char*)tele_num); }
PUBLIC JPEG_RET_E JPEGDEC_stop_decode(JPEGDEC_PARAMS_T *jpegdec_params) { JPEG_RET_E jpeg_ret_value = JPEG_SUCCESS;//JPEG_FAILED; SCI_PASSERT(jpegdec_params, ("[JPEG_6600L_StopDecode], context_ptr is NULL")); if( JPEG_SUCCESS == jpeg_ret_value) { } #if 0 JPEG_Mem_Copy( jpegdec_params , 1 ); #endif SCI_TRACE_LOW("[JPEG_6600L_StopDecode] start dec, stream_size = %d", jpegdec_params->stream_size); return jpeg_ret_value; }
LOCAL JPEG_RET_E JPEGENC_start_encode(JPEGENC_PARAMS_T *jpegenc_params) { JPEG_RET_E ret_value = JPEG_FAILED; JPEG_ENC_OUTPUT_PARA_T jpeg_enc_out_param; JPEG_ENC_INPUT_PARA_T jpeg_enc_fw_info; APP1_T app1_param; SCI_MEMSET(&app1_param, 0, sizeof(APP1_T)); if((0 == jpegenc_params->thumb_width) && (0 == jpegenc_params->thumb_height)){ jpegenc_params->stream_size = 0; } else{ if(JPEG_SUCCESS != JPEGENC_start_encode_thumbnail(jpegenc_params)) { SCI_TRACE_LOW("JPEGENC fail to JPEGENC_start_encode_thumbnail."); return ret_value; } } app1_param.thumb_width = jpegenc_params->thumb_width; app1_param.thumb_height = jpegenc_params->thumb_height; app1_param.thumbnail_virt_addr = jpegenc_params->stream_virt_buf[1]; app1_param.thumbnail_len = jpegenc_params->stream_size; app1_param.Latitude_dd.numerator = jpegenc_params->Latitude_dd.numerator; app1_param.Latitude_dd.denominator = jpegenc_params->Latitude_dd.denominator; app1_param.Latitude_mm.numerator = jpegenc_params->Latitude_mm.numerator; app1_param.Latitude_mm.denominator = jpegenc_params->Latitude_mm.denominator; app1_param.Latitude_ss.numerator = jpegenc_params->Latitude_ss.numerator; app1_param.Latitude_ss.denominator = jpegenc_params->Latitude_ss.denominator; app1_param.Latitude_ref = jpegenc_params->Latitude_ref; app1_param.Longitude_dd.numerator = jpegenc_params->Longitude_dd.numerator; app1_param.Longitude_dd.denominator = jpegenc_params->Longitude_dd.denominator; app1_param.Longitude_mm.numerator = jpegenc_params->Longitude_mm.numerator; app1_param.Longitude_mm.denominator = jpegenc_params->Longitude_mm.denominator; app1_param.Longitude_ss.numerator = jpegenc_params->Longitude_ss.numerator; app1_param.Longitude_ss.denominator = jpegenc_params->Longitude_ss.denominator; app1_param.Longitude_ref = jpegenc_params->Longitude_ref; app1_param.image_description = jpegenc_params->image_description; app1_param.make = jpegenc_params->make; app1_param.model = jpegenc_params->model; app1_param.copyright = jpegenc_params->copyright; app1_param.orientation = jpegenc_params->orientation; app1_param.datetime = jpegenc_params->datetime; app1_param.gps_date = jpegenc_params->gps_date; app1_param.gps_process_method = jpegenc_params->gps_process_method; app1_param.gps_hour = jpegenc_params->gps_hour; app1_param.gps_minuter = jpegenc_params->gps_minuter; app1_param.gps_second = jpegenc_params->gps_second; app1_param.image_width = jpegenc_params->width; app1_param.image_height = jpegenc_params->height; app1_param.focal_length.numerator = jpegenc_params->focal_length.numerator; app1_param.focal_length.denominator = jpegenc_params->focal_length.denominator; jpegenc_params->stream_size = 0; SCI_TRACE_LOW("JPEGENC ok to JPEGENC_start_encode_thumbnail.addr: 0x%x, len: 0x%x.", (uint32_t)app1_param.thumbnail_virt_addr, app1_param.thumbnail_len); SCI_PASSERT(jpegenc_params, ("[JPEG_6600L_StartEncode], context_ptr is NULL")); SCI_MEMSET(&jpeg_enc_out_param, 0, sizeof(JPEG_ENC_OUTPUT_PARA_T)); SCI_MEMSET(&jpeg_enc_fw_info, 0, sizeof(JPEG_ENC_INPUT_PARA_T)); JPEGENC_init_fw_param(jpegenc_params, &jpeg_enc_fw_info); ret_value = JPEG_HWEncInit(&jpeg_enc_fw_info); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWEncInit failed = %d", ret_value); return ret_value; } ret_value = JPEG_HWWriteHead(&app1_param); //ret_value = JPEG_HWWriteHead(); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWWriteHead failed = %d", ret_value); return ret_value; } SCI_TRACE_LOW("[JPEG_6600L_StartEncode] hardware write head done"); /*the input width must be mcu aligned width*/ if(jpegenc_params->height > SLICE_HEIGHT){//wxz:???? ret_value = JPEG_HWEncStart(jpegenc_params->width, SLICE_HEIGHT, &jpeg_enc_out_param); } else{ ret_value = JPEG_HWEncStart(jpegenc_params->width, jpegenc_params->height, &jpeg_enc_out_param); } SCI_TRACE_LOW("[JPEG_6600L_StartEncode] start enc, src_aligned_width = %d, slice height = %d", jpegenc_params->width, jpegenc_params->height); return ret_value; }
LOCAL JPEG_RET_E JPEGENC_start_encode_thumbnail(JPEGENC_PARAMS_T *jpegenc_params) { JPEG_RET_E ret_value = JPEG_FAILED; JPEG_ENC_OUTPUT_PARA_T jpeg_enc_out_param; JPEG_ENC_INPUT_PARA_T jpeg_enc_fw_info; SCALE_PARAM_T scale_param; JPEGENC_PARAMS_T jpegenc_params_tmp; SCI_PASSERT(jpegenc_params, ("[JPEG_6600L_StartEncodeThumbnail], context_ptr is NULL")); //scale down the original yuv data to 176x144 size. SCI_MEMSET(&scale_param, 0, sizeof(SCALE_PARAM_T)); scale_param.in_addr.yaddr = jpegenc_params->yuv_phy_buf; scale_param.in_addr.uaddr = scale_param.in_addr.yaddr + jpegenc_params->width * jpegenc_params->height; scale_param.in_addr.vaddr = 0; scale_param.in_fmt = jpegenc_params->format; scale_param.in_size.w = jpegenc_params->width; scale_param.in_size.h = jpegenc_params->height; scale_param.in_rect.x = 0; scale_param.in_rect.y = 0; scale_param.in_rect.w = jpegenc_params->width; scale_param.in_rect.h = jpegenc_params->height; scale_param.out_size.w = jpegenc_params->thumb_width; scale_param.out_size.h = jpegenc_params->thumb_height; //use the second stream bufffer as the scale output buffer. scale_param.out_addr.yaddr = jpegenc_params->stream_phy_buf[0]; scale_param.out_addr.uaddr = scale_param.out_addr.yaddr + scale_param.out_size.w * scale_param.out_size.h; scale_param.out_addr.vaddr = 0; scale_param.out_fmt = jpegenc_params->format; ret_value = JPEGENC_Scale_For_Thumbnail(&scale_param); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEGENC_Scale_For_Thumbnail = %d", ret_value); return ret_value; } #if 0 { FILE *fp = NULL; SCI_TRACE_LOW("cap yuv420: width: %d, hei: %d.", scale_param.out_size.w, scale_param.out_size.h); fp = fopen("/data/out_enc_yuv420.yuv", "wb"); fwrite(jpegenc_params->stream_virt_buf[1], 1, scale_param.out_size.w * scale_param.out_size.h * 3 / 2, fp); fclose(fp); } #endif SCI_MEMSET(&jpeg_enc_out_param, 0, sizeof(JPEG_ENC_OUTPUT_PARA_T)); SCI_MEMSET(&jpeg_enc_fw_info, 0, sizeof(JPEG_ENC_INPUT_PARA_T)); SCI_MEMCPY(&jpegenc_params_tmp, jpegenc_params, sizeof(JPEGENC_PARAMS_T)); //update the jpegenc_params_tmp jpegenc_params_tmp.width = scale_param.out_size.w; jpegenc_params_tmp.height = scale_param.out_size.h; jpegenc_params_tmp.yuv_phy_buf = scale_param.out_addr.yaddr; jpegenc_params_tmp.stream_phy_buf[0] = jpegenc_params->stream_phy_buf[1]; jpegenc_params_tmp.quality = jpegenc_params->thumb_quality; JPEGENC_init_fw_param(&jpegenc_params_tmp, &jpeg_enc_fw_info); ret_value = JPEG_HWEncInit(&jpeg_enc_fw_info); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWEncInit failed for thubmnail = %d", ret_value); return ret_value; } ret_value = JPEG_HWWriteHeadForThumbnail(); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWWriteHead for thumbnail failed = %d", ret_value); return ret_value; } //jpegenc_params->stream_size = JPEG_HWGetSize(); #if 0 { FILE *fp = NULL; SCI_TRACE_LOW("thumb size head: %d.", jpegenc_params->stream_size); fp = fopen("/data/out_thumb_head.jpg", "wb"); fwrite(jpegenc_params->stream_virt_buf[1], 1, jpegenc_params->stream_size, fp); fclose(fp); } #endif /*ret_value = JPEG_HWWriteHead( ); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWWriteHead failed for thumbnail = %d", ret_value); return ret_value; }*/ /*the input width must be mcu aligned width*/ //wxz20110922: the thumbnail height must less than SLICE_HEIGHT(1024). ret_value = JPEG_HWEncStart(jpegenc_params_tmp.width, jpegenc_params_tmp.height, &jpeg_enc_out_param); SCI_TRACE_LOW("[JPEG_6600L_StartEncode for thumbnail] start enc, src_aligned_width = %d, slice height = %d", jpegenc_params_tmp.width, jpegenc_params_tmp.height); //poll the end of jpeg encoder JPEGENC_Poll_VLC_BSM(0xFFFFFFFF, jpegenc_params_tmp.stream_buf_len, NULL); /*if(JPEG_SUCCESS != JPEGENC_stop_encode(&jpegenc_params_tmp)) { SCI_TRACE_LOW("JPEGENC fail to JPEGENC_stop_encode for thumbnail."); return ret_value; }*/ ret_value = JPEG_HWWriteTail(); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWWriteTail for thumbnail failed = %d", ret_value); return ret_value; } jpegenc_params->stream_size = JPEG_HWGetSize(); #if 0 { FILE *fp = NULL; SCI_TRACE_LOW("thumb size: %d.", jpegenc_params->stream_size); fp = fopen("/data/out_thumb.jpg", "wb"); fwrite(jpegenc_params->stream_virt_buf[1], 1, jpegenc_params->stream_size, fp); fclose(fp); } #endif return ret_value; }
/**************************************************************** 函数名: CC_ConnectCall 功 能 :向外拨打电话的处理函数 输入参数:char* src_tele_num-----str格式的电话号码 输出参数:无 编写者 :郭碧莲 修改记录:创建 2007/8/20 ****************************************************************/ CC_RESULT_E CC_ConnectCall(char* src_tele_num) { MN_CALL_TYPE_E call_type = MN_CALL_TYPE_NORMAL; MMI_PARTY_NUMBER_T party_num; MN_CALLED_NUMBER_T want_to_call_num; // uint8 i =0;//,*ptr;//,*p; //check the param SCI_PASSERT(PNULL != src_tele_num, ("<<<<<<ccapp.c: CC_ConnectCall() tele_num == PNULL")); SCI_TRACE_LOW("<<<<<<ccapp.c:CC_ConnectCall() tele_num= %s\n", src_tele_num); // 监听呼出时,关闭 HF_MUTE 端口 if(0 == strcmp(src_tele_num,g_state_info.sListenOutNo)) { SCI_TRACE_LOW("<<<<<<We are connecting the listen number:%s",g_state_info.sListenOutNo); #ifndef _TRACK GPIO_SetValue(HF_MUTE,SCI_TRUE); #endif listen = 1; // memset(g_state_info.sListenOutNo,0,sizeof(g_state_info.sListenOutNo)); } else// 拨打普通电话,打开 HF_MUTE 端口 { #ifndef _TRACK GPIO_SetValue(HF_MUTE,SCI_FALSE); #endif } //convert str to BCD if( TRUE != MMI_GenPartyNumber((uint8*)src_tele_num, strlen(src_tele_num), &party_num) ) { #ifdef _TRACK if(g_state_info.TestFlag == 1) { SG_PC_CallOff(0); } #endif /* _TRACK */ SCI_TRACE_LOW("<<<<<<ccapp.c: CC_GenPartyNumber return failure"); if(g_set_info.bNewUart4Alarm & UT_GPS && g_set_info.GpsDevType == 1) { SG_ZBGPS_ACK(CMD_CALL_OUT, 0x30); } return CC_RESULT_ERROR; } SCI_MEMCPY( want_to_call_num.party_num, party_num.bcd_num, 6 ); want_to_call_num.number_plan=0; want_to_call_num.number_type=0; want_to_call_num.num_len = party_num.num_len; // connect the call if (MN_RETURN_FAILURE == MNCALL_StartCall( MN_CALL_TYPE_NORMAL, &want_to_call_num, PNULL, MN_CALL_CLIR_NETWORK_DECIDE, PNULL )) { #ifdef _TRACK if(g_state_info.TestFlag == 1) { SG_PC_CallOff(0); } #endif /* _TRACK */ if(g_set_info.bNewUart4Alarm & UT_GPS && g_set_info.GpsDevType == 1) { SG_ZBGPS_ACK(CMD_CALL_OUT, 0x30); } SCI_TRACE_LOW("<<<<<<ccapp.c:CC_ConnectCall() MNCALL_StartCall return failure"); return CC_RESULT_ERROR; } else { SCI_TRACE_LOW("<<<<<<ccapp.c:CC_ConnectCall():success"); SG_Send_CallStatus(CALL_OUT); return CC_RESULT_SUCCESS; } return CC_RESULT_SUCCESS; }
/**************************************************************** 函数名: CC_CallSetupInd 功 能 :收到来电事件的处理的函数 输入参数:DPARAM param 输出参数:无 编写者 :陈海华 修改记录:创建 2007/8/15 ****************************************************************/ void CC_CallSetupInd(DPARAM param) { APP_MN_SETUP_IND_T *pSig = (APP_MN_SETUP_IND_T*)param; uint8 tele_num[CC_MAX_TELE_NUM_LEN + 2]= {0}; //xSignalHeaderRec *signal_ptr = NULL; // CHECK THE PARA SCI_PASSERT(PNULL != pSig, ("<<<<<<CC_CallSetupInd: pSig == PNULL")); // bcd格式的号码转换为str格式 MMI_GenDispNumber( pSig->calling_num.number_type, pSig->calling_num.num_len, (uint8*)pSig->calling_num.party_num, tele_num , CC_MAX_TELE_NUM_LEN + 2); SCI_TRACE_LOW("<<<<<<Print The Incoming Number:--%s---, g_set_info.sListenNo = %s",tele_num,g_set_info.sListenNo); // 呼入监听功能 if (strlen(g_set_info.sListenNo) != 0 // 监听号为空的情况下不进入监听模式是 2010.11.03 cojone && 0 == strcmp((char *)tele_num, g_set_info.sListenNo)) { SCI_TRACE_LOW("<<<<<<We are connecting the listen number:%s", g_set_info.sListenNo); CallInListen = 1; AUD_SetDevMode(AUD_DEV_MODE_HANDFREE); AUD_SetVolume(AUD_DEV_MODE_HANDFREE, AUD_TYPE_VOICE, g_set_info.speaker_vol); // 设置音量为免提时音量 AUD_EnableVoiceCodec(1); CurrCallId = pSig->call_id; SCI_TRACE_LOW("<<<<<Current Call ID is %d>>>>>>>>", CurrCallId); ConnectPhoneTimer = 1; //SG_CreateSignal(SG_ANS_CALL, 0, &signal_ptr); return; } if(SG_Call_In_Judge((char *)tele_num,pSig->call_id) == 0) return; SG_Uart_Send_Msg(tele_num,strlen((char*)tele_num),REV_TEL); // 向手柄发出来电通知 if(g_set_info.bNewUart4Alarm & UT_GPS && g_set_info.GpsDevType == 2)// 友浩导航屏 { GpsDev_SendIncoming(tele_num); } if(g_set_info.bNewUart4Alarm & UT_GPS && g_set_info.GpsDevType == 1)// 展博导航屏 { ZBGpsDev_SendIncoming(tele_num); } if(g_set_info.bAutoAnswerDisable) // 禁止自动接听 { AUD_SetDevMode(AUD_DEV_MODE_HANDHOLD); AUD_SetVolume(AUD_DEV_MODE_HANDHOLD, AUD_TYPE_GENERIC_TONE, g_set_info.speaker_vol); // 设置音量为手柄通话时音量 } else { AUD_SetDevMode(AUD_DEV_MODE_HANDFREE); AUD_SetVolume(AUD_DEV_MODE_HANDFREE, AUD_TYPE_GENERIC_TONE, g_set_info.speaker_vol); // 设置音量为免提时音量 } #ifndef _TRACK GPIO_SetValue(HF_MUTE,SCI_FALSE); #endif AUD_EnableVoiceCodec( 1 ); AUD_PlayRing(AUD_SINGLE_TONE_RING,g_normal_ring_table[0].data_len,g_normal_ring_table[0].data_ptr,1000,PNULL); }
LOCAL JPEG_RET_E JPEGDEC_start_decode(JPEGDEC_PARAMS_T *jpegdec_params) { JPEG_RET_E ret_value = JPEG_FAILED; JPEG_DEC_OUTPUT_PARA_T jpeg_dec_out_param; JPEG_DEC_INPUT_PARA_T jpeg_dec_fw_info; uint32_t slice_height = SLICE_HEIGHT; if(0 != jpegdec_params->set_slice_height) { slice_height = jpegdec_params->set_slice_height; } SCI_TRACE_LOW("enter [JPEG_StartDecode] ---1 "); SCI_PASSERT(jpegdec_params, ("[JPEG_6600L_StartDecode], context_ptr is NULL")); SCI_TRACE_LOW("enter [JPEG_StartDecode] ---2 "); SCI_MEMSET(&jpeg_dec_out_param, 0, sizeof(JPEG_DEC_OUTPUT_PARA_T)); SCI_MEMSET(&jpeg_dec_fw_info, 0, sizeof(JPEG_DEC_INPUT_PARA_T)); JPEGDEC_init_fw_param(jpegdec_params, &jpeg_dec_fw_info); ret_value = JPEG_FWParseHead(&jpeg_dec_fw_info); if(JPEG_SUCCESS != ret_value) { JPEG_PRINT(("[JPEG_StartDecode] JPEG_HWParseHead failed = %d", ret_value)); return ret_value; } jpegdec_params->header_len = jpeg_dec_fw_info.header_len; #if 0 JPEG_Mem_Copy( jpegdec_params , 0 ); #endif SCI_TRACE_LOW("enter [JPEG_FWInitDecInput] "); ret_value = JPEG_FWInitDecInput(&jpeg_dec_fw_info); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWDecInit failed = %d", ret_value); return ret_value; } SCI_TRACE_LOW("enter [JPEG_HWDecInit] "); ret_value = JPEG_HWDecInit(&jpeg_dec_fw_info); if(JPEG_SUCCESS != ret_value) { SCI_TRACE_LOW("JPEG_HWWriteHead failed = %d", ret_value); return ret_value; } SCI_TRACE_LOW("[JPEG_6600L_StartDecode] hardware write head done,hear_len=%d",jpeg_dec_fw_info.header_len); /*the input width must be mcu aligned width*/ SCI_TRACE_LOW("enter [JPEG_HWDecStart] "); if(jpegdec_params->height > SLICE_HEIGHT){ ret_value = JPEG_HWDecStart(slice_height, &jpeg_dec_out_param); } else{ ret_value = JPEG_HWDecStart(jpegdec_params->height,&jpeg_dec_out_param); } SCI_TRACE_LOW("[JPEG_6600L_StartDecode] start dec, src_aligned_width = %d, slice height = %d", jpegdec_params->width, jpegdec_params->height); return ret_value; }