summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/exr: handle case when |im - IM| == 1 for huff compressionPaul B Mahol2021-02-28
|
* avcodec/x86: add cfhdenc SIMDPaul B Mahol2021-02-27
|
* avcodec/options: deprecate avcodec_get_frame_class()James Almer2021-02-27
| | | | | | | | AVFrame hasn't been a struct defined in libavcodec for a decade now, when it was moved to libavutil. Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/avrndec: remove max_lowres valueJames Almer2021-02-27
| | | | | | The decoder does not support lowres since 9e4225cf7f. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/exrenc: add half-float supportPaul B Mahol2021-02-27
|
* avcodec: add missing FF_API_OLD_ENCDEC wrappers to xmm clobber functionsJames Almer2021-02-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Add missing FF_API define for libavcodec pix fmt APIAndreas Rheinhardt2021-02-26
| | | | | | | | | | | | | | | avcodec_find_best_pix_fmt2 has been deprecated and replaced by avcodec_find_best_pix_fmt_of_2 in 2a54ae9df8cbc1717b3929222ac75f384e2ff240. avcodec_find_best_pix_fmt_of_2 and avcodec_get_pix_fmt_loss meanwhile were deprecated in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54 when these functions were de facto moved to libavutil; this has been mentioned in APIchanges in f7a1c5e4d2294a8970ede7f6deb2fe0a64e202a5. Yet the attribute_deprecated was never set for the latter two functions and they were not wrapped in an FF_API define. This commit does this. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/imx: use ff_reget_buffer()Paul B Mahol2021-02-25
| | | | | Also flush internal stuff upon seeking. This codec is not intra only.
* avcodec/avcodec: Add missing deprecation to AVCodecParser.nextAndreas Rheinhardt2021-02-25
| | | | | | | | | | | The whole old next API has been deprecated in commit 7e8eba2d8755962d9dca5eade57bf8f591a73c0c, yet deprecating the next pointer has been forgotten (the next pointers of other structures are below the public API delimiter, but such a delimiter doesn't exist for AVCodecParser). Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: unschedule removing some functions with FF_API_COPY_CONTEXTJames Almer2021-02-25
| | | | | | | | These functions were never deprecated. The merge from commit 6988cf2969 included them by mistake. Found-by: mkver Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "avcodec/options: add missing FF_API_COPY_CONTEXT checks"James Almer2021-02-25
| | | | | | | | | | This reverts commit 0191f2d29c2a62b8699ac75f09708187e943814c. These functions were never deprecated. The merge from commit 6988cf2969 included them by mistake. Found-by: mkver Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/gifenc: Only write frame palette entries that actually usedDerek Buitenhuis2021-02-25
| | | | | | | | | | | | | | | | GIF palette entries are not compressed, and writing 256 entries, which can be up to every frame, uses a significant amount of space, especially in extreme cases, where palettes can be very small. Example, first six seconds of Tears of Steel, palette generated with libimagequant, 320x240 resolution, and with transparency optimization + per frame palette: * Before patch: 186765 bytes * After patch: 77895 bytes Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/gifenc: Add global_palette optionDerek Buitenhuis2021-02-25
| | | | | | | | | | | | | This option will disable the writing of the global palette in global GIF header if it is set to 0, causing only the frame-level palette to ever be written. This will be useful later on when further frame-level palette optimizations are introduced. The default is 1, which maintains current default behavior. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Handle AVID MJPEG streams directly in the MJPEG decoder.Anton Khirnov2021-02-25
| | | | | | | | | | | | | | | | | | | | AVID streams - currently handled by the AVRN decoder - can be (depending on extradata contents) either MJPEG or raw video. To decode the MJPEG variant, the AVRN decoder currently instantiates a MJPEG decoder internally and forwards decoded frames to the caller (possibly after cropping them). This is suboptimal, because the AVRN decoder does not forward all the features of the internal MJPEG decoder, such as direct rendering. Handling such forwarding in a full and generic manner would be quite hard, so it is simpler to just handle those streams in the MJPEG decoder directly. The AVRN decoder, which now handles only the raw streams, can now be marked as supporting direct rendering. This also removes the last remaining internal use of the obsolete decoding API.
* lavc/lscrdec: use ff_reget_buffer()Anton Khirnov2021-02-24
| | | | | | It is simpler and more efficient. Suggested-by: James Almer <jamrial@gmail.com>
* pngdec: fix and simplify apng reference handlingAnton Khirnov2021-02-24
| | | | | | | | | 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.
* lavc/lscrdec: drop unapplicable private capabilitiesAnton Khirnov2021-02-24
| | | | | | | 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.
* lavc: split LSCR decoder out of PNG decoderAnton Khirnov2021-02-24
| | | | | It shares very little code with pngdec, so keeping them together only makes the code harder to read.
* avcodec/cfhdenc: do not try to encode junkPaul B Mahol2021-02-24
|
* avcodec/cfhdenc: add padding to each decompositionPaul B Mahol2021-02-24
|
* avcodec/cfhdenc: refactor DSP code for CFHD encoderPaul B Mahol2021-02-24
| | | | This is needed to implement x86 SIMD.
* avcodec/exr: simplify piz decompressionPaul B Mahol2021-02-24
| | | | | Note that >32 codes are no longer supported, give proper error code if such scenario ever happens.
* avcodec/rv34data: Remove rv34_dquant_tabAndreas Rheinhardt2021-02-24
| | | | | | It is unused and coincides with ff_modified_quant_tab. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/constants: Remove unused ff_pw_17Andreas Rheinhardt2021-02-24
| | | | | | Unused since 80944df720da98d6e5ee0e355db5814735914ec9. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/celp_math: Disable unused functionAndreas Rheinhardt2021-02-24
| | | | | | | 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>
* avcodec/x86/diracdsp_init: Reuse macroAndreas Rheinhardt2021-02-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/diracdsp_init: Simplify macroAndreas Rheinhardt2021-02-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/diracdsp_init: Make functions only used here staticAndreas Rheinhardt2021-02-24
| | | | | | | | | 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>
* avcodec/x86/diracdsp_init: Remove unused MMX functionsAndreas Rheinhardt2021-02-24
| | | | | | | | Unused since a1f3b18bf55f106c974eacb1dc831be4d2bd5277, 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>
* avcodec/acelp_vectors: Remove unused ff_fc_2pulses_9bits_track1Andreas Rheinhardt2021-02-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/acelp_pitch_delay: Inline small functions only used onceAndreas Rheinhardt2021-02-24
| | | | | | | | | | | | | 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>
* avcodec/rangecoder: Move ff_rac_check_termination to tests/rangecoder.cAndreas Rheinhardt2021-02-24
| | | | | | It is only used there. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mqcenc: Remove unused ff_mqc_lengthAndreas Rheinhardt2021-02-24
| | | | | | Unused since 4624656797b667eb6405186682eb04e74dfd90fd. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ac3tab: Remove unused ff_eac3_default_chmapAndreas Rheinhardt2021-02-24
| | | | | | | | Added in 0c79b1402a48a99f32435a0f5ad2364c58c6fcf3 to use it in a function that was never used and was itself removed in 676f1f533e2c2960d81784188592a066b9ff1c3d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/bitstream: Rewrite code to avoid triggering compiler warningAndreas Rheinhardt2021-02-24
| | | | | | | | | | | | | 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>
* avcodec/movtextenc: Check for too many stylesAndreas Rheinhardt2021-02-24
| | | | | | | | | 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>
* avcodec/exrenc: use correct type for actual_size as argument for zlibPaul B Mahol2021-02-23
|
* avcodec/tiff_data: Move data to its only userAndreas Rheinhardt2021-02-23
| | | | | | | | | 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>
* avformat/isom: Split movaudio/movvideo tags off into a separate fileAndreas Rheinhardt2021-02-23
| | | | | | | | | The NUT and avi demuxers only need ff_codec_movvideo_tags and so this removes a dependency on the rest of isom.c as well as on mpeg4audio.c (which isom depends on); it is similar for the Matroska demuxer and muxers, except that the mpeg4audio.c dependency can't be avoided. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Remove outdated dependency of FLV demuxer on mpeg4audioAndreas Rheinhardt2021-02-23
| | | | | | | Unneeded since f96a653184e63cea91e08ea75ae60d309e431f40 and b2bb09bcc330156e9d79d7ddfa59f9c5d05ca149. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg4audio: Use proper logcontext for loggingAndreas Rheinhardt2021-02-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/scpr3: Avoid code duplication when updating modelsAndreas Rheinhardt2021-02-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Don't build mjpegenc_huffman unconditionallyAndreas Rheinhardt2021-02-23
| | | | | | | Only the mjpeg and amv encoders as well as its testprogram actually need it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mjpegenc_common: Move stuff only used by mjpegenc.c to itAndreas Rheinhardt2021-02-23
| | | | | | | | This allows to make ff_init_uni_ac_vlc static; ff_mjpeg_encode_picture_frame has also been made static, but it could always have been made static. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/jpegtables: Move ff_mjpeg_build_huffman_codes to mjpegenc_commonAndreas Rheinhardt2021-02-23
| | | | | | | Since g2meet.c doesn't use it any more, only encoders use it and the place for their common code is mjpegenc_common.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/g2meet, mjpegdec: Factor out common VLC initialization codeAndreas Rheinhardt2021-02-23
| | | | | | | | | While just at it, remove the nb_codes parameter: It is redundant (the number of codes is implicitly contained in the array containing how many entries of a specific size there are) and for this reason it might even be wrong, so it is better to check what is actually used instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Remove redundant mjpegdec dependency from tiff decoderAndreas Rheinhardt2021-02-23
| | | | | | | | The MJPEG decoder is already activated by configure whenever the tiff decoder is selected; ergo it is unnecessary to add a dependency in the Makefile. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* configure, libavcodec/Makefile: Fix avrn dependenciesAndreas Rheinhardt2021-02-23
| | | | | | | | | | | The avrn decoder actually only needs one thing: The MJPEG decoder. Instead the Makefile made it compile mjpegdec and configure required some of the prerequisites of the MJPEG decoder (exif and jpegtables). Even if all the prerequisites of the MJPEG decoder were required, it would still not make the MJPEG decoder usable, because for that the MJPEG decoder needs to be in the list of codecs in codec_list.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avrndec: Remove unnecessary headersAndreas Rheinhardt2021-02-23
| | | | | | | The avrn decoder does not use any internals of the MJPEG decoder since e0031ca29a471c4a540ba2e01b3f81af03ef757b. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Remove spurios dcaenc dependencyAndreas Rheinhardt2021-02-23
| | | | | | It does not need dca.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>