• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:fctx

357     FrameThreadContext *fctx = p->parent;
362 if (p->state == STATE_INPUT_READY && !fctx->die) {
364 while (p->state == STATE_INPUT_READY && !fctx->die)
369 if (fctx->die) break;
502 FrameThreadContext *fctx = p->parent;
507 pthread_mutex_lock(&fctx->buffer_mutex);
513 pthread_mutex_unlock(&fctx->buffer_mutex);
519 FrameThreadContext *fctx = p->parent;
520 PerThreadContext *prev_thread = fctx->prev_thread;
578 fctx->prev_thread = p;
579 fctx->next_decoding++;
588 FrameThreadContext *fctx = avctx->thread_opaque;
589 int finished = fctx->next_finished;
597 p = &fctx->threads[fctx->next_decoding];
607 if (fctx->delaying && avpkt->size) {
608 if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;
622 p = &fctx->threads[finished++];
642 * stopped by the "finished != fctx->next_finished" condition.
648 } while (!avpkt->size && !*got_picture_ptr && finished != fctx->next_finished);
652 if (fctx->next_decoding >= avctx->thread_count) fctx->next_decoding = 0;
654 fctx->next_finished = finished;
708 static void park_frame_worker_threads(FrameThreadContext *fctx, int thread_count)
713 PerThreadContext *p = &fctx->threads[i];
726 FrameThreadContext *fctx = avctx->thread_opaque;
730 park_frame_worker_threads(fctx, thread_count);
732 if (fctx->prev_thread && fctx->prev_thread != fctx->threads)
733 update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0);
735 fctx->die = 1;
738 PerThreadContext *p = &fctx->threads[i];
756 PerThreadContext *p = &fctx->threads[i];
776 av_freep(&fctx->threads);
777 pthread_mutex_destroy(&fctx->buffer_mutex);
786 FrameThreadContext *fctx;
803 avctx->thread_opaque = fctx = av_mallocz(sizeof(FrameThreadContext));
805 fctx->threads = av_mallocz(sizeof(PerThreadContext) * thread_count);
806 pthread_mutex_init(&fctx->buffer_mutex, NULL);
807 fctx->delaying = 1;
811 PerThreadContext *p = &fctx->threads[i];
819 p->parent = fctx;
873 FrameThreadContext *fctx = avctx->thread_opaque;
877 park_frame_worker_threads(fctx, avctx->thread_count);
878 if (fctx->prev_thread) {
879 if (fctx->prev_thread != &fctx->threads[0])
880 update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0);
882 avctx->codec->flush(fctx->threads[0].avctx);
885 fctx->next_decoding = fctx->next_finished = 0;
886 fctx->delaying = 1;
887 fctx->prev_thread = NULL;
964 FrameThreadContext *fctx;
979 fctx = p->parent;
980 pthread_mutex_lock(&fctx->buffer_mutex);
982 pthread_mutex_unlock(&fctx->buffer_mutex);