summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-22 22:38:37 +0200
committerwm4 <wm4@nowhere>2012-10-22 22:38:37 +0200
commit022517bdf5a1fc484096217bac8c7d7fbc78fa7b (patch)
tree816f58444bf5bb2345cee25062b3664d3bec3a30
parentde3f6718124372f64443a0b86527c1abf86d6f8c (diff)
downloadmpv-022517bdf5a1fc484096217bac8c7d7fbc78fa7b.tar.bz2
mpv-022517bdf5a1fc484096217bac8c7d7fbc78fa7b.tar.xz
vd: remove references to vf_palette and vf_lavc
Both of these video filters have been deleted. There wasn't any use-case left where these were needed. Videos with paletted pixel formats still work.
-rw-r--r--libmpcodecs/vd.c51
1 files changed, 3 insertions, 48 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 48e2b0627e..511665aeac 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -60,8 +60,7 @@ int mpcodecs_config_vo2(sh_video_t *sh, int w, int h,
unsigned int out_fmt = 0;
int screen_size_x = 0;
int screen_size_y = 0;
- vf_instance_t *vf = sh->vfilter, *sc = NULL;
- int palette = 0;
+ vf_instance_t *vf = sh->vfilter;
int vocfg_flags = 0;
if (w)
@@ -125,58 +124,14 @@ int mpcodecs_config_vo2(sh_video_t *sh, int w, int h,
sh->output_flags = flags;
if (flags & VFCAP_CSP_SUPPORTED_BY_HW)
break;
- } else if (!palette
- && !(flags &
- (VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_CSP_SUPPORTED))
- && (out_fmt == IMGFMT_RGB8 || out_fmt == IMGFMT_BGR8)) {
- sh->outfmtidx = j; // pass index to the control() function this way
- if (sh->vd_driver->control(sh, VDCTRL_QUERY_FORMAT, &out_fmt) !=
- CONTROL_FALSE)
- palette = 1;
}
}
if (j < 0) {
// TODO: no match - we should use conversion...
- if (strcmp(vf->info->name, "scale") && palette != -1) {
+ if (strcmp(vf->info->name, "scale")) {
mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Could not find matching colorspace - retrying with -vf scale...\n");
- sc = vf = vf_open_filter(opts, vf, "scale", NULL);
- goto csp_again;
- } else if (palette == 1) {
- mp_msg(MSGT_DECVIDEO, MSGL_V, "vd: Trying -vf palette...\n");
- palette = -1;
- vf = vf_open_filter(opts, vf, "palette", NULL);
+ vf = vf_open_filter(opts, vf, "scale", NULL);
goto csp_again;
- } else {
- // sws failed, if the last filter (vf_vo) support MPEGPES try
- // to append vf_lavc
- vf_instance_t *vo, *vp = NULL, *ve, *vpp = NULL;
- // Remove the scale filter if we added it ourselves
- if (vf == sc) {
- ve = vf;
- vf = vf->next;
- vf_uninit_filter(ve);
- }
- // Find the last filter (vf_vo)
- for (vo = vf; vo->next; vo = vo->next) {
- vpp = vp;
- vp = vo;
- }
- if (vo->query_format(vo, IMGFMT_MPEGPES)
- && (!vp || (vp && strcmp(vp->info->name, "lavc")))) {
- ve = vf_open_filter(opts, vo, "lavc", NULL);
- if (vp)
- vp->next = ve;
- else
- vf = ve;
- goto csp_again;
- }
- if (vp && !strcmp(vp->info->name,"lavc")) {
- if (vpp)
- vpp->next = vo;
- else
- vf = vo;
- vf_uninit_filter(vp);
- }
}
mp_tmsg(MSGT_CPLAYER, MSGL_WARN,
"The selected video_out device is incompatible with this codec.\n"\