diff options
author | wm4 <wm4@nowhere> | 2012-11-04 18:16:36 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 17:39:31 +0100 |
commit | 23ab098969f5182585578ee01c3a47d42dea031f (patch) | |
tree | 3f9003095a8f8bb92ab61e8df9c51e109f4d4ffb /video/filter/vf.h | |
parent | cfa1f9e082f3da83adb5161be140e477b38bc5c7 (diff) | |
download | mpv-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/filter/vf.h')
-rw-r--r-- | video/filter/vf.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/video/filter/vf.h b/video/filter/vf.h index f470bdc3b9..29727259ba 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -66,9 +66,6 @@ typedef struct vf_instance { int (*query_format)(struct vf_instance *vf, unsigned int fmt); void (*get_image)(struct vf_instance *vf, mp_image_t *mpi); int (*put_image)(struct vf_instance *vf, mp_image_t *mpi, double pts); - void (*start_slice)(struct vf_instance *vf, mp_image_t *mpi); - void (*draw_slice)(struct vf_instance *vf, unsigned char **src, - int *stride, int w, int h, int x, int y); void (*uninit)(struct vf_instance *vf); int (*continue_buffered_image)(struct vf_instance *vf); @@ -141,8 +138,6 @@ int vf_next_config(struct vf_instance *vf, int vf_next_control(struct vf_instance *vf, int request, void *data); int vf_next_query_format(struct vf_instance *vf, unsigned int fmt); int vf_next_put_image(struct vf_instance *vf, mp_image_t *mpi, double pts); -void vf_next_draw_slice(struct vf_instance *vf, unsigned char **src, - int *stride, int w, int h, int x, int y); struct m_obj_settings; vf_instance_t *append_filters(vf_instance_t *last, |