?? vpe.c
字號:
#define VPE_GLOBALS
#include "../fmpeg4_driver/fmpeg4.h"
#include "portab.h"
#include "vpe.h"
#include "vpe_m.h"
#include "define.h"
#include "dma_m.h"
#include "mp4.h"
#include "decoder.h"
#include "mp4vdec.h"
//#include "utils/mem_align.h"
#include "local_mem.h"
void vVPE_SaveYuvSeq(void *pvDec)
{
//DECODER *dec = (DECODER *)pvDec;
// log raw data from refn, instead of cur.
// open mp4.yuv
mVpe_Indicator(0x60000000);
// y
mVpe_Indicator(0x40000000 | (dec->width * dec->height));
mVpe_Indicator(0x50000000 | (uint32_t)dec->refn.y_phy);
// u
mVpe_Indicator(0x40000000 | (dec->width * dec->height / 4));
mVpe_Indicator(0x50000000 | (uint32_t)dec->refn.u_phy);
// v
mVpe_Indicator(0x40000000 | (dec->width * dec->height / 4));
mVpe_Indicator(0x50000000 | (uint32_t)dec->refn.v_phy);
// close mp4.yuv;
mVpe_Indicator(0x60000001);
}
void vVPE_SaveYuvImg(void *pvDec)
{
DECODER *dec = (DECODER *)pvDec;
// log raw data from refn, instead of cur.
// open mp4.yuv
mVpe_Indicator(0x60000000);
// write data (start address: out_buffer, length: 00-QCIF, 01-CIF, 02-VGA) to file
// QCIF: 176 * 144, CIF: 352 * 288, VGA: 720 * 480
if ((dec->width == 176) && (dec->height == 144)) {
mVpe_Indicator(0x70000000 | (uint32_t)dec->refn.y_phy |0);
}
else if ((dec->width == 352) && (dec->height== 288)) {
mVpe_Indicator(0x70000000 | (uint32_t)dec->refn.y_phy |1);
}
else if ((dec->width == 720) && (dec->height== 480)) {
mVpe_Indicator(0x70000000 | (uint32_t)dec->refn.y_phy |2);
}
else {
mVpe_FAIL();
}
// close mp4.yuv;
mVpe_Indicator(0x60000001);
}
void vVPE_SaveRgb(FMP4_DEC_RESULT * ptDecResult)
{
// open mp4.rgb
mVpe_Indicator(0x60000002);
#if (OUTPUT_FMT == OUTPUT_FMT_YUV)
// y
mVpe_Indicator(0x40000000 | (ptDecResult->u32VopWidth * ptDecResult->u32VopHeight));
mVpe_Indicator(0x50000000 | (int32_t)ptDecResult->pu8FrameBaseAddr_phy);
// u
mVpe_Indicator(0x40000000 | (ptDecResult->u32VopWidth * ptDecResult->u32VopHeight / 4));
mVpe_Indicator(0x50000000 | (int32_t)ptDecResult->pu8FrameBaseAddr_U_phy);
// v
mVpe_Indicator(0x40000000 | (ptDecResult->u32VopWidth * ptDecResult->u32VopHeight / 4));
mVpe_Indicator(0x50000000 | (int32_t)ptDecResult->pu8FrameBaseAddr_V_phy);
#else
// rgb (555 565 888 CbYCrY)
mVpe_Indicator(0x40000000 | (ptDecResult->u32VopWidth * ptDecResult->u32VopHeight * RGB_PIXEL_SIZE));
mVpe_Indicator(0x50000000 | (int32_t)ptDecResult->pu8FrameBaseAddr_phy);
#endif
// close mp4.rgb;
mVpe_Indicator(0x60000001);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -