According to the header it is an array of int16_t, yet it is declared as
uint16_t. Fix this by using int16_t troughout and convert the definition
to use values in the range of int16_t.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This change ensures that the linker can drop adpcm_data.o if no decoder
that actually uses anything from there is enabled.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This is to avoid unused variables warnings after the code for
the disabled encoders has been #if'ed away which will happen in
a subsequent commit.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The child_class_next API relied on different (de)muxers to use
different AVClasses; yet this API has been replaced by
child_class_iterate.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The adpcm_argo encoder does not use the data from adpcm_data.c directly;
instead it shares a function with the adpcm_argo decoder that is in
adpcm.c. When all the ADPCM decoders and the adpcm_argo encoder are
disabled, adpcm.c is not compiled; yet the code in adpcmenc.c calling
said function from adpcm.c is still present, leading to link errors.
Fix this by disabling the code belonging to disabled codecs in
adpcmenc.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This is to avoid unused variables warnings if the code for disabled
encoders is #if'ed away which will happen in a subsequent commit.
In case of buf it also avoids shadowing.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
In cases where the execution inside the function execute_model_ov fails,
the OVRequestItem must be pushed back to the request_queue before returning
the error. In case pushing back fails, release the allocated memory.
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Fixes: floating point division by 0
Fixes: -nan is outside the range of representable values of type 'int'
Fixes: Ticket8307
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: 1.04064e+10 is outside the range of representable values of type 'int'
Fixes: Ticket 8279
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Read rate enforcement delayed till first decoded frame is obtained, to
speed up init of output streams.
Thanks to Linjie Fu <linjie.justin.fu@gmail.com> for the initial patch.
Since b492fbcc6e, the DSD tables are
always initialized at runtime, so merge the dsd_tablegen.h header
into dsd.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
It does not modify anything; it only returns a value, so it fulfills
the requirements for av_pure.
The deeper rationale behind this change is that this function is called
quite often inside arguments to FFMIN which may lead to two calls to it;
declaring this function as av_pure allows the compiler to optimize the
second call away.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Currently every symbol (with external linkage) that starts with "av" is
exported. Yet libaom-av1 has lots of functions that are not meant to be
exported and start with "av1_" (I counted 1236); and libvpx has
average_split_mvs. These functions are exported if one links these
libraries statically into a shared libavcodec.so.
Solve this by tightening the whitelist to "av_", "avcodec_", "avpriv_"
and (as a special-case) "avsubtitle_free".
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Teach AV_HWDEVICE_TYPE_VIDEOTOOLBOX to be able to create AVFrames of type
AV_PIX_FMT_VIDEOTOOLBOX. This can be used to hwupload a regular AVFrame
into its CVPixelBuffer equivalent.
ffmpeg -init_hw_device videotoolbox -f lavfi -i color=black:640x480 -vf hwupload -c:v h264_videotoolbox -f null -y /dev/null
Signed-off-by: Aman Karmani <aman@tmm1.net>
The field is a standard field, yet we were loading it as if it was
a quadword. This worked for forward transforms by chance, but broke
when the transform was inverse.
checkasm couldn't catch that because we only test forward transforms,
which are identical to inverse transforms but with a different revtab.
if input start time is not 0 -t is inaccurate doing stream copy,
will record extra duration according to input start time.
it should base on following cases:
input video start time from 60s, duration is 300s,
1. stream copy:
ffmpeg -ss 40 -t 60 -i in.mp4 -c copy -y out.mp4
open_input_file() will seek to 100 and set ts_offset to -100,
process_input() will offset pkt->pts with ts_offset to make it 0,
so when do_streamcopy() with -t, exits when ist->pts >= recording_time.
2. stream copy with -copyts:
ffmpeg -ss 40 -t 60 -copyts -i in.mp4 -c copy -y out.mp4
open_input_file() will seek to 100 and set ts_offset to 0,
process_input() will keep raw pkt->pts as ts_offset is 0,
so when do_streamcopy() with -t, exits when
ist->pts >= (recording_time+f->start_time+f->ctx->start_time).
3. stream copy with -copyts -start_at_zero:
ffmpeg -ss 40 -t 60 -copyts -start_at_zero -i in.mp4 -c copy -y out.mp4
open_input_file() will seek to 120 and set ts_offset to -60 as start_to_zero option,
process_input() will offset pkt->pts with input file start time,
so when do_streamcopy() with -t, exits when ist->pts >= (recording_time+f->start_time).
0 60 40 60 360
|_______|_____|_______|_______________________|
start -ss -t
This fixes ticket #9141.
Signed-off-by: Shiwang.Xie <shiwang.xie666@outlook.com>