* Filters array of bytes (Y or U or V values) */
| 3166 | * Filters array of bytes (Y or U or V values) |
| 3167 | */ |
| 3168 | static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, |
| 3169 | const QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c2) |
| 3170 | { |
| 3171 | DECLARE_ALIGNED(8, PPContext, c)= *c2; //copy to stack for faster access |
| 3172 | int x,y; |
| 3173 | #ifdef COMPILE_TIME_MODE |
| 3174 | const int mode= COMPILE_TIME_MODE; |
| 3175 | #else |
| 3176 | const int mode= isColor ? c.ppMode.chromMode : c.ppMode.lumMode; |
| 3177 | #endif |
| 3178 | int black=0, white=255; // blackest black and whitest white in the picture |
| 3179 | int QPCorrecture= 256*256; |
| 3180 | |
| 3181 | int copyAhead; |
| 3182 | #if HAVE_MMX |
| 3183 | int i; |
| 3184 | #endif |
| 3185 | |
| 3186 | const int qpHShift= isColor ? 4-c.hChromaSubSample : 4; |
| 3187 | const int qpVShift= isColor ? 4-c.vChromaSubSample : 4; |
| 3188 | |
| 3189 | //FIXME remove |
| 3190 | uint64_t * const yHistogram= c.yHistogram; |
| 3191 | uint8_t * const tempSrc= srcStride > 0 ? c.tempSrc : c.tempSrc - 23*srcStride; |
| 3192 | uint8_t * const tempDst= dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride; |
| 3193 | //const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4; |
| 3194 | |
| 3195 | #if HAVE_MMX |
| 3196 | for(i=0; i<57; i++){ |
| 3197 | int offset= ((i*c.ppMode.baseDcDiff)>>8) + 1; |
| 3198 | int threshold= offset*2 + 1; |
| 3199 | c.mmxDcOffset[i]= 0x7F - offset; |
| 3200 | c.mmxDcThreshold[i]= 0x7F - threshold; |
| 3201 | c.mmxDcOffset[i]*= 0x0101010101010101LL; |
| 3202 | c.mmxDcThreshold[i]*= 0x0101010101010101LL; |
| 3203 | } |
| 3204 | #endif |
| 3205 | |
| 3206 | if(mode & CUBIC_IPOL_DEINT_FILTER) copyAhead=16; |
| 3207 | else if( (mode & LINEAR_BLEND_DEINT_FILTER) |
| 3208 | || (mode & FFMPEG_DEINT_FILTER) |
| 3209 | || (mode & LOWPASS5_DEINT_FILTER)) copyAhead=14; |
| 3210 | else if( (mode & V_DEBLOCK) |
| 3211 | || (mode & LINEAR_IPOL_DEINT_FILTER) |
| 3212 | || (mode & MEDIAN_DEINT_FILTER) |
| 3213 | || (mode & V_A_DEBLOCK)) copyAhead=13; |
| 3214 | else if(mode & V_X1_FILTER) copyAhead=11; |
| 3215 | // else if(mode & V_RK1_FILTER) copyAhead=10; |
| 3216 | else if(mode & DERING) copyAhead=9; |
| 3217 | else copyAhead=8; |
| 3218 | |
| 3219 | copyAhead-= 8; |
| 3220 | |
| 3221 | if(!isColor){ |
| 3222 | uint64_t sum= 0; |
| 3223 | int i; |
| 3224 | uint64_t maxClipped; |
| 3225 | uint64_t clipped; |
nothing calls this directly
no test coverage detected