Using threaded decoding by default breaks backward compatibility if
AVHWAccel is used or if an appliction sets threadunsafe callbacks.
Avconv and avplay still use -threads auto if not specified.
Adds a new member to MpegEncContext to hold the number of used slice
contexts. Fixes segfaults with '-threads 17 -thread_type slice' and
fate-vsynth{1,2}-mpeg{2,4}thread{,_ilace} with --disable-pthreads.
A new field, AVCodecContext.internal is used to hold a new struct
AVCodecInternal, which has private fields that are not codec-specific and are
used by general libavcodec functions.
Moved internal_buffer, internal_buffer_count, and is_copy.
libavcodec/options.c:583: warning: assignment discards qualifiers from pointer
target type
libavcodec/options.c:589: warning: initialization discards qualifiers from
pointer target type
This allows it to use the defaults specified by preset/tune,
without overwriting it with the default value from the
AVCodecContext field.
Signed-off-by: Martin Storsjö <martin@martin.st>
This function used to set codec_type. With the current fallback
implementation based on avcodec_get_context_defaults3, codec_type
won't be set to the value passed in, but will be set to
AVMEDIA_TYPE_UNKNOWN. Legacy callers of this function might expect
this field to be set to the value passed in.
Signed-off-by: Martin Storsjö <martin@martin.st>
This will allow the caller to enumerate child contexts in a generic way
and since the API is recursive, it also allows for deeper nesting (e.g.
AVFormatContext->AVIOContext->URLContext)
This will also allow the new setting/reading API to transparently apply
to children contexts.
It's a hack which was created to allow for multiple options with
different defaults to refer to same field (e.g. 'b' vs 'ab'). There is
no need for it anymore.
Specifically: gop_size, max_b_frames, scenechange_threshold, qmin, qmax,
max_qdiff, qblur, qcompress and refs.
Change their default values to -1 and only use them if the user
explicitly set them. Otherwise x264 defaults are used.
Move setting those options after x264_param_default_preset(), so they
don't get overwritten by it.