src/video/photon/SDL_phyuv.c
changeset 380 bce7171e7a85
parent 370 ba72f259bc88
child 571 8e3ce997621c
equal deleted inserted replaced
379:11c8a7684f74 380:bce7171e7a85
   208     overlay->hwdata->screen_bpp = 2;
   208     overlay->hwdata->screen_bpp = 2;
   209     overlay->hwdata->scaler_on = FALSE;
   209     overlay->hwdata->scaler_on = FALSE;
   210     overlay->hwdata->screen_width = 1024;
   210     overlay->hwdata->screen_width = 1024;
   211     overlay->hwdata->screen_height  = 768;
   211     overlay->hwdata->screen_height  = 768;
   212 
   212 
   213     overlay->hwdata->FrameData0 = (FRAMEDATA *) malloc((size_t)(sizeof( FRAMEDATA)));
   213     overlay->hwdata->FrameData0 = (FRAMEDATA *) malloc((size_t)(sizeof(FRAMEDATA)));
   214     overlay->hwdata->FrameData1 = (FRAMEDATA *) malloc((size_t)(sizeof( FRAMEDATA)));
   214     overlay->hwdata->FrameData1 = (FRAMEDATA *) malloc((size_t)(sizeof(FRAMEDATA)));
       
   215     memset(overlay->hwdata->FrameData0, 0x00, (size_t)(sizeof(FRAMEDATA)));
       
   216     memset(overlay->hwdata->FrameData1, 0x00, (size_t)(sizeof(FRAMEDATA)));
   215 
   217 
   216     overlay->hwdata->caps.size = sizeof(overlay->hwdata->caps);
   218     overlay->hwdata->caps.size = sizeof(overlay->hwdata->caps);
   217 
   219 
   218 //Note you really don't need to do this for SDL as you are given a format, but this is a good example
   220 //Note you really don't need to do this for SDL as you are given a format, but this is a good example
   219 
   221 
   491 	}
   493 	}
   492 
   494 
   493 	//Lock gets the pointer and passes it to the app. The app writes all yuv data into overlay->pixels
   495 	//Lock gets the pointer and passes it to the app. The app writes all yuv data into overlay->pixels
   494 //Note this is defined as Uint8 **pixels;				/* Read-write */	
   496 //Note this is defined as Uint8 **pixels;				/* Read-write */	
   495 	overlay->pixels = &overlay->hwdata->CurrentFrameData->Y; 
   497 	overlay->pixels = &overlay->hwdata->CurrentFrameData->Y; 
   496 	overlay->pitches  = &overlay->hwdata->YStride;
   498 	overlay->pitches = (Uint16*) &(overlay->hwdata->YStride);
   497 		
   499 		
   498 	return(0);
   500 	return(0);
   499 }
   501 }
   500 
   502 
   501 void ph_UnlockYUVOverlay(_THIS, SDL_Overlay *overlay)
   503 void ph_UnlockYUVOverlay(_THIS, SDL_Overlay *overlay)