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

📄 tmdlmbs2_coeff.c

📁 PNX1500上做视频缩放MBS的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
//-----------------------------------------------------------------------------// (C) Copyright 2003 Philips Semiconductors, All rights reserved//// This source code and any compilation or derivative thereof is the sole// property of Philips Corporation and is provided pursuant to a Software// License Agreement.  This code is the proprietary information of Philips// Corporation and is confidential in nature.  Its use and dissemination by// any party other than Philips Corporation is strictly limited by the// confidential information provisions of the Agreement referenced above.//-----------------------------------------------------------------------------// FILE NAME:    tmdlMbs2_Coeff.c//// DESCRIPTION: This file contains the filter coefficient functions and//              information used by the MBS2 Device Library.////// DOCUMENT REF:////  NOTES://-----------------------------------------------------------------------------//-----------------------------------------------------------------------------// Standard include files://-----------------------------------------------------------------------------#include <stdlib.h>#include <string.h>//-----------------------------------------------------------------------------// Project include files://-----------------------------------------------------------------------------#include <tmdlMbs.h>#include <tmml.h>#include <tmdlMbs2_Local.h>#include <tmdlMbs2_Coeff.h>#include <tmdlMbs2_Support.h>   // For tmdlMbsGetScaleFactor2//-----------------------------------------------------------------------------// Local Types://-----------------------------------------------------------------------------typedef struct _tmdlHscModuleInfo_t{    tmdlMbsCoeffDescr_t     descriptor;    pUInt32                 pCoeff;} tmdlHscModuleInfo_t, *ptmdlHscModuleInfo_t;typedef struct _tmdlVscModuleInfo_t{    tmdlMbsCoeffDescr_t     descriptor;    pUInt32                 pYcoeff;    pUInt32                 pUVcoeff;} tmdlVscModuleInfo_t, *ptmdlVscModuleInfo_t;typedef union{#if (TMFL_ENDIAN == TMFL_ENDIAN_BIG)    struct    {        Int32   resrvd  : 2;        Int32   coeff2  : 10;        Int32   coeff1  : 10;        Int32   coeff0  : 10;    } bits;#else    struct    {        Int32   coeff0  : 10;        Int32   coeff1  : 10;        Int32   coeff2  : 10;        Int32   resrvd  : 2;    } bits;#endif    UInt32  u32;} tmdlMbsFilterCoeffs_t;//-----------------------------------------------------------------------------// Default Scaling Modules://-----------------------------------------------------------------------------static UInt32 gHammingDefault [128] ={0x00000000, 0x00000200, 0x3fa00400, 0x3ff01a00,0x3f300c00, 0x3fe03201, 0x3ec013ff, 0x3fd04602,0x3e501bff, 0x3fc05a04, 0x3de01fff, 0x3fb06e06,0x3d6027ff, 0x3fa08209, 0x3ce02fff, 0x3f90920c,0x3c6033fe, 0x3f90a20f, 0x3bd03bfe, 0x3f80ae13,0x3b4043fe, 0x3f80be18, 0x3ab04bfe, 0x3f70ca1d,0x3a2053fd, 0x3f70d222, 0x39905bfd, 0x3f60de28,0x38f063fd, 0x3f60e62e, 0x38506bfc, 0x3f60ee34,0x37b073fc, 0x3f50f23b, 0x37107bfc, 0x3f50fa42,0x366083fc, 0x3f50fe4a, 0x35c08bfb, 0x3f510252,0x351093fb, 0x3f51065a, 0x34609ffb, 0x3f510662,0x33c0a7fa, 0x3f51066b, 0x3310affa, 0x3f510674,0x3260b7fa, 0x3f51067d, 0x31b0bff9, 0x3f510687,0x3100c7f9, 0x3f610291, 0x3050cff9, 0x3f61029b,0x2fa0d3f8, 0x3f60fea5, 0x2ef0dbf8, 0x3f60faaf,0x2e40e3f8, 0x3f70f6ba, 0x2d90ebf7, 0x3f70f2c4,0x2ce0eff7, 0x3f70eacf, 0x2c30f3f7, 0x3f70e6da,0x2b80fbf6, 0x3f80dee5, 0x2ae0fff6, 0x3f80d6f0,0x2a4103f6, 0x3f80d2fb, 0x299107f6, 0x3f90cb06,0x28f107f5, 0x3f90c311, 0x28610bf5, 0x3f90bb1c,0x27c10bf5, 0x3fa0b327, 0x27310bf5, 0x3fa0ab32,0x26a10bf5, 0x3fa0a33d, 0x26110bf5, 0x3fb09b47,0x259107f5, 0x3fb09352, 0x251107f5, 0x3fb08b5d,0x249103f5, 0x3fc08367, 0x2410fff5, 0x3fc07b72,0x23a0f7f5, 0x3fc0737c, 0x2330eff5, 0x3fd06786,0x22d0ebf6, 0x3fd05f90, 0x2270dff6, 0x3fd05799,0x2210d7f6, 0x3fd053a3, 0x21c0cbf7, 0x3fe04bac,0x2170bff7, 0x3fe043b5, 0x2130b3f8, 0x3fe03bbe,0x20f0a3f9, 0x3fe033c6, 0x20b093f9, 0x3ff02bce,0x208083fa, 0x3ff027d6, 0x20606ffb, 0x3ff01fde,0x20405bfc, 0x3ff01be5, 0x202047fd, 0x3ff013ec,0x201033fe, 0x00000ff3, 0x20001bff, 0x000007fa};// hamming filter stretched with factor 1.8 for anti flicker filteringstatic UInt32 gHammingAff18 [128] ={0x381ff803, 0x3fee0afe, 0x37dff803, 0x3ffe16fe,0x37aff403, 0x000e22ff, 0x377ff003, 0x000e2eff,0x374ff003, 0x001e3aff, 0x371fec03, 0x001e46ff,0x36efe803, 0x001e4f00, 0x36bfe403, 0x002e5b01,0x368fe003, 0x002e6701, 0x365fdc03, 0x003e7302,0x362fd803, 0x003e7f03, 0x35ffd403, 0x003e8b04,0x35cfd003, 0x003e9704, 0x359fcc03, 0x004e9f06,0x356fc803, 0x004eab07, 0x353fc404, 0x004eb708,0x350fbc04, 0x004ec309, 0x34dfb804, 0x004ecb0a,0x34afb404, 0x004ed70c, 0x348fac04, 0x005edf0d,0x345fa804, 0x005eeb0f, 0x342fa004, 0x005ef310,0x33ff9c04, 0x005eff12, 0x33cf9404, 0x005f0714,0x33af9004, 0x005f1316, 0x337f8804, 0x005f1b18,0x334f8004, 0x005f231a, 0x332f7805, 0x005f2f1c,0x32ff7405, 0x005f371e, 0x32df6c05, 0x005f3f20,0x32af6405, 0x005f4722, 0x328f5c05, 0x005f4f24,0x326f5405, 0x005f5727, 0x323f4c05, 0x005f5f29,0x321f4405, 0x005f672b, 0x31ff3805, 0x005f6f2e,0x31df3005, 0x004f7730, 0x31bf2805, 0x004f7f33,0x319f2005, 0x004f8735, 0x317f1405, 0x004f8b38,0x315f0c05, 0x004f933b, 0x313f0405, 0x004f9b3d,0x312ef805, 0x004f9f40, 0x310ef005, 0x004fa743,0x30eee405, 0x004fab46, 0x30dedc05, 0x004fb349,0x30bed005, 0x004fb74c, 0x30aec404, 0x004fbb4e,0x309ebc04, 0x003fc351, 0x307eb004, 0x003fc754,0x306ea404, 0x003fcb57, 0x305e9c04, 0x003fcf5a,0x304e9003, 0x003fd35d, 0x303e8403, 0x003fd760,0x302e7803, 0x003fdb63, 0x302e6c03, 0x003fdf66,0x301e6002, 0x003fe369, 0x300e5402, 0x003fe76c,0x300e4801, 0x003feb6f, 0x2ffe4001, 0x003fef72,0x2ffe3401, 0x003ff375, 0x2ffe2800, 0x003ff378,0x2ffe1c00, 0x003ff77c, 0x2fee13ff, 0x003ffb7f};// Hor1f in the filter matrixstatic UInt32 gHorCompDefCoeff [128] ={0x3b109c00, 0x27ec650,  0x3ab0a000, 0x26ee24f,0x3a50a400, 0x25efa4f,  0x39e0a800, 0x24f0e51,0x3980ac00, 0x22f2652,  0x3910b000, 0x21f3e53,0x38a0b400, 0x20f5255,  0x3830b800, 0x1ff6a56,0x37c0b800, 0x1ef7e59,  0x3750bc00, 0x1df925b,0x36e0c000, 0x1cfa65d,  0x3660c401, 0x1bfb660,0x35f0c401, 0x1afca63,  0x3580c801, 0x19fda66,0x3500c801, 0x18fee6a,  0x3490cc01, 0x17ffe6d,0x3410cc02, 0x1600e71,  0x33a0cc02, 0x1501a76,0x3320d002, 0x1402a7a,  0x32b0d003, 0x130367e,0x3230d003, 0x1204683,  0x31c0d003, 0x1105288,0x3140d004, 0x1005e8d,  0x30d0cc04, 0xf06a93,0x3050cc04, 0xe0729a,   0x2fe0cc05, 0xd07e9e,0x2f60c805, 0xd086a5,   0x2ef0c406, 0xc08eab,0x2e80c006, 0xb096b2,   0x2e10c007, 0xa09eb7,0x2d90b807, 0xa0a6bf,   0x2d20b408, 0x90aec5,0x2cc0b008, 0x80b2cc,   0x2c50ac09, 0x80b6d2,0x2bf0a40a, 0x70bad9,   0x2b709c0a, 0x70c2e1,0x2b20940b, 0x60c2e8,   0x2ab08c0c, 0x60c6ef,0x2a50840d, 0x50caf6,   0x29e07c0d, 0x50cefe,0x29a0700e, 0x40cf05,   0x2930680f, 0x40cf0d,0x28d05c10, 0x40d314,   0x28805011, 0x30d31c,0x28304412, 0x30d323,   0x27e03413, 0x30d32b,0x27a02814, 0x20d332,   0x27601815, 0x20cf3a,0x27100c16, 0x20cf41,   0x26dffc17, 0x10cf49,0x26afec18, 0x10cb50,   0x266fd819, 0x10cb58,0x263fc81a, 0x10c75f,   0x260fb41b, 0x10c766,0x25dfa41c, 0x00c36e,   0x25bf901d, 0x00bf75,0x259f7c1e, 0x00bb7c,   0x256f681f, 0x00bb83,0x255f5020, 0x00b78a,   0x253f3c21, 0x00b391,0x252f2422, 0x00af98,   0x251f0c24, 0x00ab9e,0x24fef825, 0x00a7a5,   0x24fee026, 0x00a3ab};//Horz expansion default coeffstatic UInt32 gHorExpDefCoeff [128] ={0x3e0047f7, 0x11f8227,  0x3d904ff7, 0xff9a28,0x3d2053f7, 0xdfb629,   0x3cb05bf7, 0xbfce2a,0x3c3063f7, 0x9fe62c,   0x3bc06ff7, 0x8ffa2c,0x3b4077f7, 0x60122e,   0x3ac07ff6, 0x402632,0x3a4087f6, 0x303a34,   0x39c08ff6, 0x104e37,0x393097f6, 0x623a,     0x38b09ff6, 0x3ff0723d,0x3820a7f5, 0x3fe08242, 0x37a0aff5, 0x3fc09246,0x3710b7f5, 0x3fb0a24a, 0x3680bff5, 0x3fa0ae4f,0x35f0c7f4, 0x3f90ba55, 0x3560cff4, 0x3f80c65a,0x34c0d3f4, 0x3f70d261, 0x3430dbf4, 0x3f70da66,0x33a0e3f3, 0x3f60e66c, 0x3300e7f3, 0x3f50ee74,0x3270eff3, 0x3f50f27a, 0x31e0f3f3, 0x3f40fa81,0x3140fbf2, 0x3f40fe89, 0x30b0fff2, 0x3f310690,0x302103f2, 0x3f310a97, 0x2f9107f2, 0x3f210aa0,0x2ef10bf2, 0x3f210ea8, 0x2e610bf2, 0x3f2112b0,0x2dd10ff2, 0x3f2112b8, 0x2d410ff2, 0x3f2112c1,0x2cb113f2, 0x3f2112c9, 0x2c1113f2, 0x3f210ed4,0x2b8113f2, 0x3f210edd, 0x2b0113f2, 0x3f210ae6,0x2a810ff2, 0x3f210aef, 0x2a010bf2, 0x3f2106f9,0x29710bf3, 0x3f210302, 0x290107f3, 0x3f20ff0b,0x2890fff4, 0x3f20fb14, 0x2810fbf4, 0x3f30f31e,0x27a0f3f5, 0x3f30ef27, 0x2740eff5, 0x3f30e730,0x26c0e7f6, 0x3f30e33a, 0x2660dbf7, 0x3f40db43,0x2610d3f7, 0x3f40d34c, 0x25a0c7f8, 0x3f40cf56,0x2550bbf9, 0x3f40c75f, 0x24f0affa, 0x3f50bf68,0x24a0a3fb, 0x3f50b771, 0x246093fc, 0x3f50af7a,0x242083fe, 0x3f50a782, 0x23d073ff, 0x3f609f8b,0x23a06000, 0x3f609793, 0x23704c01, 0x3f608f9c,0x23403803, 0x3f6087a4, 0x23202404, 0x3f607fac,0x22e01006, 0x3f7077b4, 0x22cff808, 0x3f706fbc,0x22cfe409, 0x3f7063c3, 0x22afcc0b, 0x3f705bcb,0x229fb40d, 0x3f7053d2, 0x228f980f, 0x3f704fd9};//Horz/vert expansion default coeff bandpass Low// Using HorE1/VerE1static UInt32 gExpCoeffLow [128] ={0x3a607bf8, 0x1ee9a80,  0x3a007ff8, 0x1eeae80,0x39b083f8, 0x1dec280,  0x395083f8, 0x1ceda81,0x38f087f8, 0x1beee82,  0x38908bf8, 0x1af0283,0x38408bf8, 0x19f1684,  0x37e08ff8, 0x19f2685,0x37808ff8, 0x18f3a87,  0x37208ff9, 0x17f4a89,0x36b093f9, 0x16f5e8b,  0x365093f9, 0x15f6e8e,0x35f093f9, 0x14f7e91,  0x359093fa, 0x13f8e93,0x353097fa, 0x12f9e95,  0x34c097fa, 0x11fae99,0x346097fb, 0x10fbe9b,  0x340093fb, 0xffcaa0,0x339093fb, 0xffdaa3,   0x333093fc, 0xefe6a6,0x32d093fc, 0xdff2aa,   0x32708ffd, 0xcffeae,0x32008ffd, 0xb00ab3,   0x31a08bfe, 0xa016b7,0x314087fe, 0x901ebd,   0x30e087ff, 0x902abf,0x308083ff, 0x8032c5,   0x30207c00, 0x703ec9,0x2fc07800, 0x6046cf,   0x2f607001, 0x504ed5,0x2f006c02, 0x5056d9,   0x2eb06802, 0x405adf,0x2e506003, 0x3062e5,   0x2df05804, 0x206aeb,0x2d905405, 0x206ef0,   0x2d504c05, 0x1072f6,0x2cf04406, 0x7afc,     0x2c903c07, 0x7f02,0x2c503008, 0x3ff08308, 0x2bf02809, 0x3ff0870e,0x2bd01c09, 0x3fe08714, 0x2b70140a, 0x3fe08b1a,0x2b30080b, 0x3fd08f20, 0x2aeffc0c, 0x3fd08f27,0x2aaff00d, 0x3fc0932d, 0x2a6fe40e, 0x3fc09333,0x2a3fd80f, 0x3fb09339, 0x2a0fc80f, 0x3fb09340,0x29bfbc10, 0x3fb09746, 0x299fac11, 0x3fa0974c,0x295f9c12, 0x3fa09753, 0x293f8c13, 0x3fa09359,0x291f7c14, 0x3f90935f, 0x28ef6c15, 0x3f909365,0x28bf5c16, 0x3f90936b, 0x289f4817, 0x3f908f72,0x287f3818, 0x3f808f78, 0x285f2419, 0x3f808f7e,0x284f1419, 0x3f808b84, 0x283f001a, 0x3f808b89,0x282eec1b, 0x3f80878f, 0x281ed81c, 0x3f808395,0x280ec01d, 0x3f80839b, 0x280eac1e, 0x3f807fa0};//Horz/vert expansion default coeff bandpass Medium// Using HorE3/VerE3static UInt32 gExpCoeffMedium [128] ={0x3e0047f7, 0x11f8227,  0x3d904ff7, 0xff9a28,0x3d2053f7, 0xdfb629,   0x3cb05bf7, 0xbfce2a,0x3c3063f7, 0x9fe62c,   0x3bc06ff7, 0x8ffa2c,0x3b4077f7, 0x60122e,   0x3ac07ff6, 0x402632,0x3a4087f6, 0x303a34,   0x39c08ff6, 0x104e37,0x393097f6, 0x623a,     0x38b09ff6, 0x3ff0723d,0x3820a7f5, 0x3fe08242, 0x37a0aff5, 0x3fc09246,0x3710b7f5, 0x3fb0a24a, 0x3680bff5, 0x3fa0ae4f,0x35f0c7f4, 0x3f90ba55, 0x3560cff4, 0x3f80c65a,0x34c0d3f4, 0x3f70d261, 0x3430dbf4, 0x3f70da66,0x33a0e3f3, 0x3f60e66c, 0x3300e7f3, 0x3f50ee74,0x3270eff3, 0x3f50f27a, 0x31e0f3f3, 0x3f40fa81,0x3140fbf2, 0x3f40fe89, 0x30b0fff2, 0x3f310690,0x302103f2, 0x3f310a97, 0x2f9107f2, 0x3f210aa0,0x2ef10bf2, 0x3f210ea8, 0x2e610bf2, 0x3f2112b0,0x2dd10ff2, 0x3f2112b8, 0x2d410ff2, 0x3f2112c1,0x2cb113f2, 0x3f2112c9, 0x2c1113f2, 0x3f210ed4,0x2b8113f2, 0x3f210edd, 0x2b0113f2, 0x3f210ae6,0x2a810ff2, 0x3f210aef, 0x2a010bf2, 0x3f2106f9,0x29710bf3, 0x3f210302, 0x290107f3, 0x3f20ff0b,0x2890fff4, 0x3f20fb14, 0x2810fbf4, 0x3f30f31e,0x27a0f3f5, 0x3f30ef27, 0x2740eff5, 0x3f30e730,0x26c0e7f6, 0x3f30e33a, 0x2660dbf7, 0x3f40db43,0x2610d3f7, 0x3f40d34c, 0x25a0c7f8, 0x3f40cf56,0x2550bbf9, 0x3f40c75f, 0x24f0affa, 0x3f50bf68,0x24a0a3fb, 0x3f50b771, 0x246093fc, 0x3f50af7a,0x242083fe, 0x3f50a782, 0x23d073ff, 0x3f609f8b,0x23a06000, 0x3f609793, 0x23704c01, 0x3f608f9c,0x23403803, 0x3f6087a4, 0x23202404, 0x3f607fac,0x22e01006, 0x3f7077b4, 0x22cff808, 0x3f706fbc,0x22cfe409, 0x3f7063c3, 0x22afcc0b, 0x3f705bcb,0x229fb40d, 0x3f7053d2, 0x228f980f, 0x3f704fd9};//Horz/vert expansion default coeff bandpass Medium High// Using HorE4/VerE4static UInt32 gExpCoeffMediumHigh [128] ={0x3e704bfb, 0x12f9e13,  0x3e004ffb, 0x10fba14,0x3d9057fb, 0xefd215,   0x3d205ffb, 0xcfea16,0x3ca067fb, 0xb00217,   0x3c206ffb, 0x901a19,0x3ba077fb, 0x802e1b,   0x3b207ffa, 0x60461e,

⌨️ 快捷键说明

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