Commit Graph

101444 Commits

Author SHA1 Message Date
Guo, Yejun ae4f6379d6 avfilter/vf_vif.c: fix build warning for [-Wmain]
src/libavfilter/vf_vif.c: In function ‘process_frame’:
src/libavfilter/vf_vif.c:542:20: warning: ‘main’ is usually a function [-Wmain]
     AVFrame *out, *main = NULL, *ref = NULL;
                    ^~~~

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-25 11:43:56 +01:00
Guo, Yejun ac6dd87cd1 avfilter/vf_ssim.c: fix build warning for [-Wmain]
The build warning message:
src/libavfilter/vf_ssim.c: In function ‘ssim_plane_16bit’:
src/libavfilter/vf_ssim.c:246:24: warning: ‘main’ is usually a function [-Wmain]
         const uint8_t *main = td->main_data[c];
                        ^~~~
src/libavfilter/vf_ssim.c: In function ‘ssim_plane’:
src/libavfilter/vf_ssim.c:289:24: warning: ‘main’ is usually a function [-Wmain]
         const uint8_t *main = td->main_data[c];
                        ^~~~

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-25 11:43:56 +01:00
Anton Khirnov d3d99a0a06 lavc/lscrdec: use ff_reget_buffer()
It is simpler and more efficient.

Suggested-by: James Almer <jamrial@gmail.com>
2021-02-24 17:16:46 +01:00
Anton Khirnov eed2125f3f tests/fate/apng: add a test for APNG_DISPOSE_OP_PREVIOUS 2021-02-24 17:16:46 +01:00
Anton Khirnov 5663301560 pngdec: fix and simplify apng reference handling
Current code is very confused and confusing. It uses two different
reference frames - "previous" and "last" - when only one is really
necessary. It also confuses the two, leading to incorrect output with
APNG_DISPOSE_OP_PREVIOUS mode.

Fixes #9017.
2021-02-24 17:16:46 +01:00
Anton Khirnov 087359ad85 lavc/lscrdec: drop unapplicable private capabilities
FF_CODEC_CAP_ALLOCATE_PROGRESS makes no sense because the decoder does
not support frame threading.
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM makes no sense because the decoder
does not handle skip_frame.
2021-02-24 17:16:46 +01:00
Anton Khirnov 3a5b857d4c lavc: split LSCR decoder out of PNG decoder
It shares very little code with pngdec, so keeping them together only
makes the code harder to read.
2021-02-24 17:16:46 +01:00
Anton Khirnov 6853bdbdd2 tests: add a test for LSCR 2021-02-24 17:16:46 +01:00
Paul B Mahol 33025ab976 avcodec/cfhdenc: do not try to encode junk 2021-02-24 17:14:03 +01:00
Paul B Mahol fbfa78508b avcodec/cfhdenc: add padding to each decomposition 2021-02-24 17:14:03 +01:00
Paul B Mahol d69f4be1c6 avcodec/cfhdenc: refactor DSP code for CFHD encoder
This is needed to implement x86 SIMD.
2021-02-24 17:14:03 +01:00
Paul B Mahol 767d3f7dcf avcodec/exr: simplify piz decompression
Note that >32 codes are no longer supported, give
proper error code if such scenario ever happens.
2021-02-24 17:10:14 +01:00
Paul B Mahol 8213f0a7f7 avformat/vpk: check that samples_per_block is > 0
Fixes floating point exception.
2021-02-24 17:04:40 +01:00
James Almer 45a2902976 avutil/buffer: free all pooled buffers immediately after uninitializing the pool
No buffer will be fetched from the pool after it's uninitialized, so there's
no benefit from waiting until every single buffer has been returned to it
before freeing them all.
This should free some memory in certain scenarios, which can be beneficial in
low memory systems.

Based on a patch by Jonas Karlman.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-24 10:45:30 -03:00
Andreas Rheinhardt b913a4e18d avcodec/rv34data: Remove rv34_dquant_tab
It is unused and coincides with ff_modified_quant_tab.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:52:40 +01:00
Andreas Rheinhardt 585b764f95 avcodec/x86/constants: Remove unused ff_pw_17
Unused since 80944df720.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:49:03 +01:00
Andreas Rheinhardt c23a5523b5 swscale/x86/swscale: Remove unused ASM constants
The last user of g15Mask, r15Mask, g16Mask and r16Mask was disabled
in 77a416e8aa and finally removed in
36e8de07ed62609df45d064b56501e3084d25723; b15Mask and b16Mask were
apparently always unused (except for in_asm_used_var_warning_killer,
a function that only existed to make the compiler not optimize ASM
constants away).
w10 is unused since d604bab901, w02
since ef423a6618.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:47:54 +01:00
Andreas Rheinhardt aad597a93c swscale/x86/rgb2rgb: Remove unused ASM constants
mask24hh etc. are unused since f099fbf5f3,
mask32b and mask32r since 296609f859,
mask32g since b38d487466 and mask32 since
f8a138be52.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:45:17 +01:00
Andreas Rheinhardt 49db6e4b4e swscale/x86/yuv2rgb: Remove unused ASM constants
mmx_grnmask is unused since 531f97b0c3,
the other constants since e934194b6a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:43:14 +01:00
Andreas Rheinhardt f529793490 avcodec/celp_math: Disable unused function
The code using ff_exp2 (namely ff_acelp_decode_gain_code) use it only if
G729_BITEXACT is defined. So disable it if not.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:40:42 +01:00
Andreas Rheinhardt 7825cc392a avcodec/x86/diracdsp_init: Reuse macro
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:38:12 +01:00
Andreas Rheinhardt 0f317eb8e7 avcodec/x86/diracdsp_init: Simplify macro
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:36:13 +01:00
Andreas Rheinhardt 68bd6c7dac avcodec/x86/diracdsp_init: Make functions only used here static
This allowed to remove forward declarations. Because compilers expect
declarations for all functions they encounter even when it is within
blocks disabled via "if (0 && foo)", one has to use a real #if in
ff_diracdsp_init_x86.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 09:17:40 +01:00
Andreas Rheinhardt 3a80b1ac12 avcodec/x86/diracdsp_init: Remove unused MMX functions
Unused since a1f3b18bf5, yet as nonstatic
functions the compiler can't detect this, so that these functions aren't
stripped and no warning is emitted.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:58:57 +01:00
Andreas Rheinhardt 559a26600a avcodec/acelp_vectors: Remove unused ff_fc_2pulses_9bits_track1
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:57:17 +01:00
Andreas Rheinhardt 790be3125d avcodec/acelp_pitch_delay: Inline small functions only used once
ff_acelp_decode_8bit_to_1st_delay3, ff_acelp_decode_4bit_to_2nd_delay3
and ff_acelp_decode_5_6_bit_to_2nd_delay3 are all only used once (by
g729dec) whereas ff_acelp_decode_9bit_to_1st_delay6 and
ff_acelp_decode_6bit_to_2nd_delay6 are completely unused; with the
possible exception of ff_acelp_decode_4bit_to_2nd_delay3, these
functions are so small that inlining them is appropriate; and as long as
ff_acelp_decode_4bit_to_2nd_delay3 is only called once, this is also
true for it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:56:12 +01:00
Andreas Rheinhardt bce9c5e276 avcodec/rangecoder: Move ff_rac_check_termination to tests/rangecoder.c
It is only used there.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:53:43 +01:00
Andreas Rheinhardt f729dee615 avcodec/mqcenc: Remove unused ff_mqc_length
Unused since 4624656797.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:53:22 +01:00
Andreas Rheinhardt 4c8d9b1d09 avcodec/ac3tab: Remove unused ff_eac3_default_chmap
Added in 0c79b1402a to use it
in a function that was never used and was itself removed in
676f1f533e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:47:11 +01:00
Andreas Rheinhardt 6f3fe7b2c0 avformat/asf: Move ff_asf_audio_conceal_none to its only user
It is only used inside code guarded by #ifdef DEBUG, i.e. it is normally
unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:17:50 +01:00
Andreas Rheinhardt 3bf07b1a2d avcodec/bitstream: Rewrite code to avoid triggering compiler warning
Clang infers from the existence of a default case that said case can be
taken. In case of libavcodec/bitstream.c said default case consisted of
an av_assert1 that evaluates to nothing in case of the ordinary assert
level. In this case (that doesn't happen) a variable wouldn't be
initialized, so Clang emitted Wsometimes-uninitialized warnings.
Solve this by making sure that the default path also initializes
the aforementioned variable.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 07:50:56 +01:00
Andreas Rheinhardt 1c9e53d70b avcodec/movtextenc: Check for too many styles
The counter for the number of styles is written on two bytes, ergo
anything > UINT16_MAX is invalid. This also fixes a compiler warning
because of a tautologically true check on 64bit systems.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 07:50:39 +01:00
Andreas Rheinhardt 78d5e1c653 avformat/Makefile: Remove unnecessary dependencies on vocdec
Commit 0d1229f1d2 factored the main part
of the voc demuxer's read_packet function out; yet when this Libav
commit was merged in f99195d56f, the
dependency of the other users of this function on vocdec.o was
unnecessarily kept. This commit fixes this.

While just at it, also disable the data only used by the voc demuxer
and muxer in voc.c if both of them are disabled.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 21:12:26 +01:00
Paul B Mahol d7f10b2497 avcodec/exrenc: use correct type for actual_size as argument for zlib 2021-02-23 12:38:57 +01:00
Paul B Mahol 081cbe6961 avformat/imx: remove unused header 2021-02-23 11:57:51 +01:00
Andreas Rheinhardt ad58113afe avcodec/tiff_data: Move data to its only user
tiff.c is the only user of the data from tiff_data.c (the dependency of
the tiff encoder of it is spurious). Therefore this commit moves all the
data from tiff_data.c to tiff_data.h (which is only included by tiff.c)
and makes the objects declared therein static.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 926c1bf85c avformat/wavdec: Share wav and w64 options
The options of the w64 demuxer are a proper subset of the options for
the wav demuxer, making it possible to reuse a part of the options for
the wav demuxer for the w64 demuxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 1df1083b6c avformat/wav: Deduplicate codec tags lists
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 09e6d3a026 avformat/avienc, wtvenc: Deduplicate codec tags list
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 08b4a25ff9 avformat/aiff: Deduplicate codec tags and codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 697066af01 avformat/ast: Deduplicate codec tags lists
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt a442670a32 avformat/movenc: Deduplicate codec tags lists
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 22d8010f13 avformat/oma: Move stuff only used by demuxer to demuxer
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:26:21 +01:00
Andreas Rheinhardt 81a86c7e1e avformat/oma: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:24:00 +01:00
Andreas Rheinhardt cccb7cf44e avformat/rso: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:24:00 +01:00
Andreas Rheinhardt e772e253cb avformat/voc: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:23:29 +01:00
Andreas Rheinhardt ef3224c911 avformat/caf: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt c50c85911e avformat/asfenc: Deduplicate codec tags lists
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt 6cb6ee754b avformat/au: Deduplicate codec_tag lists
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt 20ff7b1f16 avformat/isom: Remove outcommented function
There is another ff_mov_read_chan in mov_chan.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00