Browse Source

1.修改添加平台脚本没有修改新添加平台uboot配置文件设备树名称的问题; 2.解决logcat无法连接问题; 3.优化mfc解码库

huangliang 2 years ago
parent
commit
9a64ef7a73

+ 5 - 0
build/add-board.sh

@@ -75,6 +75,7 @@ DST_UBOOT_BOARD_PATH=$SDK_DIR/u-boot/board/arkmicro/$DST_BOARD_TYPE
 cp -rf ${SDK_DIR}/u-boot/configs/${SRC_UBOOT_CONFIG_FILE} ${SDK_DIR}/u-boot/configs/${DST_BOARD_TYPE}_defconfig
 sed -i s/CONFIG_TARGET_$SRC_UBOOT_TARGET/CONFIG_TARGET_$DST_UBOOT_TARGET/g ${SDK_DIR}/u-boot/configs/${DST_BOARD_TYPE}_defconfig
 sed -i s/$SRC_DTB_FILE_NAME/$DST_DTB_FILE_NAME/g ${SDK_DIR}/u-boot/configs/${DST_BOARD_TYPE}_defconfig
+sed -i s/$SRC_BOARD_TYPE/$DST_BOARD_TYPE/g ${SDK_DIR}/u-boot/configs/${DST_BOARD_TYPE}_defconfig
 
 # copy dts file and add in Makefile
 UBOOT_DTS_PATH=${SDK_DIR}/u-boot/arch/arm/dts
@@ -118,6 +119,10 @@ mkdir -p $DST_UBOOT_BOARD_PATH
 cp -rf $SRC_UBOOT_BOARD_PATH/* $DST_UBOOT_BOARD_PATH/
 echo -e "if TARGET_$DST_UBOOT_TARGET\n\nconfig SYS_BOARD\n\tdefault \"$DST_BOARD_TYPE\"\n\nconfig SYS_VENDOR\n\tdefault \"arkmicro\"\n\n\
 config SYS_CONFIG_NAME\n\tdefault \"$DST_BOARD_TYPE\"\n\nendif" > $DST_UBOOT_BOARD_PATH/Kconfig
+if [ -f ${DST_UBOOT_BOARD_PATH}/${SRC_BOARD_TYPE}.c ];then
+	mv ${DST_UBOOT_BOARD_PATH}/${SRC_BOARD_TYPE}.c ${DST_UBOOT_BOARD_PATH}/${DST_BOARD_TYPE}.c
+	sed -i s/$SRC_BOARD_TYPE/$DST_BOARD_TYPE/g $DST_UBOOT_BOARD_PATH/Makefile
+fi
 
 # add configs header file
 SRC_UBOOT_CONFIG_HEADER_FILE=$(sed -n '/SYS_CONFIG_NAME/{n;p;}' $SRC_UBOOT_BOARD_PATH/Kconfig | awk '{print $2}')

+ 30 - 0
buildroot-external/package/hx170dec/software/src/mfcapi.c

@@ -91,6 +91,36 @@ int MFCH264Decode(MFCHandle *handle, DWLLinearMem_t *inBuffer, OutFrameBuffer *o
 			break;
 
 		case H264DEC_PIC_DECODED: /* a picture was decoded */
+			g_picDecodeNumber++;
+
+			if (H264DecNextPicture(handle->decInst, &decPic, 0) == H264DEC_PIC_RDY) {
+				if(outBuffer->num >= MAX_OUTFRAME_NUM)
+					return 0;
+
+				outBuffer->buffer[outBuffer->num].keyPicture =
+					decPic.isIdrPicture;
+				if (!handle->ppInst) {
+					outBuffer->buffer[outBuffer->num].yBusAddress =
+						decPic.outputPictureBusAddress;
+					outBuffer->buffer[outBuffer->num].pyVirAddress =
+						decPic.pOutputPicture;
+					outBuffer->frameWidth = decInfo.picWidth;
+					outBuffer->frameHeight = decInfo.picHeight;
+					outBuffer->num++;
+				} else if (PPGetResult(handle->ppInst) == PP_OK) {
+					outBuffer->buffer[outBuffer->num].yBusAddress = PP_OUTBUFFER_PHYADDR(handle->ppOutBufferIndex);
+					outBuffer->buffer[outBuffer->num].pyVirAddress = (void*)PP_OUTBUFFER_VIRADDR(handle->ppOutBufferIndex);
+					outBuffer->frameWidth = handle->ppOutWidth;
+					outBuffer->frameHeight = handle->ppOutHeight;
+					outBuffer->num++;
+
+					handle->ppOutBufferIndex = (handle->ppOutBufferIndex + 1) % PP_OUTBUF_NUM;
+					pp_reset_outimg_addr(handle, PP_OUTBUFFER_PHYADDR(handle->ppOutBufferIndex));
+				}
+			}
+
+			break;
+
 		case H264DEC_PENDING_FLUSH:
 			g_picDecodeNumber++;
 

+ 1 - 1
linux/drivers/staging/android/logger.c

@@ -532,7 +532,7 @@ static const struct file_operations logger_fops = {
 	.owner = THIS_MODULE,
 	.read = logger_read,
 	//.aio_write = logger_aio_write,
-	//.write_iter = logger_aio_write,
+	.write_iter = logger_aio_write,
 	.poll = logger_poll,
 	.unlocked_ioctl = logger_ioctl,
 	.compat_ioctl = logger_ioctl,