comparison dec_video.c @ 4745:398e3663ed71

Allow using direct rendering with any HW pitches (even on matrox g400).
author nick
date Sun, 17 Feb 2002 15:54:58 +0000
parents d3a52470594c
children 9657a64f2e12
comparison
equal deleted inserted replaced
4744:da595f0e882e 4745:398e3663ed71
781 781
782 static int use_dr=0,use_dr_422=0; 782 static int use_dr=0,use_dr_422=0;
783 static bes_da_t bda; 783 static bes_da_t bda;
784 void init_video_vaa( unsigned width ) 784 void init_video_vaa( unsigned width )
785 { 785 {
786 unsigned adp;
786 memset(&bda,0,sizeof(bes_da_t)); 787 memset(&bda,0,sizeof(bes_da_t));
787 if(vo_vaa.query_bes_da) 788 if(vo_vaa.query_bes_da)
788 use_dr = vo_vaa.query_bes_da(&bda) ? 0 : 1; 789 use_dr = vo_vaa.query_bes_da(&bda) ? 0 : 1;
789 if(!vaa_use_dr) use_dr = 0; 790 if(!vaa_use_dr) use_dr = 0;
790 use_dr_422 = use_dr && bda.dest.pitch.y == 16 && (width*2+15)&~15 == width*2; 791 if(use_dr)
792 {
793 uint32_t sstride,dstride;
794 sstride=width*2;
795 adp = bda.dest.pitch.y-1;
796 dstride=(width*2+adp)&~adp;
797 if(sstride == dstride) use_dr_422 = 1;
798 }
791 } 799 }
792 800
793 #ifdef USE_LIBVO2 801 #ifdef USE_LIBVO2
794 int decode_video(vo2_handle_t *video_out,sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){ 802 int decode_video(vo2_handle_t *video_out,sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){
795 #else 803 #else