[FFmpeg-devel] [PATCH] h264 parallelized

Michael Niedermayer michaelni
Mon Sep 3 12:48:20 CEST 2007


Hi

On Mon, Sep 03, 2007 at 11:02:27AM +0200, Andreas ?man wrote:
> Hi again
> 
> Michael Niedermayer wrote:
> > Hi
> > 
> >> +            hx->s.error_count = 0;
> >> +        }
> >> +
> >> +        avctx->execute(avctx, (void *)decode_slice, (void **)h->thread_context + h->first_context,
> >> +                       NULL, h->current_context - h->first_context);
> >> +
> >> +        /* pull back stuff from slices to master context */
> >> +        hx = h->thread_context[h->current_context - 1];
> >> +        s->mb_x = hx->s.mb_x;
> >> +        s->mb_y = hx->s.mb_y;
> >> +        for(i = 1; i < h->current_context; i++)
> >> +            h->s.error_count += h->thread_context[i]->s.error_count;
> >> +    }
> >> +    if(reset) {
> >> +        h->current_context = 0;
> >> +        h->first_context = 0;
> >> +    } else {
> >> +        /* if currently decoding a slice header / NAL unit, we cannot just set h->current_context to 0.
> > 
> > why not? this increases complexity alot ...
> > wouldnt copying the current context to 0 work too?
> 
> I second thought, this might bloat the code more.
> context 0 (master) contains a lot of stuff which is not copied
> to the threads, so just copying the context back would mess
> it up pretty bad. And doing a field-by-field copy is more bloated
> and more error-prone IHMO.

ok, but what about returning some specific error code for decode_slice_header()
and then just redecoding that slice with context 0 ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070903/c9b7b5e7/attachment.pgp>



More information about the ffmpeg-devel mailing list