diff options
author | wm4 <wm4@nowhere> | 2016-07-15 20:32:49 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-15 20:37:46 +0200 |
commit | ea18cb99ba909c0deaafa83214a5f6c44caf8e1c (patch) | |
tree | 7ef37aa2401485db06702bd97e21fccd98e7ffee /video/filter | |
parent | c5361d12d8886b292325cfb6f1ae075913bc9a96 (diff) | |
download | mpv-ea18cb99ba909c0deaafa83214a5f6c44caf8e1c.tar.bz2 mpv-ea18cb99ba909c0deaafa83214a5f6c44caf8e1c.tar.xz |
vf_vavpp: get rid of mp_refqueue_is_interlaced()
This makes the difference between passing VA_FRAME_PICTURE or
VA_BOTTOM_FIELD for progressive frames (that should be force-
deinterlaced) to VAProcPipelineParameterBuffer.flags. VA-VPP doesn't
really seem to care, and we can get rid of mp_refqueue_is_interlaced()
entirely. It could be argued it's better to pass field flags instead of
the progressive flag.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/refqueue.c | 9 | ||||
-rw-r--r-- | video/filter/refqueue.h | 1 | ||||
-rw-r--r-- | video/filter/vf_vavpp.c | 2 |
3 files changed, 1 insertions, 11 deletions
diff --git a/video/filter/refqueue.c b/video/filter/refqueue.c index 04de3124a4..6b2e5a2110 100644 --- a/video/filter/refqueue.c +++ b/video/filter/refqueue.c @@ -75,15 +75,6 @@ bool mp_refqueue_should_deint(struct mp_refqueue *q) !(q->flags & MP_MODE_INTERLACED_ONLY); } -// Whether the current output frame is marked as interlaced. -bool mp_refqueue_is_interlaced(struct mp_refqueue *q) -{ - if (!mp_refqueue_has_output(q)) - return false; - - return q->queue[q->pos]->fields & MP_IMGFIELD_INTERLACED; -} - // Whether the current output frame (field) is the top field, bottom field // otherwise. (Assumes the caller forces deinterlacing.) bool mp_refqueue_is_top_field(struct mp_refqueue *q) diff --git a/video/filter/refqueue.h b/video/filter/refqueue.h index ef23bee906..bb23506ac2 100644 --- a/video/filter/refqueue.h +++ b/video/filter/refqueue.h @@ -27,7 +27,6 @@ enum { void mp_refqueue_set_mode(struct mp_refqueue *q, int flags); bool mp_refqueue_should_deint(struct mp_refqueue *q); -bool mp_refqueue_is_interlaced(struct mp_refqueue *q); bool mp_refqueue_is_top_field(struct mp_refqueue *q); bool mp_refqueue_top_field_first(struct mp_refqueue *q); bool mp_refqueue_is_second_field(struct mp_refqueue *q); diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c index b24f886241..ad669ac159 100644 --- a/video/filter/vf_vavpp.c +++ b/video/filter/vf_vavpp.c @@ -169,7 +169,7 @@ static struct mp_image *render(struct vf_instance *vf) mp_image_copy_attributes(img, in); unsigned int flags = va_get_colorspace_flag(p->params.color.space); - if (!mp_refqueue_is_interlaced(p->queue)) { + if (!mp_refqueue_should_deint(p->queue)) { flags |= VA_FRAME_PICTURE; } else if (mp_refqueue_is_top_field(p->queue)) { flags |= VA_TOP_FIELD; |