#include "biss.h"
#if BISS_DECODE_EN
#include "Gxstdio.h"
#include "dbase.h"
#include "gxosdcomponent.h"
#include "GxWinOsdMenuDef.h"
#include "Os.h"
#include "Gxremote.h"
//#include "GXWinWidgetFrame.h"
#include "language.h"
extern u8 GxKeyOdd(u8 SelectNo, u32 KeyOddH, u32 KeyOddL);
extern u8 GxKeyEven(u8 SelectNo, u32 KeyEvenH, u32 KeyEvenL);
#define BISSCODE_TOTAL_NUM 84
const BissChannel_t s_tBissChannels[BISSCODE_TOTAL_NUM] = {
{ 11892 , 12800 , 0x3 , {0xB9,0x8A,0xC0,0x03,0xDE,0x11,0x03,0xF2}},
{ 11892 , 12800 , 0x4 , {0x18,0xAA,0x00,0x00,0xC2,0xD3,0x28,0x00}},
{ 11830 , 6666 , 0x1 , {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{ 12437 , 27500 , 0x1F06 , {0x22,0x22,0x22,0x66,0x22,0x22,0x22,0x66}},
{ 10723 , 27500 , 0x5 , {0xAB,0xCD,0xEF,0x67,0xFE,0xDC,0xBA,0x94}},
{ 11158 , 3254 , 0x1 , {0x10,0x09,0x19,0x32,0x36,0x24,0x62,0xBC}},
{ 11140 , 1627 , 0x1 , {0x11,0x11,0x11,0x11,0x22,0x22,0x22,0x22}},
{ 4075 , 6000 , 0x1 , {0x55,0x21,0x0C,0x00,0x7D,0xD5,0x30,0x00}},
{ 10762 , 23250 , 0x6 , {0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10}},
{ 3645 , 28000 , 0x11 , {0x26,0x08,0x39,0x67,0x12,0x04,0x38,0x4E}},
{ 12718 , 7036 , 0x63 , {0x53,0x60,0x35,0xE8,0xAB,0xAC,0xAD,0x04}},
{ 12590 , 7446 , 0x65 , {0x98,0x76,0x5E,0x00,0xCD,0x43,0xAB,0x00}},
{ 11862 , 27500 , 0x7 , {0x1A,0x2B,0x3C,0x00,0x4D,0x5E,0x6F,0x00}},
{ 12008 , 4400 , 0x1 , {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{ 11731 , 28126 , 0x10 , {0x84,0xD1,0xA6,0xFB,0x22,0xED,0xF0,0xFF}},
{ 11201 , 2994 , 0x1 , {0x1A,0xEB,0x2E,0x33,0xF5,0x3D,0x00,0x32}},
{ 11615 , 27500 , 0x16 , {0x03,0x03,0x30,0x36,0x33,0x30,0x33,0x96}},
{ 11892 , 12800 , 0x1 , {0xA0,0x21,0x23,0xE4,0x35,0x46,0x14,0x8F}},
{ 12715 , 2965 , 0x1 , {0xA0,0x21,0x23,0xE4,0x35,0x46,0x14,0x8F}},
{ 11094 , 2734 , 0x1 , {0x27,0x12,0x10,0x49,0x20,0x85,0x17,0xBC}},
{ 11411 , 27500 , 0x377D , {0x12,0x34,0x56,0x9C,0xAB,0xCD,0xEF,0x67}},
{ 12645 , 3255 , 0x1 , {0xBB,0xEF,0x01,0xAB,0xE6,0x7E,0x20,0x84}},
{ 11156 , 3978 , 0x64 , {0x02,0x08,0x00,0x0A,0x03,0x07,0x04,0x0D}},
{ 12735 , 16640 , 0x4 , {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{ 12707 , 4340 , 0x1E2C , {0xA8,0x78,0x85,0xA5,0x57,0x2D,0xB4,0x38}},
{ 11061 , 5722 , 0x1 , {0x27,0x12,0x10,0x49,0x20,0x85,0x17,0xBC}},
{ 11766 , 27500 , 0x17DE , {0x19,0x09,0x06,0x00,0x11,0x76,0x60,0x00}},
{ 10723 , 27500 , 0x7 , {0x1A,0x2B,0x3C,0x81,0x4D,0x5E,0x6F,0x1A}},
{ 10992 , 27500 , 0x2135 , {0x59,0x61,0x37,0xF1,0x11,0x53,0x84,0xE8}},
{ 10992 , 27500 , 0x2136 , {0x59,0x61,0x37,0xF1,0x11,0x53,0x84,0xE8}},
{ 3821 , 6500 , 0x1 , {0x10,0x00,0x00,0x10,0x12,0x34,0x50,0x96}},
{ 3821 , 6500 , 0x2 , {0x10,0x00,0x00,0x10,0x12,0x34,0x50,0x96}},
{ 3940 , 7500 , 0x3 , {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{ 3962 , 8570 , 0x2 , {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{ 10818 , 22000 , 0x74FF , {0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77}},
{ 11074 , 22000 , 0x74FF , {0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77}},
{ 11330 , 22000 , 0x74FF , {0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77}},
{ 11159 , 5786 , 0x1 , {0x10,0x09,0x19,0x32,0x36,0x24,0x62,0xBC}},
{ 11159 , 5786 , 0x65 , {0x10,0x09,0x19,0x32,0x36,0x24,0x62,0xBC}},
{ 12716 , 9260 , 0x63 , {0x53,0x60,0x35,0xE8,0xAB,0xAC,0xAD,0x04}},
{ 12735 , 16640 , 0x3 , {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{ 12149 , 27500 , 0x3 , {0x11,0x33,0x55,0x99,0x55,0x33,0x11,0x99}},
{ 12149 , 27500 , 0x4 , {0x11,0x33,0x55,0x99,0x55,0x33,0x11,0x99}},
{ 11931 , 27500 , 0x14 , {0x1B,0x2C,0x3D,0x84,0x4E,0x5F,0x6A,0x17}},
{ 12673 , 27500 , 0x3 , {0x12,0x34,0x56,0x00,0x65,0x43,0x21,0x00}},
{ 11919 , 27500 , 0x1B , {0x12,0x12,0x12,0x36,0x12,0x12,0x12,0x36}},
{ 11804 , 27500 , 0x7 , {0x1A,0x2B,0x3C,0x00,0x4D,0x5E,0x6F,0x00}},
{ 11132 , 1447 , 0x3 , {0xA1,0xC3,0xB2,0x16,0xD4,0xF6,0xE5,0xAF}},
{ 11132 , 1447 , 0x1 , {0xA1,0xC3,0xB2,0x16,0xD4,0xF6,0xE5,0xAF}},
{ 11132 , 1447 , 0x2 , {0xA1,0xC3,0xB2,0x16,0xD4,0xF6,0xE5,0xAF}},
{ 12582 , 4220 , 0x1 , {0x20,0x06,0x20,0x00,0x06,0x20,0x06,0x00}},
{ 12533 , 3000 , 0x64 , {0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11}},
{ 12149 , 27500 , 0x0A2B , {0x10,0x10,0x10,0x30,0x10,0x10,0x10,0x30}},
{ 12015 , 27500 , 0x15E3 , {0x10,0x10,0x10,0x30,0x10,0x10,0x10,0x30}},
{ 11671 , 2480 , 0x1 , {0x21,0x05,0x98,0xBE,0x00,0x00,0x00,0x00}},
{ 3675 , 33483 , 0x2 , {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{ 3675 , 33483 , 0x5 , {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{ 3675 , 33483 , 0x11 , {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{ 11297 , 27500 , 0x20D2 , {0x20,0x00,0x20,0x00,0x00,0x20,0x00,0x00}},
{ 11065 , 18085 , 0x025C , {0x11,0x00,0x00,0x11,0x00,0x00,0x00,0x00}},
{ 3949 , 2220 , 0x1 , {0x1A,0x2B,0x3C,0x81,0x4D,0x5E,0x6F,0x1A}},
{11054 , 30000, 4, {0xA0,0x21,0x23,0x00,0x35,0x46,0x14,0x00}},
{11504 , 30000, 1, {0xA0,0x21,0x23,0x00,0x35,0x46,0x14,0x00}},//NTV 42.0°E
{11504 , 30000, 3, {0xA0,0x21,0x23,0x00,0x35,0x46,0x14,0x00}},//NTV Spor 42.0°E
{11504 , 30000, 7, {0xDE,0xA9,0x11,0x98,0xCA,0xF9,0xE3,0xA6}},//NBA 42.0°E
{4000 , 26850, 1766, {0x12,0x34,0x56,0x78,0x90,0xAB,0xCD,0xEF}},//test
{11919 , 24444, 1, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},//TRT1 42E
{11919 , 24444, 12, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},//TRT3 42E
{11607 , 3750, 1, {0x12,0x34,0x56,0x00,0x65,0x43,0x21,0x00}},
{12595 , 2500, 103, {0xDB,0xA5,0x45,0x00,0xFD,0xE3,0x62,0x00}},
{11953 , 2980, 1, {0x12,0x12,0x12,0x33,0x12,0x12,0x12,0x33}},
{12525 , 30000, 10, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{11804 , 24444, 35, {0xBA,0xCD,0x19,0xA0,0x03,0x20,0x09,0x2C}},//TNT 42.0°E
{10968 , 11200, 3, {0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}},//Ictimai TV 42.0°E
{10968 , 11200, 1, {0x12,0x34,0x56,0x00,0x65,0x43,0x21,0x00}},//AZ TV 42.0°E
{12594 , 2500, 103, {0xDB,0xA5,0x45,0x00,0xFD,0xE3,0x62,00}},//Rustavi 2 42.0°E
{12679 , 8888, 1, {0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }},//24 TV 42.0°E
//yama 201 90.0°E
{3645 , 28000, 17, {0x26,0x08,0x39,0x67,0x12,0x04,0x38,0x4E}},
{3903 , 8888, 2, {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{3922 , 3570, 1, {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{3919 , 4275, 1, {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{3730 , 4285, 1, {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{3594 , 4275, 1, {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
{3582 , 4275, 1, {0x03,0x27,0x02,0x2C,0x10,0x62,0x51,0xC3}},
/**********************************************************/
};
BOOL GxGetBissCode(U16 Fre,U16 Sym,U16 ServiceID,U8 DefaultProg,U8 *pCW)
{
u8 i;
u8 j;
//Printf("Fre:%d\n",Fre);
//Printf("Sym:%d\n",Sym);
//Printf("ServiceID:%d\n",ServiceID);
for(i=0;i<BISSCODE_TOTAL_NUM;i++)
{
if(((s_tBissChannels[i].Freq >= Fre-3) && (s_tBissChannels[i].Freq <= Fre+3))//考虑频偏
&&((s_tBissChannels[i].SymbolRate >= Sym-20) && (s_tBissChannels[i].SymbolRate <= Sym+20))
&& ((s_tBissChannels[i].ServiceID == ServiceID)||DefaultProg)/*预置节目不需要考虑serviceid*/)
{
Printf("^_^Find the biss code....\n");
for(j=0;j<BissCodeLength;j++)
pCW[j]=s_tBissChannels[i].CW[j];
return true;
}
}
for(j=0;j<BissCodeLength;j++)
pCW[j]=0;
return false;
}
void GXSetOddEvenKey(U8* pCW)
{
U32 KeyValueH=0,KeyValueL=0;
KeyValueH = pCW[0];
KeyValueH <<= 8;
KeyValueH |= pCW[1];
KeyValueH <<= 8;
KeyValueH |= pCW[2];
KeyValueH <<= 8;
KeyValueH |= ((pCW[0] + pCW[1] + pCW[2]) & 0xFF);
KeyValueL = pCW[4];
KeyValueL <<= 8;
KeyValueL |= pCW[5];
KeyValueL <<= 8;
KeyValueL |= pCW[6];
KeyValueL <<= 8;
KeyValueL |= ((pCW[4] + pCW[5] + pCW[6]) & 0xFF);
GxKeyOdd(0,KeyValueH,KeyValueL);
Printf("OddKeyValueH=0x%x,OddKeyValueL=0x%x\n",KeyValueH,KeyValueL);
KeyValueH = pCW[0];
KeyValueH <<= 8
评论0