SDL_DisplayYUVOverlay gives GREEN color Background screen?

Dear all,
I am using sdl 1.2 to put the video in screen.
After SDL_SetVideoMode I am using SDL_CreateYUVOverlay followed by SDL_DisplayYUVOverlay.
Then I am getting a Green color screen.This happen without y u and v data.
Why green color screen comes?
Whether by default YUV loads Green screen?
When I starts loading the data to Y,U and V the background green color remains there.
My data have only Y values with out u and v.
So i loads default 0x80 to U an V.
My query is why green color background comes, where actual background is black.
please answer me!
with regards
ssmenon

What platform and video driver? What input YUV format?On 3/22/2014 12:38 AM, ssmenon111 wrote:

Dear all,
I am using sdl 1.2 to put the video in screen.
After SDL_SetVideoMode I am using SDL_CreateYUVOverlay followed by
SDL_DisplayYUVOverlay.
Then I am getting a Green color screen.This happen without y u and v data.
Why green color screen comes?
Whether by default YUV loads Green screen?
When I starts loading the data to Y,U and V the background green color
remains there.
My data have only Y values with out u and v.
So i loads default 0x80 to U an V.
My query is why green color background comes, where actual background
is black.
please answer me!
with regards
ssmenon


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I am working on windows platform(XP,7).
SDL_Overlay *mpBmp ;
SDL_Rect mRectgl ;
SDL_Surface *mpScreen ;
mpScreen = SDL_SetVideoMode(573, 360, 32, SDL_HWPALETTE); //or can be SDL_HWSURFACE | SDL_DOUBLEBUF
mpBmp = SDL_CreateYUVOverlay(573, 360, SDL_IYUV_OVERLAY, mpScreen);

*mpBmp->pixels[0] = 0x80;

*mpBmp->pixels[2] = 0x00 ;
*mpBmp->pixels[1] = 0x00 ;

SDL_DisplayYUVOverlay(mpBmp, &(mRectgl)); //This call its self gives a green background even with some hard codded //Y,U,V data,or even with out initilizing the pixels.

This is the initial set up.Later I will read raw data from a file and will give that to the player.
The file contains only Y data ,its a monochrome video.
So i will load only Y data with a constant U and V.
No idea about the video driver!!!
If possible,Please help me to change the green color background of video.

Some people, me included, like to greenscreen their work redundantly. Did
you use someone else’s skeleton project to get started? In any event maybe
we need to see the codeOn Mar 25, 2014 12:18 AM, “ssmenon111” <sreejith.s at parkcontrols.com> wrote:

I am working on windows platform(XP,7).
SDL_Overlay *mpBmp ;
SDL_Rect mRectgl ;
SDL_Surface *mpScreen ;
mpScreen = SDL_SetVideoMode(573, 360, 32, SDL_HWPALETTE); //or can be
SDL_HWSURFACE | SDL_DOUBLEBUF
mpBmp = SDL_CreateYUVOverlay(573, 360, SDL_IYUV_OVERLAY, mpScreen);

*mpBmp->pixels[0] = 0x80;

*mpBmp->pixels[2] = 0x00 ;
*mpBmp->pixels[1] = 0x00 ;

SDL_DisplayYUVOverlay(mpBmp, &(mRectgl)); //This call its self gives a
green background even with some hard codded //Y,U,V data,or even with out
initilizing the pixels.

This is the initial set up.Later I will read raw data from a file and will
give that to the player.
The file contains only Y data ,its a monochrome video.
So i will load only Y data with a constant U and V.
No idea about the video driver!!!
If possible,Please help me to change the green color background of video.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

You are using a planar YUV format - see http://www.fourcc.org/yuv.php#IYUV
So the first 573x360 bytes are your Y, the next 573x360/2 bytes are your
U and V. U/V should be should be set to 0x80 for black.On 3/24/2014 10:18 PM, ssmenon111 wrote:

I am working on windows platform(XP,7).
SDL_Overlay *mpBmp ;
SDL_Rect mRectgl ;
SDL_Surface *mpScreen ;
mpScreen = SDL_SetVideoMode(573, 360, 32, SDL_HWPALETTE); //or can be
SDL_HWSURFACE | SDL_DOUBLEBUF
mpBmp = SDL_CreateYUVOverlay(573, 360, SDL_IYUV_OVERLAY, mpScreen);

*mpBmp->pixels[0] = 0x80;

*mpBmp->pixels[2] = 0x00 ;
*mpBmp->pixels[1] = 0x00 ;

SDL_DisplayYUVOverlay(mpBmp, &(mRectgl)); //This call its self gives a
green background even with some hard codded //Y,U,V data,or even with
out initilizing the pixels.

This is the initial set up.Later I will read raw data from a file and
will give that to the player.
The file contains only Y data ,its a monochrome video.
So i will load only Y data with a constant U and V.
No idea about the video driver!!!
If possible,Please help me to change the green color background of video.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

[quote=“Andreas Schiffler”]You are using a planar YUV format - see http://www.fourcc.org/yuv.php#IYUV (http://www.fourcc.org/yuv.php#IYUV)
So the first 573x360 bytes are your Y, the next 573x360/2 bytes are your U and V. U/V should be should be set to 0x80 for black.On 3/24/2014 10:18 PM, ssmenon111 wrote:

Thanks sir,Its working…

thanks Sir,its working…

Andreas Schiffler wrote:> You are using a planar YUV format - see http://www.fourcc.org/yuv.php#IYUV (http://www.fourcc.org/yuv.php#IYUV)

So the first 573x360 bytes are your Y, the next 573x360/2 bytes are your U and V. U/V should be should be set to 0x80 for black.


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)