Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 362883
Collapse All | Expand All

(-)./src/videoout.c.old (-24 / +24 lines)
Lines 474-481 Link Here
474
	float sv_posx,sv_posy;
474
	float sv_posx,sv_posy;
475
	int background_color[3];
475
	int background_color[3];
476
476
477
	struct ms_SwsContext *sws1;
477
	MSScalerContext *sws1;
478
	struct ms_SwsContext *sws2;
478
	MSScalerContext *sws2;
479
	MSDisplay *display;
479
	MSDisplay *display;
480
	bool_t own_display;
480
	bool_t own_display;
481
	bool_t ready;
481
	bool_t ready;
Lines 552-562 Link Here
552
	if (obj->display!=NULL && obj->own_display)
552
	if (obj->display!=NULL && obj->own_display)
553
		ms_display_destroy(obj->display);
553
		ms_display_destroy(obj->display);
554
	if (obj->sws1!=NULL){
554
	if (obj->sws1!=NULL){
555
		ms_sws_freeContext(obj->sws1);
555
		ms_scaler_context_free(obj->sws1);
556
		obj->sws1=NULL;
556
		obj->sws1=NULL;
557
	}
557
	}
558
	if (obj->sws2!=NULL){
558
	if (obj->sws2!=NULL){
559
		ms_sws_freeContext(obj->sws2);
559
		ms_scaler_context_free(obj->sws2);
560
		obj->sws2=NULL;
560
		obj->sws2=NULL;
561
	}
561
	}
562
	if (obj->local_msg!=NULL) {
562
	if (obj->local_msg!=NULL) {
Lines 581-591 Link Here
581
		obj->display=NULL;
581
		obj->display=NULL;
582
	}
582
	}
583
	if (obj->sws1!=NULL){
583
	if (obj->sws1!=NULL){
584
		ms_sws_freeContext(obj->sws1);
584
		ms_scaler_context_free(obj->sws1);
585
		obj->sws1=NULL;
585
		obj->sws1=NULL;
586
	}
586
	}
587
	if (obj->sws2!=NULL){
587
	if (obj->sws2!=NULL){
588
		ms_sws_freeContext(obj->sws2);
588
		ms_scaler_context_free(obj->sws2);
589
		obj->sws2=NULL;
589
		obj->sws2=NULL;
590
	}
590
	}
591
	if (obj->local_msg!=NULL) {
591
	if (obj->local_msg!=NULL) {
Lines 665-678 Link Here
665
			if (ms_yuv_buf_init_from_mblk(&src,inm)==0){
665
			if (ms_yuv_buf_init_from_mblk(&src,inm)==0){
666
				
666
				
667
				if (obj->sws2==NULL){
667
				if (obj->sws2==NULL){
668
					obj->sws2=ms_sws_getContext(src.w,src.h,PIX_FMT_YUV420P,
668
					obj->sws2=ms_scaler_create_context(src.w,src.h,MS_YUV420P,
669
											 obj->fbuf_selfview.w,obj->fbuf_selfview.h,PIX_FMT_YUV420P,
669
									obj->fbuf_selfview.w,obj->fbuf_selfview.h,MS_YUV420P,
670
											 SWS_FAST_BILINEAR, NULL, NULL, NULL);
670
									MS_SCALER_METHOD_BILINEAR);
671
				}
671
				}
672
				ms_display_lock(obj->display);
672
				ms_display_lock(obj->display);
673
				if (ms_sws_scale(obj->sws2,src.planes,src.strides, 0,
673
				if (ms_scaler_process(obj->sws2,src.planes,src.strides,
674
							  src.h, obj->fbuf_selfview.planes, obj->fbuf_selfview.strides)<0){
674
							  obj->fbuf_selfview.planes, obj->fbuf_selfview.strides)<0){
675
					ms_error("Error in ms_sws_scale().");
675
					ms_error("Error in ms_scaler_process().");
676
				}
676
				}
677
				if (!mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->fbuf_selfview);
677
				if (!mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->fbuf_selfview);
678
				ms_display_unlock(obj->display);
678
				ms_display_unlock(obj->display);
Lines 683-691 Link Here
683
			if (ms_yuv_buf_init_from_mblk(&src,inm)==0){
683
			if (ms_yuv_buf_init_from_mblk(&src,inm)==0){
684
				
684
				
685
				if (obj->sws2==NULL){
685
				if (obj->sws2==NULL){
686
					obj->sws2=ms_sws_getContext(src.w,src.h,PIX_FMT_YUV420P,
686
					obj->sws2=ms_scaler_create_context(src.w,src.h,MS_YUV420P,
687
								obj->local_pic.w,obj->local_pic.h,PIX_FMT_YUV420P,
687
									obj->local_pic.w,obj->local_pic.h,MS_YUV420P,
688
								SWS_FAST_BILINEAR, NULL, NULL, NULL);
688
									MS_SCALER_METHOD_BILINEAR);
689
				}
689
				}
690
				if (obj->local_msg==NULL){
690
				if (obj->local_msg==NULL){
691
					obj->local_msg=ms_yuv_buf_alloc(&obj->local_pic,
691
					obj->local_msg=ms_yuv_buf_alloc(&obj->local_pic,
Lines 693-701 Link Here
693
				}
693
				}
694
				if (obj->local_pic.planes[0]!=NULL)
694
				if (obj->local_pic.planes[0]!=NULL)
695
				{
695
				{
696
					if (ms_sws_scale(obj->sws2,src.planes,src.strides, 0,
696
					if (ms_scaler_process(obj->sws2,src.planes,src.strides,
697
						src.h, obj->local_pic.planes, obj->local_pic.strides)<0){
697
						obj->local_pic.planes, obj->local_pic.strides)<0){
698
						ms_error("Error in ms_sws_scale().");
698
						ms_error("Error in ms_scaler_process().");
699
					}
699
					}
700
					if (!mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->local_pic);
700
					if (!mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->local_pic);
701
					update=1;
701
					update=1;
Lines 731-744 Link Here
731
				}
731
				}
732
			}
732
			}
733
			if (obj->sws1==NULL){
733
			if (obj->sws1==NULL){
734
				obj->sws1=ms_sws_getContext(src.w,src.h,PIX_FMT_YUV420P,
734
				obj->sws1=ms_scaler_create_context(src.w,src.h,MS_YUV420P,
735
				obj->fbuf.w,obj->fbuf.h,PIX_FMT_YUV420P,
735
				obj->fbuf.w,obj->fbuf.h,MS_YUV420P,
736
				SWS_FAST_BILINEAR, NULL, NULL, NULL);
736
				MS_SCALER_METHOD_BILINEAR);
737
			}
737
			}
738
			ms_display_lock(obj->display);
738
			ms_display_lock(obj->display);
739
			if (ms_sws_scale(obj->sws1,src.planes,src.strides, 0,
739
			if (ms_scaler_process(obj->sws1,src.planes,src.strides,
740
            			src.h, obj->fbuf.planes, obj->fbuf.strides)<0){
740
				obj->fbuf.planes, obj->fbuf.strides)<0){
741
				ms_error("Error in ms_sws_scale().");
741
				ms_error("Error in ms_scaler_process().");
742
			}
742
			}
743
			if (obj->mirror && !mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->fbuf);
743
			if (obj->mirror && !mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->fbuf);
744
			ms_display_unlock(obj->display);
744
			ms_display_unlock(obj->display);
(-)./src/x11video.c.old (-1 / +1 lines)
Lines 444-450 Link Here
444
				MS_SCALER_METHOD_BILINEAR);
444
				MS_SCALER_METHOD_BILINEAR);
445
		}
445
		}
446
		if (ms_scaler_process(obj->sws1,src.planes,src.strides, mainpic.planes, mainpic.strides)<0){
446
		if (ms_scaler_process(obj->sws1,src.planes,src.strides, mainpic.planes, mainpic.strides)<0){
447
			ms_error("Error in ms_sws_scale().");
447
			ms_error("Error in ms_scaler_process().");
448
		}
448
		}
449
		if (obj->mirror && !precious) ms_yuv_buf_mirror(&mainpic);
449
		if (obj->mirror && !precious) ms_yuv_buf_mirror(&mainpic);
450
	}
450
	}

Return to bug 362883