comparison postprocess.c @ 68:d05918aeb89d libpostproc

Remove clip_table as it is not used anymore. Patch by Diego 'Flameeyes' Petten (flameeyes gmail com)
author reimar
date Tue, 08 Jan 2008 22:03:30 +0000
parents fb2657d1e70d
children afd400fd0923
comparison
equal deleted inserted replaced
67:fb2657d1e70d 68:d05918aeb89d
108 static DECLARE_ALIGNED(8, uint64_t attribute_used, b01)= 0x0101010101010101LL; 108 static DECLARE_ALIGNED(8, uint64_t attribute_used, b01)= 0x0101010101010101LL;
109 static DECLARE_ALIGNED(8, uint64_t attribute_used, b02)= 0x0202020202020202LL; 109 static DECLARE_ALIGNED(8, uint64_t attribute_used, b02)= 0x0202020202020202LL;
110 static DECLARE_ALIGNED(8, uint64_t attribute_used, b08)= 0x0808080808080808LL; 110 static DECLARE_ALIGNED(8, uint64_t attribute_used, b08)= 0x0808080808080808LL;
111 static DECLARE_ALIGNED(8, uint64_t attribute_used, b80)= 0x8080808080808080LL; 111 static DECLARE_ALIGNED(8, uint64_t attribute_used, b80)= 0x8080808080808080LL;
112 #endif 112 #endif
113
114 static uint8_t clip_table[3*256];
115 static uint8_t * const clip_tab= clip_table + 256;
116 113
117 static const int attribute_used deringThreshold= 20; 114 static const int attribute_used deringThreshold= 20;
118 115
119 116
120 static struct PPFilter filters[]= 117 static struct PPFilter filters[]=
968 reallocAlign((void **)&c->nonBQPTable, 8, qpStride*mbHeight*sizeof(QP_STORE_T)); 965 reallocAlign((void **)&c->nonBQPTable, 8, qpStride*mbHeight*sizeof(QP_STORE_T));
969 reallocAlign((void **)&c->stdQPTable, 8, qpStride*mbHeight*sizeof(QP_STORE_T)); 966 reallocAlign((void **)&c->stdQPTable, 8, qpStride*mbHeight*sizeof(QP_STORE_T));
970 reallocAlign((void **)&c->forcedQPTable, 8, mbWidth*sizeof(QP_STORE_T)); 967 reallocAlign((void **)&c->forcedQPTable, 8, mbWidth*sizeof(QP_STORE_T));
971 } 968 }
972 969
973 static void global_init(void){
974 int i;
975 memset(clip_table, 0, 256);
976 for(i=256; i<512; i++)
977 clip_table[i]= i;
978 memset(clip_table+512, 0, 256);
979 }
980
981 static const char * context_to_name(void * ptr) { 970 static const char * context_to_name(void * ptr) {
982 return "postproc"; 971 return "postproc";
983 } 972 }
984 973
985 static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL }; 974 static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL };
986 975
987 pp_context_t *pp_get_context(int width, int height, int cpuCaps){ 976 pp_context_t *pp_get_context(int width, int height, int cpuCaps){
988 PPContext *c= av_malloc(sizeof(PPContext)); 977 PPContext *c= av_malloc(sizeof(PPContext));
989 int stride= (width+15)&(~15); //assumed / will realloc if needed 978 int stride= (width+15)&(~15); //assumed / will realloc if needed
990 int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed 979 int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
991
992 global_init();
993 980
994 memset(c, 0, sizeof(PPContext)); 981 memset(c, 0, sizeof(PPContext));
995 c->av_class = &av_codec_context_class; 982 c->av_class = &av_codec_context_class;
996 c->cpuCaps= cpuCaps; 983 c->cpuCaps= cpuCaps;
997 if(cpuCaps&PP_FORMAT){ 984 if(cpuCaps&PP_FORMAT){