mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
c5361d12d8
commit
ea18cb99ba
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue