summaryrefslogtreecommitdiffstats
path: root/video/out/vo_vdpau.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-04 18:16:36 +0100
committerwm4 <wm4@nowhere>2013-01-13 17:39:31 +0100
commit23ab098969f5182585578ee01c3a47d42dea031f (patch)
tree3f9003095a8f8bb92ab61e8df9c51e109f4d4ffb /video/out/vo_vdpau.c
parentcfa1f9e082f3da83adb5161be140e477b38bc5c7 (diff)
downloadmpv-23ab098969f5182585578ee01c3a47d42dea031f.tar.bz2
mpv-23ab098969f5182585578ee01c3a47d42dea031f.tar.xz
video: remove slice based filtering and video output
Slices allowed filtering or drawing video in horizontal bands or blocks. This allowed working on the video in smaller units. In theory, this could bring a performance win by lowering cache pressure, as you didn't have to keep the whole video frame in cache while filtering, only the slice. In practice, the slice code path was barely used for the following reasons: - Multithreaded decoding with ffmpeg didn't use slices. The ffmpeg slice callback was disabled, because it can be called from another thread, and the mplayer video chain is not thread-safe. - There was nothing that would turn "full" images into appropriate slices, so slices were rarely used. - Most filters didn't actually support slices. On the other hand, supporting slices lead to code duplication and more complex code in general. I made some experiments and didn't find any actual measurable performance improvements when using slices. Even ffmpeg removed slices based filtering from libavfilter in favor of simpler code. The most broken thing about the slices code path is that slices can't be queued, like it is done for images in vo.c.
Diffstat (limited to 'video/out/vo_vdpau.c')
-rw-r--r--video/out/vo_vdpau.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 3d0305b799..13a352f790 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -1309,7 +1309,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi, double pts)
if (IMGFMT_IS_VDPAU(vc->image_format)) {
rndr = mpi->priv;
reserved_mpi = mpi;
- } else if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) {
+ } else {
rndr = get_surface(vo, vc->deint_counter);
vc->deint_counter = WRAP_ADD(vc->deint_counter, 1, NUM_BUFFERED_VIDEO);
if (handle_preemption(vo) >= 0) {
@@ -1323,11 +1323,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi, double pts)
CHECK_ST_WARNING("Error when calling "
"vdp_video_surface_put_bits_y_cb_cr");
}
- } else
- // We don't support slice callbacks so this shouldn't occur -
- // I think the flags test above in pointless, but I'm adding
- // this instead of removing it just in case.
- abort();
+ }
if (mpi->fields & MP_IMGFIELD_ORDERED)
vc->top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST);
else
@@ -1437,7 +1433,6 @@ static int query_format(struct vo *vo, uint32_t format)
case IMGFMT_NV12:
case IMGFMT_YUY2:
case IMGFMT_UYVY:
- return default_flags | VOCAP_NOSLICES;
case IMGFMT_VDPAU_MPEG1:
case IMGFMT_VDPAU_MPEG2:
case IMGFMT_VDPAU_H264: