[FFmpeg-soc] [soc] Don't copy padding_bug_score.

Alexander Strange astrange at ithinksw.com
Tue Jul 15 18:13:32 CEST 2008


On Jul 15, 2008, at 11:46 AM, Reimar Döffinger wrote:

> On Tue, Jul 15, 2008 at 04:19:29AM -0400, Alexander Strange wrote:
>> ---
>> libavcodec/mpegvideo.c |    1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>> diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
>> index 322cfc2..cb2d75f 100644
>> --- a/libavcodec/mpegvideo.c
>> +++ b/libavcodec/mpegvideo.c
>> @@ -389,7 +389,6 @@ void MPV_update_picture_pointers(MpegEncContext  
>> *dst, MpegEncContext *src){
>>
>>     //copy mpeg4 pts info
>>     memcpy(&dst->time_increment_bits, &src->time_increment_bits,  
>> (char*)&src->shape - (char*)&src->time_increment_bits);
>> -    dst->padding_bug_score = src->padding_bug_score;
>>
>>     //memcpy(dst->mbintra_table, src->mbintra_table,  
>> mb_array_size);  //FIXME why does copying this break decoding?
>
> Useless subject. Esp. with one line changes there is very little point
> in repeating _what_ the patch does, but the _why_ is critical.

I wrote this:
Don't copy padding_bug_score.
This changes during h263 decode so it introduces a race condition.
Having a score for only every 1/n-threads frames is hopefully not too  
much less inaccurate.
(http://gitorious.org/projects/ffmpeg/repos/ffmpeg-mt/commits/27c18e401846c8aeab8979f1126a553bdaa12dd3 
)

git send-email somehow lost the rest of the commit message, even  
though it's in my patches locally.

I haven't checked the rest of my files for padding bugs yet, but one I  
made ends up with a higher padding_bug_score at the end of one frame  
when threads are on and complains about an overread by 9 bits. I  
created it with mkvmerge --engage native_mpeg4, which is pretty buggy,  
so it might just be invalid, but there's no errors without  
multithreading.


More information about the FFmpeg-soc mailing list