mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/mpegvideo: fix edge emulation with uvlinesize below 25
Fixes fate-vsynth3-wmv2 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ffe6ecc418
commit
c5fc8ae126
@ -2497,19 +2497,20 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
v_edge_pos);
|
||||
ptr_y = s->edge_emu_buffer;
|
||||
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
|
||||
uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize;
|
||||
s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
|
||||
uint8_t *ubuf = s->edge_emu_buffer + 18 * s->linesize;
|
||||
uint8_t *vbuf =ubuf + 9 * s->uvlinesize;
|
||||
s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
|
||||
uvlinesize >> field_based, uvlinesize >> field_based,
|
||||
9, 9 + field_based,
|
||||
uvsrc_x, uvsrc_y << field_based,
|
||||
h_edge_pos >> 1, v_edge_pos >> 1);
|
||||
s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr,
|
||||
s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
|
||||
uvlinesize >> field_based,uvlinesize >> field_based,
|
||||
9, 9 + field_based,
|
||||
uvsrc_x, uvsrc_y << field_based,
|
||||
h_edge_pos >> 1, v_edge_pos >> 1);
|
||||
ptr_cb = uvbuf;
|
||||
ptr_cr = uvbuf + 16;
|
||||
ptr_cb = ubuf;
|
||||
ptr_cr = vbuf;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,19 +324,20 @@ void mpeg_motion_internal(MpegEncContext *s,
|
||||
s->h_edge_pos, s->v_edge_pos);
|
||||
ptr_y = s->edge_emu_buffer;
|
||||
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
|
||||
uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize;
|
||||
s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
|
||||
uint8_t *ubuf = s->edge_emu_buffer + 18 * s->linesize;
|
||||
uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
|
||||
s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
|
||||
s->uvlinesize, s->uvlinesize,
|
||||
9, 9 + field_based,
|
||||
uvsrc_x, uvsrc_y << field_based,
|
||||
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
|
||||
s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr,
|
||||
s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
|
||||
s->uvlinesize, s->uvlinesize,
|
||||
9, 9 + field_based,
|
||||
uvsrc_x, uvsrc_y << field_based,
|
||||
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
|
||||
ptr_cb = uvbuf;
|
||||
ptr_cr = uvbuf + 16;
|
||||
ptr_cb = ubuf;
|
||||
ptr_cr = vbuf;
|
||||
}
|
||||
}
|
||||
|
||||
@ -545,19 +546,20 @@ static inline void qpel_motion(MpegEncContext *s,
|
||||
s->h_edge_pos, s->v_edge_pos);
|
||||
ptr_y = s->edge_emu_buffer;
|
||||
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
|
||||
uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize;
|
||||
s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
|
||||
uint8_t *ubuf = s->edge_emu_buffer + 18 * s->linesize;
|
||||
uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
|
||||
s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
|
||||
s->uvlinesize, s->uvlinesize,
|
||||
9, 9 + field_based,
|
||||
uvsrc_x, uvsrc_y << field_based,
|
||||
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
|
||||
s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr,
|
||||
s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
|
||||
s->uvlinesize, s->uvlinesize,
|
||||
9, 9 + field_based,
|
||||
uvsrc_x, uvsrc_y << field_based,
|
||||
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
|
||||
ptr_cb = uvbuf;
|
||||
ptr_cr = uvbuf + 16;
|
||||
ptr_cb = ubuf;
|
||||
ptr_cr = vbuf;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user