mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-05 12:07:49 +00:00
avfilter/vf_tinterlace: fix handling of not so even sizes
Fixes green bottom line Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b691bc424f
commit
e92862e75f
@ -175,7 +175,7 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4],
|
|||||||
int h, i;
|
int h, i;
|
||||||
|
|
||||||
for (plane = 0; plane < desc->nb_components; plane++) {
|
for (plane = 0; plane < desc->nb_components; plane++) {
|
||||||
int lines = plane == 1 || plane == 2 ? src_h >> vsub : src_h;
|
int lines = plane == 1 || plane == 2 ? -((-src_h) >> vsub) : src_h;
|
||||||
int linesize = av_image_get_linesize(format, w, plane);
|
int linesize = av_image_get_linesize(format, w, plane);
|
||||||
uint8_t *dstp = dst[plane];
|
uint8_t *dstp = dst[plane];
|
||||||
const uint8_t *srcp = src[plane];
|
const uint8_t *srcp = src[plane];
|
||||||
@ -183,7 +183,7 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4],
|
|||||||
if (linesize < 0)
|
if (linesize < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lines /= k;
|
lines = (lines + (src_field == FIELD_UPPER)) / k;
|
||||||
if (src_field == FIELD_LOWER)
|
if (src_field == FIELD_LOWER)
|
||||||
srcp += src_linesize[plane];
|
srcp += src_linesize[plane];
|
||||||
if (interleave && dst_field == FIELD_LOWER)
|
if (interleave && dst_field == FIELD_LOWER)
|
||||||
|
Loading…
Reference in New Issue
Block a user