[Mplayer-cvslog] CVS: main dll_init.c,1.5,1.6
Felix Buenemann
atmosfear at users.sourceforge.net
Sat Apr 14 19:53:13 CEST 2001
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv9078
Modified Files:
dll_init.c
Log Message:
- applied overlay patch by Jens H
Index: dll_init.c
===================================================================
RCS file: /cvsroot/mplayer/main/dll_init.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dll_init.c 2001/04/07 21:27:57 1.5
--- dll_init.c 2001/04/14 17:53:11 1.6
***************
*** 139,160 ****
// sh_video->o_bih.biBitCount=16;
- if(outfmt==IMGFMT_YUY2)
- sh_video->o_bih.biBitCount=16;
- else
- sh_video->o_bih.biBitCount=outfmt&0xFF;// //24;
! if(sh_video->o_bih.biBitCount==15) ++sh_video->o_bih.biBitCount;
! sh_video->o_bih.biSizeImage=sh_video->o_bih.biWidth*sh_video->o_bih.biHeight*(sh_video->o_bih.biBitCount/8);
- if(!(sh_video->codec->outflags[sh_video->outfmtidx]&CODECS_FLAG_FLIP))
- sh_video->o_bih.biHeight=-sh_video->bih.biHeight; // flip image!
-
- if(outfmt==IMGFMT_YUY2 && !(sh_video->codec->outflags[sh_video->outfmtidx]&CODECS_FLAG_YUVHACK))
- sh_video->o_bih.biCompression = mmioFOURCC('Y','U','Y','2');
-
- // sh_video->o_bih.biCompression = mmioFOURCC('U','Y','V','Y');
-
-
if(verbose) {
printf("Starting decompression, format:\n");
--- 139,198 ----
// sh_video->o_bih.biBitCount=16;
! switch (outfmt) {
! /* planar format */
! case IMGFMT_YV12:
! case IMGFMT_I420:
! case IMGFMT_IYUV:
! sh_video->o_bih.biBitCount=12;
!
! /* packed format */
! case IMGFMT_YUY2:
! case IMGFMT_UYVY:
! case IMGFMT_YVYU:
! sh_video->o_bih.biBitCount=16;
! break;
!
! /* rgb/bgr format */
! case IMGFMT_RGB8:
! case IMGFMT_BGR8:
! sh_video->o_bih.biBitCount=8;
! break;
!
! case IMGFMT_RGB15:
! case IMGFMT_RGB16:
! case IMGFMT_BGR15:
! case IMGFMT_BGR16:
! sh_video->o_bih.biBitCount=16;
! break;
!
! case IMGFMT_RGB24:
! case IMGFMT_BGR24:
! sh_video->o_bih.biBitCount=24;
! break;
!
! case IMGFMT_RGB32:
! case IMGFMT_BGR32:
! sh_video->o_bih.biBitCount=32;
! break;
!
! default:
! printf("unsupported image format: 0x%x\n", outfmt);
! return 0;
! }
!
! sh_video->o_bih.biSizeImage = sh_video->o_bih.biWidth * sh_video->o_bih.biHeight * (sh_video->o_bih.biBitCount/8);
!
! if(!(sh_video->codec->outflags[sh_video->outfmtidx]&CODECS_FLAG_FLIP)) {
! sh_video->o_bih.biHeight=-sh_video->bih.biHeight; // flip image!
! }
!
! // this looks suspicious :-)
! if(!(outfmt == IMGFMT_YUY2 && (sh_video->codec->outflags[sh_video->outfmtidx] & CODECS_FLAG_YUVHACK))
! && (outfmt & IMGFMT_RGB_MASK) != IMGFMT_RGB && (outfmt & IMGFMT_BGR_MASK ) != IMGFMT_BGR) {
! sh_video->o_bih.biCompression = outfmt;
! }
if(verbose) {
printf("Starting decompression, format:\n");
***************
*** 164,168 ****
printf(" biPlanes %d\n", sh_video->bih.biPlanes);
printf(" biBitCount %d\n", sh_video->bih.biBitCount);
! printf(" biCompression %d='%.4s'\n", sh_video->bih.biCompression, &sh_video->bih.biCompression);
printf(" biSizeImage %d\n", sh_video->bih.biSizeImage);
printf("Dest fmt:\n");
--- 202,206 ----
printf(" biPlanes %d\n", sh_video->bih.biPlanes);
printf(" biBitCount %d\n", sh_video->bih.biBitCount);
! printf(" biCompression 0x%x ('%.4s')\n", sh_video->bih.biCompression, &sh_video->bih.biCompression);
printf(" biSizeImage %d\n", sh_video->bih.biSizeImage);
printf("Dest fmt:\n");
***************
*** 172,176 ****
printf(" biPlanes %d\n", sh_video->o_bih.biPlanes);
printf(" biBitCount %d\n", sh_video->o_bih.biBitCount);
! printf(" biCompression %d='%.4s'\n", sh_video->o_bih.biCompression, &sh_video->o_bih.biCompression);
printf(" biSizeImage %d\n", sh_video->o_bih.biSizeImage);
}
--- 210,214 ----
printf(" biPlanes %d\n", sh_video->o_bih.biPlanes);
printf(" biBitCount %d\n", sh_video->o_bih.biBitCount);
! printf(" biCompression 0x%x ('%.4s')\n", sh_video->o_bih.biCompression, &sh_video->o_bih.biCompression);
printf(" biSizeImage %d\n", sh_video->o_bih.biSizeImage);
}
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list