---
libavcodec/mpegvideo.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 78114f6..9d38d28 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1692,7 +1692,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s,
*/
int MPV_lowest_referenced_row(MpegEncContext *s, int dir)
{
- int off = 0;
+ int off = 0, i;
if (s->picture_structure != PICT_FRAME) goto unhandled;
@@ -1700,6 +1700,18 @@ int MPV_lowest_referenced_row(MpegEncContext *s, int dir)
case MV_TYPE_16X16:
off = (s->mv[dir][0][1] + 31) >> 5;
break;
+ case MV_TYPE_16X8:
+ for (i = 0; i < 2; i++) {
+ int tmp = (s->mv[dir][i][1] + 15) >> 4;
+ off = FFMAX(off, tmp);
+ }
+ break;
+ case MV_TYPE_8X8:
+ for (i = 0; i < 4; i++) {
+ int tmp = (s->mv[dir][i][1] + 15) >> 4;
+ off = FFMAX(off, tmp);
+ }
+ break;
default:
goto unhandled;
}
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc