static void calculate_comb_factor_yuy2_vektor( tvtime_t *tvtime, uint8_t *curframe, int instride, int frame_height, int width ) { /* we have yv12 format - to detect the pulldown we only use luminance (Y) data, so we only need the first frame_height * width bytes of the frame */ int i, j, top, mid, bot, wdt, dj, wdt2; tvtime->combfactor = 0; for(i=50; icombfactor += ((top - mid) * (bot - mid) - ( ((top - bot)^2) >> 7 )); } } tvtime->combfactor /= (43 * frame_height); }