fix a bug related to gf_active_flags in multi-threaded encoder
authorYaowu Xu <yaowu@google.com>
Fri, 6 May 2011 16:00:44 +0000 (09:00 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 6 May 2011 16:00:44 +0000 (09:00 -0700)
Paul pointed out that the pointer to the gf_active_flags is not being
properly incremented in multithreaded encoder. This commit fixes the
issue by making sure the gf_active_ptr points to the starting of next
group of mb rows.

Change-Id: I3246e657d23beabb614dfb880733a68a5fd7e34c

vp8/encoder/encodeframe.c
vp8/encoder/ethreading.c

index f48a1fc..fedb4df 100644 (file)
@@ -830,6 +830,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
 
                 xd->mode_info_context += xd->mode_info_stride * cpi->encoding_thread_count;
                 x->partition_info  += xd->mode_info_stride * cpi->encoding_thread_count;
+                x->gf_active_ptr   += cm->mb_cols * cpi->encoding_thread_count;
 
             }
 
index f5006dd..c265728 100644 (file)
@@ -264,6 +264,7 @@ THREAD_FUNCTION thread_encoding_proc(void *p_data)
 
                 xd->mode_info_context += xd->mode_info_stride * cpi->encoding_thread_count;
                 x->partition_info += xd->mode_info_stride * cpi->encoding_thread_count;
+                x->gf_active_ptr   += cm->mb_cols * cpi->encoding_thread_count;
 
                 if (mb_row == cm->mb_rows - 1)
                 {