diff options
author | wm4 <wm4@nowhere> | 2012-08-02 21:28:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-02 22:07:38 +0200 |
commit | e48b21dd87468245268c470b250c3cdd5a1bbfae (patch) | |
tree | 43d11465e021a9573bf581ecf2d00c2819f8cabf /libvo/vo_directfb2.c | |
parent | 6c05d49730b8fe3b0eff6639b067c4978706bf59 (diff) | |
download | mpv-e48b21dd87468245268c470b250c3cdd5a1bbfae.tar.bz2 mpv-e48b21dd87468245268c470b250c3cdd5a1bbfae.tar.xz |
VO: remove VO direct rendering
This was disabled by default, and could be enabled with -dr. It was
disabled by default because it was buggy: there were issues with OSD
corruption.
It wasn't entirely sane for OpenGL based VOs either. OpenGL can chose
to drop mapped pixel buffer objects, requiring the application to map
and fill the buffer again. But there was no mechanism in mplayer to
fill the lost buffer again. (It seems this rarely happened in practice,
though.)
On the other side, users liked the --dr flag, because it promised them
more speed. I'm not sure if it actually helped with speed, but it's
unlikely it had any real advantages on modern systems.
In order to evade the --dr cargo culting in mplayer config files, it's
best to get rid of it.
Diffstat (limited to 'libvo/vo_directfb2.c')
-rw-r--r-- | libvo/vo_directfb2.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c index b50adba614..b5db7a3ff7 100644 --- a/libvo/vo_directfb2.c +++ b/libvo/vo_directfb2.c @@ -1091,75 +1091,6 @@ if (layer) { return VO_FALSE; } -static uint32_t get_image(mp_image_t *mpi) -{ - - int err; - uint8_t *dst; - int pitch; - -// if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: get_image() called\n"); - if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; // slow video ram - if(mpi->type==MP_IMGTYPE_STATIC) return VO_FALSE; // it is not static - -// printf("width=%d vs. pitch=%d, flags=0x%X \n",mpi->width,pitch,mpi->flags); - - if(mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)){ - // we're lucky or codec accepts stride => ok, let's go! - - if (frame) { - err = frame->Lock(frame,DSLF_WRITE|DSLF_READ,(void *)&dst,&pitch); - framelocked=1; - } else { - err = primary->Lock(primary,DSLF_WRITE,(void *)&dst,&pitch); - primarylocked=1; - } - - if (err) { - mp_msg(MSGT_VO, MSGL_ERR,"DirectFB: DR lock failed!"); - return VO_FALSE; - }; - - if(mpi->flags&MP_IMGFLAG_PLANAR){ - //YV12 format - mpi->planes[0]=dst; - if(mpi->flags&MP_IMGFLAG_SWAPPED){ - mpi->planes[1]=dst + pitch*height; - mpi->planes[2]=mpi->planes[1] + pitch*height/4; - } else { - mpi->planes[2]=dst + pitch*height; - mpi->planes[1]=mpi->planes[2] + pitch*height/4; - } - mpi->width=width; - mpi->stride[0]=pitch; - mpi->stride[1]=mpi->stride[2]=pitch/2; - } else { - //YUY2 and RGB formats - mpi->planes[0]=dst; - mpi->width=width; - mpi->stride[0]=pitch; - } - - // center image - - if (!frame) { - if(mpi->flags&MP_IMGFLAG_PLANAR){ - mpi->planes[0]= dst + yoffset * pitch + xoffset; - mpi->planes[1]+= ((yoffset * pitch) >> 2) + (xoffset >> 1); - mpi->planes[2]+= ((yoffset * pitch) >> 2) + (xoffset >> 1); - } else { - mpi->planes[0]=dst + yoffset * pitch + xoffset * (mpi->bpp >> 3); - } - } - - mpi->flags|=MP_IMGFLAG_DIRECT; -// if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: get_image() SUCCESS -> Direct Rendering ENABLED\n"); - return VO_TRUE; - - } - return VO_FALSE; -} - static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y) { int i; @@ -1375,8 +1306,6 @@ static int control(uint32_t request, void *data) switch (request) { case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data)); - case VOCTRL_GET_IMAGE: - return get_image(data); case VOCTRL_DRAW_IMAGE: return put_image(data); case VOCTRL_SET_EQUALIZER: |