aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-26 10:57:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-26 10:57:51 +0200
commit5dc2c99055ae4a95336f28c58c8c8da4033979f1 (patch)
tree2e0633e3a1113c1d80de5659efca98a05ab8ca14
parentbbc7d33a0d7dad79f3d514349b0ba321121b80fe (diff)
parent93a51984a27f3ba84d4e6f13d0c704ee9891603e (diff)
downloadffmpeg-5dc2c99055ae4a95336f28c58c8c8da4033979f1.tar.gz
Merge commit '93a51984a27f3ba84d4e6f13d0c704ee9891603e'
* commit '93a51984a27f3ba84d4e6f13d0c704ee9891603e': mpeg12: Ignore slice threading if hwaccel is active Conflicts: libavcodec/mpeg12dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpeg12dec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index b053c53ab1..4795a1c451 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2128,7 +2128,8 @@ static int decode_chunks(AVCodecContext *avctx,
buf_ptr = avpriv_find_start_code(buf_ptr, buf_end, &start_code);
if (start_code > 0x1ff) {
if (!skip_frame) {
- if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) {
+ if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE) &&
+ !avctx->hwaccel) {
int i;
av_assert0(avctx->thread_count > 1);
@@ -2192,7 +2193,8 @@ static int decode_chunks(AVCodecContext *avctx,
s2->intra_dc_precision= 3;
s2->intra_matrix[0]= 1;
}
- if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE) && s->slice_count) {
+ if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE) &&
+ !avctx->hwaccel && s->slice_count) {
int i;
avctx->execute(avctx, slice_decode_thread,
@@ -2367,7 +2369,8 @@ static int decode_chunks(AVCodecContext *avctx,
break;
}
- if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) {
+ if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE) &&
+ !avctx->hwaccel) {
int threshold = (s2->mb_height * s->slice_count +
s2->slice_context_count / 2) /
s2->slice_context_count;