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

Unified Diff: source/patched-ffmpeg-mt/libavcodec/mpegvideo.c

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 side-by-side diff with in-line comments
Download patch
Index: source/patched-ffmpeg-mt/libavcodec/mpegvideo.c
===================================================================
--- source/patched-ffmpeg-mt/libavcodec/mpegvideo.c (revision 65184)
+++ source/patched-ffmpeg-mt/libavcodec/mpegvideo.c (working copy)
@@ -584,8 +584,7 @@
return -1;
}
- if(s->avctx->active_thread_type&FF_THREAD_SLICE &&
- (s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb_height && s->mb_height))){
+ if(s->avctx->thread_count > MAX_THREADS){
av_log(s->avctx, AV_LOG_ERROR, "too many threads\n");
return -1;
}
@@ -745,6 +744,11 @@
if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE) {
threads = s->avctx->thread_count;
+ if (s->avctx->thread_count > s->mb_height && s->mb_height) {
+ av_log(s->avctx, AV_LOG_WARNING, "Reducing from %d to %d threads due to height of %d pixels.\n", s->avctx->thread_count, s->mb_height, s->height);
+ threads = s->mb_height;
+ }
+
for(i=1; i<threads; i++){
s->thread_context[i]= av_malloc(sizeof(MpegEncContext));
memcpy(s->thread_context[i], s, sizeof(MpegEncContext));
@@ -2241,7 +2245,7 @@
* @param h is the normal height, this will be reduced automatically if needed for the last row
*/
void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
- const int field_pic= s->picture_structure != PICT_FRAME;
+ const int field_pic= s->picture_structure != PICT_FRAME;
if(field_pic){
h <<= 1;
y <<= 1;

Powered by Google App Engine
This is Rietveld 408576698