⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msapi_dlc.c

📁 mstar 776 开发的车载dvd
💻 C
字号:
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2007 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
// MStar Semiconductor Inc. and be kept in strict confidence
// (¨MStar Confidential Information〃) by the recipient.
// Any unauthorized act including without limitation unauthorized disclosure,
// copying, use, reproduction, sale, distribution, modification, disassembling,
// reverse engineering and compiling of the contents of MStar Confidential
// Information is unlawful and strictly prohibited. MStar hereby reserves the
// rights to any and all damages, losses, costs and expenses resulting therefrom.
//
////////////////////////////////////////////////////////////////////////////////


#define MSAPI_DLC_C

/******************************************************************************/
/*      		      Header Files      			                          */
/* ****************************************************************************/
#include "drvDLC.h"
#include "msAPI_DLC.h"
#include "Board.h"

#if ENABLE_DLC
/********************************************************************************/
/*      			 Local Function Prototypes     				*/
/********************************************************************************/
/********************************************************************************/
/*      			 Functions      				*/
/********************************************************************************/
//*************************************************************************
//Function name:	msAPI_DLC_SetOnOff
//Passing parameter:	BOOLEAN bSwitch: on/off flag
//Return parameter:	none
//Description:			turn on/off DLC
//*************************************************************************

void msAPI_DLC_SetOnOff ( BOOLEAN bSwitch )
{
    MDrv_DLC_SetOnOff( bSwitch );

    //CC Chen.
    //Temporary disable.
//    XBYTE[0x2F00] = 0x1A;
//    XBYTE[0x2F08] &= 0x7F;
}


void msAPI_DLC_Handler ( void )
{
    MDrv_DLC_Handler();
}

U16 msAPI_DLC_GetHistogram(U8 u8Index)
{
    return MDrv_DLC_GetHistogram(u8Index);
}

U8 msAPI_DLC_CalArvHistogram( void )
{
    U8 u8Index;
    U8 u8K;
    U16 u16Pixels;
    U32 u32DlcSum;
    U32 u32PixelSum;

    u8K = 16;

    for(u8Index = 0, u32PixelSum = 0, u32DlcSum = 0 ; u8Index < 8 ; u8Index++, u8K+=32)
    {
        u16Pixels = MDrv_DLC_GetHistogram(u8Index);

        u32PixelSum += u16Pixels;
        u32DlcSum += ((U32)u16Pixels*u8K);
    }

    return (u32DlcSum/u32PixelSum);
}

#endif

#undef MSAPI_DLC_C


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -