[FFmpeg-user] Hi, I want to ask a question about ffmpeg using dxva2 with multithreads

高伟 highgod0401 at gmail.com
Thu Jun 21 04:49:39 CEST 2012


Hi  Roger,

Thank you for your help.

Do you know where I can find any document introduce the multi threads work
of ffmpeg? I want to study it.I have read the code, and know some thing.But
the function "ff_thread_get_buffer", I read some documents about it and
know it is a callback function,is it right?

Now I want to implement that one thread just decode use dxva2,and primary
just read the result and to do other things.I think it can make the primary
thread and decode thread work paiallely, and improvment the speed of
ffmpeg.exe.So I should the thread architecture of ffmpeg.

Thanks
Best regards
Wei

2012/6/19 Roger Pack <rogerdpack2 at gmail.com>

> > I seem find the problem,but I don't know how to fix it.
> > I create dxva2 object for every thread.But when I run it,I don't know how
> > to make the dxva2 object to communicate with each other.For example:
> >
> > Thread 0 has decoded a frame,then next frame I use thread 1,but the
> thread
> > 1 maybe use preframe to decode.I don't know how to fix it.
>
>
> So you've implemented your own codec that uses dxva2? That's cool.
> You should submit it to the dev team :)
>
> Anyway, so your problem is that thread 1 must use data created from
> thread 0?  That sounds single threaded to me [?]
>
> Does anybody know where to read up on how to implement threading
> within a codec?  I know there's either slice based or frame based, but
> I don't see even that mentioned in documentation anywhere...
> -r
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list