wolverin via Libav-user (12022-08-19):
> Thanks for the answer.
>
> Yes, I tried to configure for mjpeg
>
> if (!(pInpCdcCtx = avcodec_alloc_context3(pInpCdc)))
> {
> PrintError("Error allocate decoder context", (rt = AVERROR(ENOMEM)));
> return rt;
> }
> pInpCdcCtx->thread_count = 4;
>
> and after your answer I added
>
> if (!(pSwsCtx = sws_getContext(pInpCdcCtx->width, pInpCdcCtx->height,
> pInpCdcCtx->pix_fmt,
> pOutCdcCtx->width, pOutCdcCtx->height,
> pOutCdcCtx->pix_fmt,
> SCALE_FLAGS, NULL, NULL, NULL)))
> {
> PrintError("Error initialize the conversion context", (rt =
> AVERROR(ENOMEM)));
> return rt;
> }
> else
> av_opt_set_int(pSwsCtx, "threads", 20, 0);
>
> But there is no effect, what am I doing wrong?I do not konw. I notice that vf_scale() is not using sws_alloc_context(), then setting options then sws_init_context() while you use sws_getContext(), which includes sws_init_context(), and then you set the threads options. Therefore, I suspect you need to set the threads options before sws_init_context() is called. > >Have you tried setting "threads" option to the sws_scale context? And to > >the codec context? Please remember that top-posting is forbidden on this mailing-list; if you do not know what it means look it up. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
