a thread count of 0 is treated the same as 1, use av_cpu_count() to get
the correct thread count when auto threads is requested.
this matches the fix in libvpxenc:
27df34bf1f avcodec/libvpxenc: fix setting amount of threads used for encoding
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
Add error handle if av_image_fill_pointers fail.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
-1 will be map to error number "EPERM", and will be map to the error
message like "Error while decoding stream #0:0: Operation not permitted",
it's a strange error message when debug update_frame_pool fail,
now only return the error code from av_image_fill_pointers in case
of av_image_fill_pointers failure.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
In fmp4 & sub-range mode, the output's duration always smaller than expected,
because the size of the last #EXT-X-BYTERANGE is too small.
Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
The size of init.mp4 is zero in fmp4 mode,
when the input duraton smaller than the expected segment time.
fix ticket: 7166
Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
In fmp4 mode, the duration of the second m4s segment is
unusually smaller than the expected segment time.
Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This improves decoding speed of keyframes
Fixes: Timeout (102->27sec)
Fixes: 9642/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-6676767875006464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Adds an option to specify the number of tile rows and columns, then uses
a uniform tiling if possible and otherwise a fixed tiling with equal-sized
tiles to fill the frame.
Also adds -tile-columns and -tile-rows options to make tilings with
power-of-two numbers of tiles, matching the behaviour of the libvpx/VP9
encoder.
This is needed because of 32bit float formats (which are difficult to
store in 16bits)
This also fixes undefined behavior found by fate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
found_ref is not a single value in the bitstream. Fixes parsing files with
frame size changes.
Based on code from cbs_vp9.
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
This adds common code to query driver support and set appropriate
address/size information for each slice. It only supports rectangular
slices for now, since that is the most common use-case.
This error isn't particularly helpful as checking for mixed IDR/non-IDR
NALUs would need to be done at a higher level to actually be accurate.
Removing the error allows an API user to send individual slice NALUs
(i.e. incomplete frames) so they can take advantage of slice
threading. The ticket which this error was added for (#4408) no
longer segfaults after removing this error (as the bug was likely
fixed more properly elsewhere).
Libx264 uses strtok which is not thread safe. Strtok is used in
x264_param_default_preset in param_apply_tune in x264/common/base.c.
Therefore the flag must be removed.
x264 fixed the issue, once the fix is pushed to stable, an #if can be added
to re-enable the flag based on X264_BUILD number.
Fixes ticket #7446.
Signed-off-by: Marton Balint <cus@passwd.hu>