Mercurial > libavcodec.hg
comparison h264.c @ 8129:a9734fe0811e libavcodec
Making it easier to send arbitrary structures as work orders to MT workers
author | romansh |
---|---|
date | Wed, 12 Nov 2008 17:47:23 +0000 |
parents | e61f76efc9f3 |
children | 54d7d6a63f3c |
comparison
equal
deleted
inserted
replaced
8128:e2241dd85c65 | 8129:a9734fe0811e |
---|---|
6624 } | 6624 } |
6625 } | 6625 } |
6626 } | 6626 } |
6627 } | 6627 } |
6628 | 6628 |
6629 static int decode_slice(struct AVCodecContext *avctx, H264Context *h){ | 6629 static int decode_slice(struct AVCodecContext *avctx, void *arg){ |
6630 H264Context *h = *(void**)arg; | |
6630 MpegEncContext * const s = &h->s; | 6631 MpegEncContext * const s = &h->s; |
6631 const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F; | 6632 const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F; |
6632 | 6633 |
6633 s->mb_skip_run= -1; | 6634 s->mb_skip_run= -1; |
6634 | 6635 |
7344 hx->s.error_recognition = avctx->error_recognition; | 7345 hx->s.error_recognition = avctx->error_recognition; |
7345 hx->s.error_count = 0; | 7346 hx->s.error_count = 0; |
7346 } | 7347 } |
7347 | 7348 |
7348 avctx->execute(avctx, (void *)decode_slice, | 7349 avctx->execute(avctx, (void *)decode_slice, |
7349 (void **)h->thread_context, NULL, context_count); | 7350 (void **)h->thread_context, NULL, context_count, sizeof(void*)); |
7350 | 7351 |
7351 /* pull back stuff from slices to master context */ | 7352 /* pull back stuff from slices to master context */ |
7352 hx = h->thread_context[context_count - 1]; | 7353 hx = h->thread_context[context_count - 1]; |
7353 s->mb_x = hx->s.mb_x; | 7354 s->mb_x = hx->s.mb_x; |
7354 s->mb_y = hx->s.mb_y; | 7355 s->mb_y = hx->s.mb_y; |