Commit 2abef770 authored by arpi_esp's avatar arpi_esp

(commit by michael)

motion-estimation on width/height not divisable through 16 files bugfix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@279 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b1df4e1f
...@@ -409,13 +409,20 @@ int estimate_motion(MpegEncContext * s, ...@@ -409,13 +409,20 @@ int estimate_motion(MpegEncContext * s,
if (s->unrestricted_mv) { if (s->unrestricted_mv) {
xmin = -16; xmin = -16;
ymin = -16; ymin = -16;
xmax = s->width; if(s->avctx==NULL || s->avctx->codec->id!=CODEC_ID_MPEG4){
ymax = s->height; xmax = s->mb_width*16;
ymax = s->mb_height*16;
}else {
/* XXX: dunno if this is correct but ffmpeg4 decoder wont like it otherwise
(cuz the drawn edge isnt large enough))*/
xmax = s->width;
ymax = s->height;
}
} else { } else {
xmin = 0; xmin = 0;
ymin = 0; ymin = 0;
xmax = s->width - 16; xmax = s->mb_width*16 - 16;
ymax = s->height - 16; ymax = s->mb_height*16 - 16;
} }
switch(s->full_search) { switch(s->full_search) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment