summaryrefslogtreecommitdiffstats
path: root/video/decode/vd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-05 19:27:38 +0100
committerwm4 <wm4@nowhere>2013-01-13 17:39:31 +0100
commit06ccd9f6716ffb5220941bea12f345154545862e (patch)
tree26c2ebdd4e202d0888e76737d79fa9888f4f096d /video/decode/vd.h
parent42e0afe641de6eb15d89164e82671b6207402190 (diff)
downloadmpv-06ccd9f6716ffb5220941bea12f345154545862e.tar.bz2
mpv-06ccd9f6716ffb5220941bea12f345154545862e.tar.xz
video: simplify decoder pixel format handling
Simplify the decoder pixel format handling by making it handle only the case vd_lavc needs: a video stream always decodes to a single pixel format. Remove the handling for multiple pixel formats, and remove the codecs.conf pixel format declarations that are left. Remove the handling of "ambiguous" pixel formats like YV12 vs. I420 (via VDCTRL_QUERY_FORMAT etc.). This is only a problem if the video chain supports I420, but not YV12, which doesn't seem to be the case anywhere, and in fact would not have any advantage. Make the "flip" flag a global per-codec flag, rather than a pixel format specific flag. (Some ffmpeg decoders still return a flipped image, so this has to be done manually.) Also fix handling of the flip operation: do not overwrite the global flip option, and make the --flip option invert the codec flip option rather than overriding it.
Diffstat (limited to 'video/decode/vd.h')
-rw-r--r--video/decode/vd.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/video/decode/vd.h b/video/decode/vd.h
index 838e5ad123..7b53c62840 100644
--- a/video/decode/vd.h
+++ b/video/decode/vd.h
@@ -42,15 +42,12 @@ typedef struct vd_functions
// NULL terminated array of all drivers
extern const vd_functions_t *const mpcodecs_vd_drivers[];
-#define VDCTRL_QUERY_FORMAT 3 // test for availabilty of a format
#define VDCTRL_RESYNC_STREAM 8 // reset decode state after seeking
#define VDCTRL_QUERY_UNSEEN_FRAMES 9 // current decoder lag
#define VDCTRL_RESET_ASPECT 10 // reinit filter/VO chain for new aspect ratio
// callbacks:
-int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
- const unsigned int *outfmts,
- unsigned int preferred_outfmt);
+int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int outfmt);
mp_image_t *mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag,
int w, int h);