summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_vavpp.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-07 19:35:55 +0100
committerwm4 <wm4@nowhere>2013-12-07 19:35:55 +0100
commitd658b115a0fcb9b313b2eb77ed860649f83257b0 (patch)
tree8efd883fb2d83d8b8fc3be95067d32e336e11944 /video/filter/vf_vavpp.c
parent37fbef2ccb3c828dd41f6e15ccf635e697e4011f (diff)
downloadmpv-d658b115a0fcb9b313b2eb77ed860649f83257b0.tar.bz2
mpv-d658b115a0fcb9b313b2eb77ed860649f83257b0.tar.xz
vf: redo conversion filter insertion/format negotiation
Remove the inconsistent, duplicated, and insufficient scale filter insertion code, and do it in one place instead. This also compensates for the earlier removal of vf_match_csp() (which was in fact duplicated code). The algorithm to determine where to insert a filter etc. is probably the same, though it also comes with some changes that should make debugging easier when trying to figure out why a chain is failing to configure. Add an "in" pseudo filter, which makes insertion of conversion filters easier. Also change the vf->reconfig signature. At a later point, I'll probably change format negotiation such that the generic filter code will choose the output format, so having separate in and out params will be useful.
Diffstat (limited to 'video/filter/vf_vavpp.c')
-rw-r--r--video/filter/vf_vavpp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index 94666c13bd..dfd99e8a3c 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -240,15 +240,16 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *in)
return 0;
}
-static int reconfig(struct vf_instance *vf, struct mp_image_params *params,
- int flags)
+static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
+ struct mp_image_params *out)
{
struct vf_priv_s *p = vf->priv;
p->prev_pts = MP_NOPTS_VALUE;
- p->params = *params;
- params->imgfmt = IMGFMT_VAAPI;
- return vf_next_reconfig(vf, params, flags);
+ p->params = *in;
+ *out = *in;
+ out->imgfmt = IMGFMT_VAAPI;
+ return 0;
}
static void uninit(struct vf_instance *vf)