[FFmpeg-devel] [RFC] [PATCH] huffyuvenc, multithread and context=1

Michael Niedermayer michaelni at gmx.at
Fri Jun 13 04:07:18 CEST 2014

On Fri, Jun 13, 2014 at 12:56:30AM +0200, Christophe Gisquet wrote:
> Hi,
> 2014-06-12 0:18 GMT+02:00 Michael Niedermayer <michaelni at gmx.at>:
> > i think adding a codec private option like
> > -non_deterministic 1
> > is safer than using the flags in terms of compatibility
> > it also would produce an error if the option is used with a encoder
> > which doesnt support it
> I'm unsatisfied of the result I got (cf. patch). My knowledge of the
> various APIs is too limited for that, and the main issue it seems is
> that I need to set threading from huffyuvenc, but I can only hack my
> way through frame_thread_encoder.c

well, i dont know of a simpler solution

but if you want to move the check into huffyuvenc
one way would be to add a new error code for "multithreading
unsupported" similar to AVERROR_EXPERIMENTAL
and return this from huffyuvs encode_init()
and check for it after the avcodec_open2() call in ff_frame_thread_encoder_init()
and then fall back to like the warning case thats above

i suspect that will be more lines of code but could avoid all the
codec specific checks in frame_thread_encoder

another option would be a new callback in AVCodec 

either way the patch isnt that bad, i can apply it if you want?


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140613/9471f389/attachment.asc>

More information about the ffmpeg-devel mailing list