Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: patches/to_upstream/17_mpegthread.patch

Issue 4533003: patched ffmpeg nov 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 diff -wurp -N orig/libavcodec/mpegvideo.c ffmpeg-mt/libavcodec/mpegvideo.c
2 --- orig/libavcodec/mpegvideo.c 2010-11-04 08:11:14 -0700
3 +++ ffmpeg-mt/libavcodec/mpegvideo.c 2010-11-04 08:11:24 -0700
4 @@ -584,8 +584,7 @@ av_cold int MPV_common_init(MpegEncConte
5 return -1;
6 }
7
8 - if(s->avctx->active_thread_type&FF_THREAD_SLICE &&
9 - (s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb _height && s->mb_height))){
10 + if(s->avctx->thread_count > MAX_THREADS){
11 av_log(s->avctx, AV_LOG_ERROR, "too many threads\n");
12 return -1;
13 }
14 @@ -745,6 +744,11 @@ av_cold int MPV_common_init(MpegEncConte
15 if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE) {
16 threads = s->avctx->thread_count;
17
18 + if (s->avctx->thread_count > s->mb_height && s->mb_height) {
19 + av_log(s->avctx, AV_LOG_WARNING, "Reducing from %d to %d threads du e to height of %d pixels.\n", s->avctx->thread_count, s->mb_height, s->height);
20 + threads = s->mb_height;
21 + }
22 +
23 for(i=1; i<threads; i++){
24 s->thread_context[i]= av_malloc(sizeof(MpegEncContext));
25 memcpy(s->thread_context[i], s, sizeof(MpegEncContext));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698