Update of /cvsroot/mplayer/main In directory usw-pr-cvs1:/tmp/cvs-serv23047 Modified Files: mplayer.c Log Message: I420/IYUV support Index: mplayer.c =================================================================== RCS file: /cvsroot/mplayer/main/mplayer.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** mplayer.c 2001/04/16 00:09:53 1.71 --- mplayer.c 2001/04/16 03:31:34 1.72 *************** *** 910,918 **** } ! if(out_fmt==IMGFMT_YUY2) ! DS_VideoDecoder_SetDestFmt(16,mmioFOURCC('Y', 'U', 'Y', '2')); ! // DS_VideoDecoder_SetDestFmt(16,mmioFOURCC('Y', 'V', '1', '2')); ! else ! DS_VideoDecoder_SetDestFmt(out_fmt&255,0); DS_VideoDecoder_Start(); --- 910,924 ---- } ! switch(out_fmt){ ! case IMGFMT_YUY2: ! case IMGFMT_UYVY: ! DS_VideoDecoder_SetDestFmt(16,out_fmt);break; // packed YUV ! case IMGFMT_YV12: ! case IMGFMT_I420: ! case IMGFMT_IYUV: ! DS_VideoDecoder_SetDestFmt(12,out_fmt);break; // planar YUV ! default: ! DS_VideoDecoder_SetDestFmt(out_fmt&255,0); // RGB/BGR ! } DS_VideoDecoder_Start(); *************** *** 1024,1027 **** --- 1030,1036 ---- printf("RGB%d\n",out_fmt&255); else if(out_fmt==IMGFMT_YUY2) printf("YUY2\n"); else + if(out_fmt==IMGFMT_UYVY) printf("UYVY\n"); else + if(out_fmt==IMGFMT_I420) printf("I420\n"); else + if(out_fmt==IMGFMT_IYUV) printf("IYUV\n"); else if(out_fmt==IMGFMT_YV12) printf("YV12\n"); } *************** *** 1337,1341 **** --- 1346,1362 ---- DS_VideoDecoder_DecodeFrame(start, in_size, 0, 1); + current_module="draw_frame"; + t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; + if(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420){ + uint8_t* dst[3]; + int stride[3]; + stride[0]=sh_video->disp_w; + stride[1]=stride[2]=sh_video->disp_w/2; + dst[0]=sh_video->our_out_buffer; + dst[2]=dst[0]+sh_video->disp_w*sh_video->disp_h; + dst[1]=dst[2]+sh_video->disp_w*sh_video->disp_h/4; + video_out->draw_slice(dst,stride,sh_video->disp_w,sh_video->disp_h,0,0); + } else video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer); t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; *************** *** 1360,1364 **** --- 1381,1397 ---- if(ret){ printf("Error decompressing frame, err=%d\n",ret);break; } } + current_module="draw_frame"; t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; + // if(out_fmt==IMGFMT_YV12){ + if(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420){ + uint8_t* dst[3]; + int stride[3]; + stride[0]=sh_video->disp_w; + stride[1]=stride[2]=sh_video->disp_w/2; + dst[0]=sh_video->our_out_buffer; + dst[2]=dst[0]+sh_video->disp_w*sh_video->disp_h; + dst[1]=dst[2]+sh_video->disp_w*sh_video->disp_h/4; + video_out->draw_slice(dst,stride,sh_video->disp_w,sh_video->disp_h,0,0); + } else video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer); t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; _______________________________________________ Mplayer-cvslog mailing list Mplayer-cvslog@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
participants (1)
-
GEREOFFY