[Mplayer-cvslog] CVS: main/libvo vo_png.c,1.9,1.10
Alex Beregszaszi
alex at mplayer.dev.hu
Sat Jan 26 17:30:45 CET 2002
- Previous message: [Mplayer-cvslog] CVS: main/libvo video_out.h,1.13,1.14 video_out_internal.h,1.6,1.7 vo_3dfx.c,1.8,1.9 vo_aa.c,1.17,1.18 vo_dga.c,1.36,1.37 vo_directfb.c,1.5,1.6 vo_dxr3.c,1.38,1.39 vo_fbdev.c,1.54,1.55 vo_fsdga.c,1.5,1.6 vo_ggi.c,1.11,1.12 vo_gl.c,1.16,1.17 vo_gl2.c,1.10,1.11 vo_md5.c,1.6,1.7 vo_mga.c,1.19,1.20 vo_mpegpes.c,1.16,1.17 vo_null.c,1.3,1.4 vo_odivx.c,1.7,1.8 vo_pgm.c,1.7,1.8 vo_png.c,1.8,1.9 vo_sdl.c,1.60,1.61 vo_svga.c,1.39,1.40 vo_syncfb.c,1.7,1.8 vo_tdfxfb.c,1.3,1.4 vo_vesa.c,1.56,1.57 vo_x11.c,1.49,1.50 vo_xmga.c,1.40,1.41 vo_xv.c,1.46,1.47 vo_xvidix.c,1.11,1.12 vo_zr.c,1.4,1.5 vosub_vidix.h,1.6,1.7
- Next message: [Mplayer-cvslog] CVS: main/libvo vo_directfb.c,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv10864
Modified Files:
vo_png.c
Log Message:
i420/iyuv support
Index: vo_png.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_png.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_png.c 26 Jan 2002 16:01:26 -0000 1.9
+++ vo_png.c 26 Jan 2002 16:30:43 -0000 1.10
@@ -65,7 +65,8 @@
static uint32_t
init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
{
- if (fullscreen&0x04 && (width != d_width || height != d_height) && format==IMGFMT_YV12) {
+ if (fullscreen&0x04 && (width != d_width || height != d_height) &&
+ ((format==IMGFMT_YV12) /*|| (format == IMGFMT_I420) || (format == IMGFMT_IYUV)*/)) {
/* software scaling */
image_width = (d_width + 7) & ~7;
image_height = d_height;
@@ -89,6 +90,8 @@
bpp = 24;
cspace = RGB;
break;
+ case IMGFMT_IYUV:
+ case IMGFMT_I420:
case IMGFMT_YV12:
bpp = 24;
cspace = RGB;
@@ -248,7 +251,7 @@
struct pngdata png;
png_byte *row_pointers[image_height];
- if(image_format == IMGFMT_YV12) {
+ if((image_format == IMGFMT_YV12) || (image_format == IMGFMT_IYUV) || (image_format == IMGFMT_I420)) {
snprintf (buf, 100, "%08d.png", ++framenum);
@@ -273,6 +276,17 @@
static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y )
{
+ /* hack: swap planes for I420 ;) -- alex */
+ if ((image_format == IMGFMT_IYUV) || (image_format == IMGFMT_I420))
+ {
+ uint8_t *src_i420[3];
+
+ src_i420[0] = src[0];
+ src_i420[1] = src[2];
+ src_i420[2] = src[1];
+ src = src_i420;
+ }
+
if (scale_srcW) {
uint8_t *dst[3] = {image_data, NULL, NULL};
SwScale_YV12slice(src,stride,y,h,
@@ -280,8 +294,7 @@
scale_srcW, scale_srcH, image_width, image_height);
}
else {
- uint8_t *dst;
- dst = image_data + (image_width * y + x) * (bpp/8);
+ uint8_t *dst = image_data + (image_width * y + x) * (bpp/8);
yuv2rgb(dst,src[0],src[1],src[2],w,h,image_width*(bpp/8),stride[0],stride[1]);
}
return 0;
@@ -291,6 +304,8 @@
query_format(uint32_t format)
{
switch(format){
+ case IMGFMT_IYUV:
+ case IMGFMT_I420:
case IMGFMT_YV12:
case IMGFMT_RGB|24:
case IMGFMT_BGR|24:
- Previous message: [Mplayer-cvslog] CVS: main/libvo video_out.h,1.13,1.14 video_out_internal.h,1.6,1.7 vo_3dfx.c,1.8,1.9 vo_aa.c,1.17,1.18 vo_dga.c,1.36,1.37 vo_directfb.c,1.5,1.6 vo_dxr3.c,1.38,1.39 vo_fbdev.c,1.54,1.55 vo_fsdga.c,1.5,1.6 vo_ggi.c,1.11,1.12 vo_gl.c,1.16,1.17 vo_gl2.c,1.10,1.11 vo_md5.c,1.6,1.7 vo_mga.c,1.19,1.20 vo_mpegpes.c,1.16,1.17 vo_null.c,1.3,1.4 vo_odivx.c,1.7,1.8 vo_pgm.c,1.7,1.8 vo_png.c,1.8,1.9 vo_sdl.c,1.60,1.61 vo_svga.c,1.39,1.40 vo_syncfb.c,1.7,1.8 vo_tdfxfb.c,1.3,1.4 vo_vesa.c,1.56,1.57 vo_x11.c,1.49,1.50 vo_xmga.c,1.40,1.41 vo_xv.c,1.46,1.47 vo_xvidix.c,1.11,1.12 vo_zr.c,1.4,1.5 vosub_vidix.h,1.6,1.7
- Next message: [Mplayer-cvslog] CVS: main/libvo vo_directfb.c,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list