# HG changeset patch # User michael # Date 1228214588 0 # Node ID dcfdb3352dde790999e651362710ddf69fd38d02 # Parent 93ee77578391945e59049ad7b3235227c4cee092 Fix regression test failure with pthreads on multiprocessor systems. Fixes issue517 diff -r 93ee77578391 -r dcfdb3352dde motion_est.c --- a/motion_est.c Mon Dec 01 22:07:00 2008 +0000 +++ b/motion_est.c Tue Dec 02 10:43:08 2008 +0000 @@ -307,8 +307,6 @@ c->sub_motion_search= no_sub_motion_search; } - c->temp= c->scratchpad; - return 0; } diff -r 93ee77578391 -r dcfdb3352dde mpegvideo.c --- a/mpegvideo.c Mon Dec 01 22:07:00 2008 +0000 +++ b/mpegvideo.c Tue Dec 02 10:43:08 2008 +0000 @@ -289,6 +289,7 @@ //FIXME should be linesize instead of s->width*2 but that is not known before get_buffer() CHECKED_ALLOCZ(s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t)) + s->me.temp= s->me.scratchpad; s->rd_scratchpad= s->me.scratchpad; s->b_scratchpad= s->me.scratchpad; s->obmc_scratchpad= s->me.scratchpad + 16; @@ -315,6 +316,7 @@ av_freep(&s->allocated_edge_emu_buffer); s->edge_emu_buffer= NULL; av_freep(&s->me.scratchpad); + s->me.temp= s->rd_scratchpad= s->b_scratchpad= s->obmc_scratchpad= NULL; @@ -331,6 +333,7 @@ COPY(allocated_edge_emu_buffer); COPY(edge_emu_buffer); COPY(me.scratchpad); + COPY(me.temp); COPY(rd_scratchpad); COPY(b_scratchpad); COPY(obmc_scratchpad); diff -r 93ee77578391 -r dcfdb3352dde snow.c --- a/snow.c Mon Dec 01 22:07:00 2008 +0000 +++ b/snow.c Tue Dec 02 10:43:08 2008 +0000 @@ -4007,6 +4007,7 @@ s->m.flags = avctx->flags; s->m.bit_rate= avctx->bit_rate; + s->m.me.temp = s->m.me.scratchpad= av_mallocz((avctx->width+64)*2*16*2*sizeof(uint8_t)); s->m.me.map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); @@ -4435,6 +4436,7 @@ av_freep(&s->spatial_dwt_buffer); av_freep(&s->spatial_idwt_buffer); + s->m.me.temp= NULL; av_freep(&s->m.me.scratchpad); av_freep(&s->m.me.map); av_freep(&s->m.me.score_map);