aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-12 19:29:32 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-12-13 00:25:48 +0100
commit6773269f4c84d232aba5818ef012c3a47b2f43c8 (patch)
treeddea4de0ec889bb3c0be577884b93f688e6c3ef3
parent2a42b680e993329e0aa4f8beac5c606d0df363f3 (diff)
downloadffmpeg-6773269f4c84d232aba5818ef012c3a47b2f43c8.tar.gz
mpeg1video: support multi threaded slice encoding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 03df9720168335482f00898fc16b56ff4878d0e7) Conflicts: libavcodec/mpeg12enc.c
-rw-r--r--libavcodec/mpeg12enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 62514e4f9c..c730f878cb 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -463,7 +463,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
}
if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 &&
- (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&
+ (mb_x != s->mb_width - 1 || (mb_y != s->end_mb_y - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&
((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) ||
(s->pict_type == AV_PICTURE_TYPE_B && s->mv_dir == s->last_mv_dir && (((s->mv_dir & MV_DIR_FORWARD) ? ((s->mv[0][0][0] - s->last_mv[0][0][0])|(s->mv[0][0][1] - s->last_mv[0][0][1])) : 0) |
((s->mv_dir & MV_DIR_BACKWARD) ? ((s->mv[1][0][0] - s->last_mv[1][0][0])|(s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) {
@@ -974,7 +974,7 @@ AVCodec ff_mpeg1video_encoder = {
.close = MPV_encode_end,
.supported_framerates= avpriv_frame_rate_tab+1,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
- .capabilities= CODEC_CAP_DELAY,
+ .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS,
.long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
.priv_class = &mpeg1_class,
};