[X]关闭

OSD模块停用,提否能提供其他可用例程?

文档创建者:tiaotiaoduoduo
浏览次数:5146
最后更新:2022-08-18

在申请OSD模块许可时,官方已关闭了申请。
例程中视觉用到OSD模块的,都无法生成bit文件,请问能否提供其他可行的代码。

型号:701A自选套餐:+9V034双目套餐


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

发表评论已发布 3

tiaotiaoduoduo

发表于 2019-2-21 13:30:13 | 显示全部楼层

int mix_init(void)
{
        int Status;
        Status = XVMix_Initialize(&mix,MIX_DEVICE_ID);
        if(Status == XST_SUCCESS){
                 xil_printf("--XST_SUCCESS:: XV_mix_Initialize ...\r\n" );
        }
        XVMix_Start(&mix);
         return Status;
}

tiaotiaoduoduo

发表于 2019-3-1 16:47:25 | 显示全部楼层

#define H_ACTIVE1        752//640*3
#define V_ACTIVE1        480//480
#define H_STRIDE1        752//640

#define H_ACTIVE0        752//640*3
#define V_ACTIVE0        480//480
#define H_STRIDE0        752//640

//        Camera_osd_init();
        tpg_init();
        mix_init();


//        Xil_Out32((VDMA_BASEADDR0 + 0x030), 0x108B);// enable circular mode
        Xil_Out32((VDMA_BASEADDR0 + 0x030), 0x8B);// enable circular mode
        Xil_Out32((VDMA_BASEADDR0 + 0x0AC), VIDEO_BASEADDR0);        // start address
        Xil_Out32((VDMA_BASEADDR0 + 0x0B0), VIDEO_BASEADDR1);        // start address
        Xil_Out32((VDMA_BASEADDR0 + 0x0B4), VIDEO_BASEADDR2);        // start address
        Xil_Out32((VDMA_BASEADDR0 + 0x0A8), (H_STRIDE0*3));                // h offset (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR0 + 0x0A4), (H_ACTIVE0*3));                // h size (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR0 + 0x0A0), V_ACTIVE0);                        // v size (480)

        Xil_Out32((VDMA_BASEADDR0 + 0x000), 0x8B);                 // enable circular mode
        Xil_Out32((VDMA_BASEADDR0 + 0x05c), VIDEO_BASEADDR0);         // start address
        Xil_Out32((VDMA_BASEADDR0 + 0x060), VIDEO_BASEADDR1);         // start address
        Xil_Out32((VDMA_BASEADDR0 + 0x064), VIDEO_BASEADDR2);         // start address
        Xil_Out32((VDMA_BASEADDR0 + 0x058), (H_STRIDE0*3));                 // h offset (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR0 + 0x054), (H_ACTIVE0*3));                 // h size (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR0 + 0x050), V_ACTIVE0);                         // v size (480)


//        Xil_Out32((VDMA_BASEADDR1 + 0x030), 0x108B);// enable circular mode
        Xil_Out32((VDMA_BASEADDR1 + 0x030), 0x8B);// enable circular mode
        Xil_Out32((VDMA_BASEADDR1 + 0x0AC), VIDEO_BASEADDR3);        // start address
        Xil_Out32((VDMA_BASEADDR1 + 0x0B0), VIDEO_BASEADDR4);        // start address
        Xil_Out32((VDMA_BASEADDR1 + 0x0B4), VIDEO_BASEADDR5);        // start address
        Xil_Out32((VDMA_BASEADDR1 + 0x0A8), (H_STRIDE1*3));                // h offset (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR1 + 0x0A4), (H_ACTIVE1*3));                // h size (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR1 + 0x0A0), V_ACTIVE1);                        // v size (480)

        Xil_Out32((VDMA_BASEADDR1 + 0x000), 0x8B);                 // enable circular mode
        Xil_Out32((VDMA_BASEADDR1 + 0x05c), VIDEO_BASEADDR3);         // start address
        Xil_Out32((VDMA_BASEADDR1 + 0x060), VIDEO_BASEADDR4);         // start address
        Xil_Out32((VDMA_BASEADDR1 + 0x064), VIDEO_BASEADDR5);         // start address
        Xil_Out32((VDMA_BASEADDR1 + 0x058), (H_STRIDE1*3));                 // h offset (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR1 + 0x054), (H_ACTIVE1*3));                 // h size (640 * 4) bytes
        Xil_Out32((VDMA_BASEADDR1 + 0x050), V_ACTIVE1);                         // v size (480)

tiaotiaoduoduo

发表于 2019-3-1 16:50:33 | 显示全部楼层

/*
* mix_init.c
*
*  Created on: 2019Äê2ÔÂ18èÕ
*      Author: Administrator
*/

#include "xparameters.h"
#include "xv_mix_hw.h"
#include "xv_mix.h"
#include "xv_mix_l2.h"
#include "mix_init.h"

/*
* Device related constants. Defined in xparameters.h
*/
#define MIX_DEVICE_ID      XPAR_V_MIX_0_DEVICE_ID

/*
* OSD Device related data structures
*/
XV_Mix_l2  mix;
XV_mix_Config *MixCfgPtr;
XVidC_VideoWindow win_lay2;
XVidC_VideoWindow win_lay1;





/***************************************************************************
*  This is the main loop of the application
***************************************************************************/
int mix_init(void)
{
        int Status;

    u16 Camera_width = 752;
    u16 Camera_height = 480;

   /* Layer 0/1 property definition */
    int Layer1AlphaValue1 = 0xFF;
    int Layer1AlphaValue2 = 0x80;

        Status = XVMix_Initialize(&mix,MIX_DEVICE_ID);
        if(Status == XST_SUCCESS){
                 xil_printf("--XST_SUCCESS:: XV_mix_Initialize ...\r\n" );
        }
//  XVMIX_LAYER_1
        XVMix_SetLayerAlpha(&mix,XVMIX_LAYER_1,Layer1AlphaValue1);
        win_lay1.StartX=0;
        win_lay1.StartY=0;
        win_lay1.Width=Camera_width;
        win_lay1.Height=Camera_height;
        XVMix_SetLayerWindow(&mix,XVMIX_LAYER_1,&win_lay1,0);
        XVMix_LayerEnable(&mix, XVMIX_LAYER_1);
//  XVMIX_LAYER_2
        XVMix_SetLayerAlpha(&mix,XVMIX_LAYER_2,Layer1AlphaValue2);
        win_lay2.StartX=1280-Camera_width;
        win_lay2.StartY=0;
        win_lay2.Width=Camera_width;
        win_lay2.Height=Camera_height;
        XVMix_SetLayerWindow(&mix,XVMIX_LAYER_2,&win_lay2,0);
        XVMix_LayerEnable(&mix, XVMIX_LAYER_2);

        XVMix_Start(&mix);
        return 0;
}

/*
* tpg_init.c
*
*  Created on: 2019Äê2ÔÂ28èÕ
*      Author: Administrator
*/
#include "xparameters.h"
#include "xv_tpg_hw.h"
#include "xv_tpg.h"
#include "tpg_init.h"

/*
* Device related constants. Defined in xparameters.h
*/
#define TPG_DEVICE_ID      XPAR_V_TPG_0_DEVICE_ID

/*
* OSD Device related data structures
*/
XV_tpg  tpg;




/***************************************************************************
*  This is the main loop of the application
***************************************************************************/
int tpg_init(void)
{
        int Status;


        Status = XV_tpg_Initialize(&tpg,TPG_DEVICE_ID);
        if(Status == XST_SUCCESS){
                 xil_printf("--XST_SUCCESS:: XV_tpg_Initialize ...\r\n" );
        }
        XV_tpg_Set_width(&tpg,1280);
        XV_tpg_Set_height(&tpg,720);
        XV_tpg_Set_bckgndId(&tpg,XTPG_BKGND_SOLID_BLACK);

        XV_tpg_EnableAutoRestart(&tpg);
        XV_tpg_Start(&tpg);
        return 0;
}



您需要登录后才可以回帖 登录 | 立即注册

本版积分规则