diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-25 02:57:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-25 02:57:41 +0100 |
commit | 797ef671dda9094640ade203a09dc59e9bf328a4 (patch) | |
tree | 01f686f189f26f0dc745dc5a4d70d6983b18aafc /libavcodec/mpeg12.c | |
parent | 5d6c5dd36c024784a9cd36391c3698c2f1f2d2ab (diff) | |
parent | 98a7d560b4f835ba5b99b9974ee1a2c096198bea (diff) | |
download | ffmpeg-797ef671dda9094640ade203a09dc59e9bf328a4.tar.gz |
Merge remote-tracking branch 'newdev/master'
* newdev/master:
matroskadec: set default duration for simple block
When building for MinGW32 disable strict ANSI compliancy.
ARM: fix ff_apply_window_int16_neon() prototype
configure: check for --as-needed support early
ARM: NEON optimised apply_window_int16()
ac3enc: NEON optimised shift functions
ac3enc: NEON optimised ac3_max_msb_abs_int16 and ac3_exponent_min
mpeg12.c: fix slice threading for mpeg2 field picture mode.
ffmetadec.c: fix compiler warnings.
configure: Don't explicitly disable ffplay or in/outdevices on dos
configure: Remove the explicit disabling of ffserver
configure: Add fork as a dependency to ffserver
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 30a6aaaf94..5db24e87fd 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1924,7 +1924,9 @@ static int slice_decode_thread(AVCodecContext *c, void *arg){ start_code= -1; buf = ff_find_start_code(buf, s->gb.buffer_end, &start_code); - mb_y= start_code - SLICE_MIN_START_CODE; + mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic; + if (s->picture_structure == PICT_BOTTOM_FIELD) + mb_y++; if(mb_y < 0 || mb_y >= s->end_mb_y) return -1; } @@ -2342,6 +2344,16 @@ static int decode_chunks(AVCodecContext *avctx, break; case PICTURE_START_CODE: + if (avctx->thread_count > 1 && s->slice_count) { + int i; + + avctx->execute(avctx, slice_decode_thread, + s2->thread_context, NULL, + s->slice_count, sizeof(void*)); + for (i = 0; i < s->slice_count; i++) + s2->error_count += s2->thread_context[i]->error_count; + s->slice_count = 0; + } if(last_code == 0 || last_code == SLICE_MIN_START_CODE){ if(mpeg_decode_postinit(avctx) < 0){ av_log(avctx, AV_LOG_ERROR, "mpeg_decode_postinit() failure\n"); |