Revision d022ce5c postproc/swscale.c

View differences:

postproc/swscale.c
506 506

  
507 507
	for(i=0;i<dstw;i++)
508 508
	{
509
		((uint8_t*)dest)[0] = (buf0[i]*yalpha1+buf1[i]*yalpha)>>19;
510
		dest++;
509
		((uint8_t*)dest)[i] = (buf0[i]*yalpha1+buf1[i]*yalpha)>>19;
511 510
	}
512 511

  
513 512
	if(uvalpha != -1)
514 513
	{
515 514
		for(i=0; i<dstw/2; i++)
516 515
		{
517
			((uint8_t*)uDest)[0] = (uvbuf0[i]*uvalpha1+uvbuf1[i]*uvalpha)>>19;
518
			((uint8_t*)vDest)[0] = (uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19;
519
			uDest++;
520
			vDest++;
516
			((uint8_t*)uDest)[i] = (uvbuf0[i]*uvalpha1+uvbuf1[i]*uvalpha)>>19;
517
			((uint8_t*)vDest)[i] = (uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19;
521 518
		}
522 519
	}
523 520
}
......
704 701
				int U=((uvbuf0[i]*uvalpha1+uvbuf1[i]*uvalpha)>>19);
705 702
				int V=((uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19);
706 703

  
707
				((uint16_t*)dest)[0] =
704
				((uint16_t*)dest)[i] =
708 705
					(clip_table[(Y + yuvtab_40cf[U]) >>13]>>3) |
709 706
					((clip_table[(Y + yuvtab_1a1e[V] + yuvtab_0c92[U]) >>13]<<3)&0x07E0) |
710 707
					((clip_table[(Y + yuvtab_3343[V]) >>13]<<8)&0xF800);
711
				dest+=2;
712 708
			}
713 709
		}
714 710
		else if(dstbpp==15)
......
719 715
				int U=((uvbuf0[i]*uvalpha1+uvbuf1[i]*uvalpha)>>19);
720 716
				int V=((uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19);
721 717

  
722
				((uint16_t*)dest)[0] =
718
				((uint16_t*)dest)[i] =
723 719
					(clip_table[(Y + yuvtab_40cf[U]) >>13]>>3) |
724 720
					((clip_table[(Y + yuvtab_1a1e[V] + yuvtab_0c92[U]) >>13]<<2)&0x03E0) |
725 721
					((clip_table[(Y + yuvtab_3343[V]) >>13]<<7)&0x7C00);
726
				dest+=2;
727 722
			}
728 723
		}
729 724
#endif
......
814 809
				int U=((uvbuf0[i/2]*uvalpha1+uvbuf1[i/2]*uvalpha)>>19);
815 810
				int V=((uvbuf0[i/2+2048]*uvalpha1+uvbuf1[i/2+2048]*uvalpha)>>19);
816 811

  
817
				((uint16_t*)dest)[0] =
812
				((uint16_t*)dest)[i] =
818 813
					(clip_table[(Y + yuvtab_40cf[U]) >>13]>>3) |
819 814
					((clip_table[(Y + yuvtab_1a1e[V] + yuvtab_0c92[U]) >>13]<<3)&0x07E0) |
820 815
					((clip_table[(Y + yuvtab_3343[V]) >>13]<<8)&0xF800);
821
				dest+=2;
822 816
			}
823 817
		}
824 818
		else if(dstbpp==15)
......
829 823
				int U=((uvbuf0[i/2]*uvalpha1+uvbuf1[i/2]*uvalpha)>>19);
830 824
				int V=((uvbuf0[i/2+2048]*uvalpha1+uvbuf1[i/2+2048]*uvalpha)>>19);
831 825

  
832
				((uint16_t*)dest)[0] =
826
				((uint16_t*)dest)[i] =
833 827
					(clip_table[(Y + yuvtab_40cf[U]) >>13]>>3) |
834 828
					((clip_table[(Y + yuvtab_1a1e[V] + yuvtab_0c92[U]) >>13]<<2)&0x03E0) |
835 829
					((clip_table[(Y + yuvtab_3343[V]) >>13]<<7)&0x7C00);
836
				dest+=2;
837 830
			}
838 831
		}
839 832
#endif
......
993 986
			int U=((uvbuf0[i/2]*uvalpha1+uvbuf1[i/2]*uvalpha)>>19);
994 987
			int V=((uvbuf0[i/2+2048]*uvalpha1+uvbuf1[i/2+2048]*uvalpha)>>19);
995 988

  
996
			((uint16_t*)dest)[0] =
989
			((uint16_t*)dest)[i] =
997 990
				(clip_table[(Y + yuvtab_40cf[U]) >>13]>>3) |
998 991
				((clip_table[(Y + yuvtab_1a1e[V] + yuvtab_0c92[U]) >>13]<<3)&0x07E0) |
999 992
				((clip_table[(Y + yuvtab_3343[V]) >>13]<<8)&0xF800);
1000
			dest+=2;
1001 993
		}
1002 994
	}
1003 995
	else if(dstbpp==15)
......
1008 1000
			int U=((uvbuf0[i/2]*uvalpha1+uvbuf1[i/2]*uvalpha)>>19);
1009 1001
			int V=((uvbuf0[i/2+2048]*uvalpha1+uvbuf1[i/2+2048]*uvalpha)>>19);
1010 1002

  
1011
			((uint16_t*)dest)[0] =
1003
			((uint16_t*)dest)[i] =
1012 1004
				(clip_table[(Y + yuvtab_40cf[U]) >>13]>>3) |
1013 1005
				((clip_table[(Y + yuvtab_1a1e[V] + yuvtab_0c92[U]) >>13]<<2)&0x03E0) |
1014 1006
				((clip_table[(Y + yuvtab_3343[V]) >>13]<<7)&0x7C00);
1015
			dest+=2;
1016 1007
		}
1017 1008
	}
1018 1009
#endif

Also available in: Unified diff