diff options
author | Multiple Authors <multiple_authors@ffmpeg_mt> | 2011-05-10 23:12:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-11 00:57:59 +0200 |
commit | a811ec7cb5d6b31ddeef59bfaab074074f2e1a92 (patch) | |
tree | 946d991cf0975658a4fb75bde9f93bbe82a93b76 /libavcodec/mpegvideo.c | |
parent | b5e089924f2b74b1b2140ba24f4ee8e0e17c7567 (diff) | |
download | ffmpeg-streaming-a811ec7cb5d6b31ddeef59bfaab074074f2e1a92.zip ffmpeg-streaming-a811ec7cb5d6b31ddeef59bfaab074074f2e1a92.tar.gz |
Merging branch 'ffmpeg-mt/master'
Just some cosmetics & comments, the only functional change
"error_resilience: use s->last_picture for accessing last MVs."
Is so buggy that it needs a full rewrite, guess -1.0 PSNR loss wasnt
enough for ronald to realize there was a problem.
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index b4b6a39..50c99f4 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -680,6 +680,7 @@ av_cold int MPV_common_init(MpegEncContext *s) FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset, 2 * 64 * sizeof(uint16_t), fail) } } + s->picture_count = MAX_PICTURE_COUNT * FFMAX(1, s->avctx->thread_count); FF_ALLOCZ_OR_GOTO(s->avctx, s->picture, s->picture_count * sizeof(Picture), fail) for(i = 0; i < s->picture_count; i++) { @@ -754,7 +755,7 @@ av_cold int MPV_common_init(MpegEncContext *s) for(i=0; i<threads; i++){ if(init_duplicate_context(s->thread_context[i], s) < 0) - goto fail; + goto fail; s->thread_context[i]->start_mb_y= (s->mb_height*(i ) + s->avctx->thread_count/2) / s->avctx->thread_count; s->thread_context[i]->end_mb_y = (s->mb_height*(i+1) + s->avctx->thread_count/2) / s->avctx->thread_count; } |