[MPlayer-dev-eng] rawvideo LOOP playing problem

Joey Parrish joey at nicewarrior.org
Thu Jul 8 00:31:14 CEST 2004


On Wed, Jul 07, 2004 at 06:25:31PM +0200, Gianluca FILIPPINI wrote:
> PS: I think also tha we have to change in demux_rawvideo.c the
> demux_rawvideo_open function to avoid imgsize zero whith Y420 images..
> in particular:
> 
> [original]
>   if(!imgsize)
>   switch(format){
>   case IMGFMT_I420: 
>   case IMGFMT_IYUV:
>   case IMGFMT_YV12: imgsize=width*height+2*(width>>1)*(height>>1);break;
>   case IMGFMT_YUY2: imgsize=width*height*2;break;
>   case IMGFMT_UYVY: imgsize=width*height*2;break;
>   case IMGFMT_Y8: imgsize=width*height;break;
>   default:
>       mp_msg(MSGT_DEMUX,MSGL_ERR,"rawvideo: img size not specified and
> unknown format!\n");
>       return 0;
>   }
> 
> [MODIFIED]
>   if(!imgsize)
>   switch(format){
>   case IMGFMT_I420: imgsize=width*height+2*(width>>1)*(height>>1);break;
>   case IMGFMT_IYUV:
>   case IMGFMT_YV12: imgsize=width*height+2*(width>>1)*(height>>1);break;
>   case IMGFMT_YUY2: imgsize=width*height*2;break;
>   case IMGFMT_UYVY: imgsize=width*height*2;break;
>   case IMGFMT_Y8: imgsize=width*height;break;
>   default:
>       mp_msg(MSGT_DEMUX,MSGL_ERR,"rawvideo: img size not specified and
> unknown format!\n");
>       return 0;
>   }

This modification wouldn't do anything.
-   case IMGFMT_I420: 
+   case IMGFMT_I420: imgsize=width*height+2*(width>>1)*(height>>1);break;
    case IMGFMT_IYUV:
    case IMGFMT_YV12: imgsize=width*height+2*(width>>1)*(height>>1);break;

This makes no difference.  For I420, the original would fall through to
the YV12 line.  So there's no need to duplicate the calculation.

--Joey

-- 
"Ours is not to question why, 'cause if we did,
  our heads would explode." --Megan




More information about the MPlayer-dev-eng mailing list