diff mpegvideo.c @ 1827:fcbf31baa1af libavcodec

multithreaded mpeg2 decoding
author michael
date Mon, 23 Feb 2004 20:56:56 +0000
parents 98dbb5c7f8cc
children 7ae26b6e197f
line wrap: on
line diff
--- a/mpegvideo.c	Mon Feb 23 16:07:30 2004 +0000
+++ b/mpegvideo.c	Mon Feb 23 20:56:56 2004 +0000
@@ -468,13 +468,17 @@
 #undef COPY
 }
 
-static void update_duplicate_context(MpegEncContext *dst, MpegEncContext *src){
+void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src){
     MpegEncContext bak;
+    int i;
     //FIXME copy only needed parts
 //START_TIMER
     backup_duplicate_context(&bak, dst);
     memcpy(dst, src, sizeof(MpegEncContext));
     backup_duplicate_context(dst, &bak);
+    for(i=0;i<12;i++){
+        dst->pblocks[i] = (short *)(&dst->block[i]);
+    }
 //STOP_TIMER("update_duplicate_context") //about 10k cycles / 0.01 sec for 1000frames on 1ghz with 2 threads
 }
 
@@ -4632,7 +4636,7 @@
     
     s->mb_intra=0; //for the rate distoration & bit compare functions
     for(i=1; i<s->avctx->thread_count; i++){
-        update_duplicate_context(s->thread_context[i], s);
+        ff_update_duplicate_context(s->thread_context[i], s);
     }
     
     /* Estimate motion for every MB */