mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
mp_image: remove some unused interlacing flags
MP_IMGFIELD_TOP/MP_IMGFIELD_BOTTOM were completely unused, and MP_IMGFIELD_ORDERED was always set (even though vf_vdpaupp.c strangely checked for the latter).
This commit is contained in:
parent
994438dee5
commit
1419aac22a
@ -92,9 +92,7 @@ static bool output_field(struct vf_instance *vf, int pos)
|
|||||||
|
|
||||||
frame->field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME;
|
frame->field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME;
|
||||||
if (p->opts.deint) {
|
if (p->opts.deint) {
|
||||||
int top_field_first = 1;
|
int top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST);
|
||||||
if (mpi->fields & MP_IMGFIELD_ORDERED)
|
|
||||||
top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST);
|
|
||||||
frame->field = top_field_first ^ (pos & 1) ?
|
frame->field = top_field_first ^ (pos & 1) ?
|
||||||
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD:
|
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD:
|
||||||
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD;
|
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD;
|
||||||
|
@ -625,14 +625,13 @@ void mp_image_copy_fields_from_av_frame(struct mp_image *dst,
|
|||||||
|
|
||||||
dst->pict_type = src->pict_type;
|
dst->pict_type = src->pict_type;
|
||||||
|
|
||||||
dst->fields = MP_IMGFIELD_ORDERED;
|
dst->fields = 0;
|
||||||
if (src->interlaced_frame)
|
if (src->interlaced_frame)
|
||||||
dst->fields |= MP_IMGFIELD_INTERLACED;
|
dst->fields |= MP_IMGFIELD_INTERLACED;
|
||||||
if (src->top_field_first)
|
if (src->top_field_first)
|
||||||
dst->fields |= MP_IMGFIELD_TOP_FIRST;
|
dst->fields |= MP_IMGFIELD_TOP_FIRST;
|
||||||
if (src->repeat_pict == 1)
|
if (src->repeat_pict == 1)
|
||||||
dst->fields |= MP_IMGFIELD_REPEAT_FIRST;
|
dst->fields |= MP_IMGFIELD_REPEAT_FIRST;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy properties and data of the mp_image into the AVFrame, without taking
|
// Copy properties and data of the mp_image into the AVFrame, without taking
|
||||||
|
@ -30,11 +30,8 @@
|
|||||||
|
|
||||||
#define MP_PALETTE_SIZE (256 * 4)
|
#define MP_PALETTE_SIZE (256 * 4)
|
||||||
|
|
||||||
#define MP_IMGFIELD_ORDERED 0x01
|
|
||||||
#define MP_IMGFIELD_TOP_FIRST 0x02
|
#define MP_IMGFIELD_TOP_FIRST 0x02
|
||||||
#define MP_IMGFIELD_REPEAT_FIRST 0x04
|
#define MP_IMGFIELD_REPEAT_FIRST 0x04
|
||||||
#define MP_IMGFIELD_TOP 0x08
|
|
||||||
#define MP_IMGFIELD_BOTTOM 0x10
|
|
||||||
#define MP_IMGFIELD_INTERLACED 0x20
|
#define MP_IMGFIELD_INTERLACED 0x20
|
||||||
|
|
||||||
// Describes image parameters that usually stay constant.
|
// Describes image parameters that usually stay constant.
|
||||||
|
Loading…
Reference in New Issue
Block a user