TVGHI.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:1k
- #include "Config.h" // Global Configuration - do not remove!
- #ifdef TV_GUARDIAN_ENABLE
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include "Playcoretvgtvghi.h"
- #include "Playcoretvgtvg.h"
- #include "Playcoretvgtvgcode.h"
- #include "Playcoretvgtvgram.h"
- #include "Playcoretvgtvgpar.h"
- uchar tvg_process_gop( uchar *ccdata, uchar *ccdata_out, uchar index, uchar gop_length ) {
- uchar c1,c2, errcnt, i;
- errcnt=0;
- gop_offset = index;
- // index *= 2;
- // ccin = ccdata + index;
- // ccout = ccdata_out + index;
- if(index==0) { // lets check this whole block
- for(i=0;i<(gop_length << 1);i+=2) {
- c1=ccdata[i+0] & 0x7F;
- c2=ccdata[i+1] & 0x7F;
- if(ccdata[i+0] != mkpar[c1]) errcnt++; // parity err
- if(ccdata[i+1] != mkpar[c2]) errcnt++; // parity err
- }
- if(errcnt > ERR_THRESHOLD) {
- tvg_flags |= FORCE_NULLS;
- } else {
- tvg_flags &= ~FORCE_NULLS;
- }
- }
- tvg_process( ccdata, ccdata_out, 1 );
- return errcnt;
- }
- #endif //TV_GUARDIAN_ENABLE