Пример #1
0
        public override void SetInputFormat(string channel, SurfaceState state)
        {
            bool need = false;

            if (state.SurfaceFormat.Size != OutputSize)
            {
                need = true;
            }
            if (FilterOption != eFilterOption.None)
            {
                need = true;
            }

            if (!need)
            {
                nop         = true;
                ContentSize = state.SurfaceFormat.Size;
                return;
            }

            FindInput().SurfaceDisposition = SurfaceDisposition.Texture;
            DeclareOutput(new SurfaceState(new SurfaceFormat(OutputSize), SurfaceDisposition.RenderTarget));
            InputSize   = state.SurfaceFormat.Size;
            LL          = new LetterboxingLogic(Global.Config.DispFixAspectRatio, Global.Config.DispFixScaleInteger, OutputSize.Width, OutputSize.Height, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
            ContentSize = new Size(LL.vw, LL.vh);
        }
Пример #2
0
        public override Size PresizeInput(string channel, Size size)
        {
            if (FilterOption != eFilterOption.Bicubic)
            {
                return(size);
            }

            if (Config_PadOnly)
            {
                //TODO - redundant fix
                LL     = new LetterboxingLogic();
                LL.vx += Padding.Left;
                LL.vy += Padding.Top;
                LL.vw  = size.Width;
                LL.vh  = size.Height;
            }
            else
            {
                LL     = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, OutputSize.Width, OutputSize.Height, size.Width, size.Height, TextureSize, VirtualTextureSize);
                LL.vx += Padding.Left;
                LL.vy += Padding.Top;
            }

            return(size);
        }
Пример #3
0
        public override void SetInputFormat(string channel, SurfaceState state)
        {
            bool need = false;

            if (state.SurfaceFormat.Size != OutputSize)
            {
                need = true;
            }
            if (FilterOption != eFilterOption.None)
            {
                need = true;
            }
            if (Flip)
            {
                need = true;
            }

            if (!need)
            {
                nop         = true;
                ContentSize = state.SurfaceFormat.Size;
                return;
            }

            FindInput().SurfaceDisposition = SurfaceDisposition.Texture;
            DeclareOutput(new SurfaceState(new SurfaceFormat(OutputSize), SurfaceDisposition.RenderTarget));
            InputSize = state.SurfaceFormat.Size;
            if (Config_PadOnly)
            {
                //TODO - redundant fix
                LL             = new LetterboxingLogic();
                LL.vx         += Padding.Left;
                LL.vy         += Padding.Top;
                LL.vw          = InputSize.Width;
                LL.vh          = InputSize.Height;
                LL.WidthScale  = 1;
                LL.HeightScale = 1;
            }
            else
            {
                int ow = OutputSize.Width;
                int oh = OutputSize.Height;
                ow    -= Padding.Horizontal;
                oh    -= Padding.Vertical;
                LL     = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, ow, oh, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
                LL.vx += Padding.Left;
                LL.vy += Padding.Top;
            }
            ContentSize = new Size(LL.vw, LL.vh);

            if (InputSize == OutputSize)             //any reason we need to check vx and vy?
            {
                IsNop = true;
            }
        }
Пример #4
0
        public override Size PresizeInput(string channel, Size size)
        {
            if (FilterOption != eFilterOption.Bicubic)
            {
                return(size);
            }

            LL = new LetterboxingLogic(Global.Config.DispFixAspectRatio, Global.Config.DispFixScaleInteger, OutputSize.Width, OutputSize.Height, size.Width, size.Height, TextureSize, VirtualTextureSize);

            return(size);
        }
Пример #5
0
        public override Size PresizeInput(string channel, Size size)
        {
            if (FilterOption != eFilterOption.Bicubic)
                return size;

            if (Config_PadOnly)
            {
                //TODO - redundant fix
                LL = new LetterboxingLogic();
                LL.vx += Padding.Left;
                LL.vy += Padding.Right;
                LL.vw = size.Width;
                LL.vh = size.Height;
            }
            else
                LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, OutputSize.Width, OutputSize.Height, size.Width, size.Height, TextureSize, VirtualTextureSize);

            return size;
        }
Пример #6
0
        public override void SetInputFormat(string channel, SurfaceState state)
        {
            bool need = false;

            if (state.SurfaceFormat.Size != OutputSize)
            {
                need = true;
            }
            if (FilterOption != eFilterOption.None)
            {
                need = true;
            }

            if (!need)
            {
                nop         = true;
                ContentSize = state.SurfaceFormat.Size;
                return;
            }

            FindInput().SurfaceDisposition = SurfaceDisposition.Texture;
            DeclareOutput(new SurfaceState(new SurfaceFormat(OutputSize), SurfaceDisposition.RenderTarget));
            InputSize = state.SurfaceFormat.Size;
            if (Config_PadOnly)
            {
                //TODO - redundant fix
                LL     = new LetterboxingLogic();
                LL.vx += Padding.Left;
                LL.vy += Padding.Top;
                LL.vw  = InputSize.Width;
                LL.vh  = InputSize.Height;
            }
            else
            {
                LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, OutputSize.Width, OutputSize.Height, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
            }
            ContentSize = new Size(LL.vw, LL.vh);
        }
Пример #7
0
		public override void SetInputFormat(string channel, SurfaceState state)
		{
			bool need = false;
			if (state.SurfaceFormat.Size != OutputSize)
				need = true;
			if (FilterOption != eFilterOption.None)
				need = true;
			if (Flip)
				need = true;

			if (!need)
			{
				nop = true;
				ContentSize = state.SurfaceFormat.Size;
				return;
			}

			FindInput().SurfaceDisposition = SurfaceDisposition.Texture;
			DeclareOutput(new SurfaceState(new SurfaceFormat(OutputSize), SurfaceDisposition.RenderTarget));
			InputSize = state.SurfaceFormat.Size;
			if (Config_PadOnly)
			{
				//TODO - redundant fix
				LL = new LetterboxingLogic();
				LL.vx += Padding.Left;
				LL.vy += Padding.Top;
				LL.vw = InputSize.Width;
				LL.vh = InputSize.Height;
				LL.WidthScale = 1;
				LL.HeightScale = 1;
			}
			else
			{
				int ow = OutputSize.Width;
				int oh = OutputSize.Height;
				ow -= Padding.Horizontal;
				oh -= Padding.Vertical;
				LL = new LetterboxingLogic(Config_FixAspectRatio, Config_FixScaleInteger, ow, oh, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
				LL.vx += Padding.Left;
				LL.vy += Padding.Top;
			}
			ContentSize = new Size(LL.vw,LL.vh);
		}
Пример #8
0
		public override void SetInputFormat(string channel, SurfaceState state)
		{
			bool need = false;
			if (state.SurfaceFormat.Size != OutputSize)
				need = true;
			if (FilterOption != eFilterOption.None)
				need = true;

			if (!need)
			{
				nop = true;
				ContentSize = state.SurfaceFormat.Size;
				return;
			}

			FindInput().SurfaceDisposition = SurfaceDisposition.Texture;
			DeclareOutput(new SurfaceState(new SurfaceFormat(OutputSize), SurfaceDisposition.RenderTarget));
			InputSize = state.SurfaceFormat.Size;
			LL = new LetterboxingLogic(Global.Config.DispFixAspectRatio, Global.Config.DispFixScaleInteger, OutputSize.Width, OutputSize.Height, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
			ContentSize = new Size(LL.vw,LL.vh);
		}
Пример #9
0
		public override Size PresizeInput(string channel, Size size)
		{
			if (FilterOption != eFilterOption.Bicubic)
				return size;

			LL = new LetterboxingLogic(Global.Config.DispFixAspectRatio, Global.Config.DispFixScaleInteger, OutputSize.Width, OutputSize.Height, size.Width, size.Height, TextureSize, VirtualTextureSize);

			return size;
		}