Revision 07f8991b postproc/postprocess_template.c

View differences:

postproc/postprocess_template.c
2615 2615
	long long memcpyTime=0, vertTime=0, horizTime=0, sumTime;
2616 2616
	sumTime= rdtsc();
2617 2617
#endif
2618
//mode= 0x7F;
2618

  
2619
	dcOffset= ppMode->maxDcDiff;
2620
	dcThreshold= ppMode->maxDcDiff*2 + 1;
2621

  
2619 2622
#ifdef HAVE_MMX
2620 2623
	maxTmpNoise[0]= ppMode->maxTmpNoise[0];
2621 2624
	maxTmpNoise[1]= ppMode->maxTmpNoise[1];
2622 2625
	maxTmpNoise[2]= ppMode->maxTmpNoise[2];
2626
	
2627
	mmxDCOffset= 0x7F - dcOffset;
2628
	mmxDCThreshold= 0x7F - dcThreshold;
2629

  
2630
	mmxDCOffset*= 0x0101010101010101LL;
2631
	mmxDCThreshold*= 0x0101010101010101LL;
2623 2632
#endif
2624 2633

  
2625 2634
	if(mode & CUBIC_IPOL_DEINT_FILTER) copyAhead=16;
......
2662 2671

  
2663 2672
		if(mode & FULL_Y_RANGE)
2664 2673
		{
2665
			maxAllowedY=255;
2666
			minAllowedY=0;
2674
			ppMode->maxAllowedY=255;
2675
			ppMode->minAllowedY=0;
2667 2676
		}
2668 2677
	}
2669 2678

  
......
2703 2712
			clipped-= yHistogram[white];
2704 2713
		}
2705 2714

  
2706
		scale= (double)(maxAllowedY - minAllowedY) / (double)(white-black);
2715
		scale= (double)(ppMode->maxAllowedY - ppMode->minAllowedY) / (double)(white-black);
2707 2716

  
2708 2717
#ifdef HAVE_MMX2
2709 2718
		packedYScale= (uint16_t)(scale*256.0 + 0.5);
2710
		packedYOffset= (((black*packedYScale)>>8) - minAllowedY) & 0xFFFF;
2719
		packedYOffset= (((black*packedYScale)>>8) - ppMode->minAllowedY) & 0xFFFF;
2711 2720
#else
2712 2721
		packedYScale= (uint16_t)(scale*1024.0 + 0.5);
2713
		packedYOffset= (black - minAllowedY) & 0xFFFF;
2722
		packedYOffset= (black - ppMode->minAllowedY) & 0xFFFF;
2714 2723
#endif
2715 2724

  
2716 2725
		packedYOffset|= packedYOffset<<32;

Also available in: Unified diff