summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/svq1enc: Move initializing DSP out of svq1enc.cAndreas Rheinhardt2024-03-02
| | | | | | | | | | | | Otherwise svq1enc.o gets pulled in by the svq1encdsp checkasm test and it in turn pulls the rest of lavc in. Besides being bad size-wise this also has the downside that it pulls in avpriv_(cga|vga16)_font from libavutil which are marked as being imported from another library when building libavcodec as a DLL and this breaks checkasm because it links both lavc and lavu statically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacenc: Move initializing DSP out of aacenc.cAndreas Rheinhardt2024-03-02
| | | | | | | | | | | | Otherwise aacenc.o gets pulled in by the aacencdsp checkasm test and it in turn pulls the rest of lavc in. Besides being bad size-wise this also has the downside that it pulls in avpriv_(cga|vga16)_font from libavutil which are marked as being imported from another library when building libavcodec as a DLL and this breaks checkasm because it links both lavc and lavu statically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/bsf/mp3_header_decompress: Remove BSFAndreas Rheinhardt2024-03-02
| | | | | | | | | | | | | | | | | This BSF is supposed to be used in conjunction with mp3_header_compress, which has been removed more than ten years ago in commit c6080d89009056530119ab794ad02e4d515c7754. It mangled the headers by removing the CRC field as well as fields that are supposed to stay constant for the entirety of a stream (which are put into extradata). This made these files unplayable; they need to be decompressed with the BSF first (which does not happen automatically). Even in this case the CRC does not get restored. I am not aware that such compressed files exist at all; therefore this commit removes the BSF completely. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/encode: Fix default setting of bits_per_raw_sampleZhao Zhili2024-03-01
| | | | | | | bits_per_raw_sample doesn't always match size of AV_SAMPLE_FMT_, e.g., S24. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/mss[12]: Cleanup generically on init failureAndreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/decode: Improve validity check a bitAndreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/refstruct: Don't use STRIDE_ALIGN for alignmentAndreas Rheinhardt2024-03-01
| | | | | | | | | | | | | | It was always intended that the buffers returned by RefStruct shall have the same alignment guarantees as the buffers returned by av_malloc(); said alignment depends upon the arch and the enabled instruction set and the code used STRIDE_ALIGN as a proxy for this. Yet since 7945d30e91b96d2f4f5b612048169087d214d41e there is a better way to get av_malloc's alignment: ALIGN_64 in mem_internal.h. So use this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxeve: Use av_dict_iterate()Andreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Fix "if (ret = ff_foo() < 0)" precedence problemAndreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Improve included headers a bitAndreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Use CODEC_LONG_NAME()Andreas Rheinhardt2024-03-01
| | | | | | Brings the length of the line down to less than 80 chars. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Remove useless AVClassAndreas Rheinhardt2024-03-01
| | | | | | This decoder does not have options. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Reindent after the previous commitAndreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Deduplicate codeAndreas Rheinhardt2024-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Avoid cloning AVPacketAndreas Rheinhardt2024-03-01
| | | | | | | Cloning a packet whose source is going to be unreferenced immediately afterwards is wasteful. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Set AV_CODEC_CAP_DR1Andreas Rheinhardt2024-03-01
| | | | | | | | This decoder uses av_image_copy() to copy decoded images to buffers obtained via ff_get_buffer(); ergo it can handle user-provided buffers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libxevd: Remove FF_CODEC_CAP_SETS_PKT_DTS capAndreas Rheinhardt2024-03-01
| | | | | | | | This decoder implements the receive_frame API; such decoders always have to set the pkt_dts field themselves and the avcodec test checks for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/Makefile: Add missing AV1 decoder->av1_parse.o dependencyAndreas Rheinhardt2024-03-01
| | | | | | Needed for ff_av1_framerate(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/av1dec: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAMJames Almer2024-02-29
| | | | | | | Fixes errors when opening streams with no extradata (like those from raw OBU sources). It also calls get_format() on new Sequence Headers when required. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/intrax8: Fix assertAndreas Rheinhardt2024-02-29
| | | | | | | | | | | | | | | | | | | | | | Commit 900ce6f8c3526f27173057bb955f54f4f4f41246 replaced IntraX8Context.ac_vlc by IntraX8Context.ac_vlc_table, but forgot to update an av_assert2()*. cf7ed01938a4d8b2ccd28f1fadacd79103e54eed then replaced this with a check for j_ac_vlc[mode], but this makes no sense as j_ac_vlc is of type const VLCElem [2][2][8][]. Worse yet, mode can be up to three and then j_ac_vlc[mode] is undefined behaviour. This happened during the wmv8-x8intra FATE test. *: Since 84f16bb5e68dc47eca4dc96b3391c58471cd7328 config.h was no longer auto-included in avassert.h and this disabled av_assert1() and av_assert2() in files where config.h has not been included before the inclusion of avassert.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/qsvenc: update the selection of bitrate control methodHaihao Xiang2024-02-29
| | | | | | The default method is changed to CQP Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/av1dec: Return error for unsupported tile list OBUFei Wang2024-02-29
| | | | | | Otherwise decoding maybe successful but output result is incorrect. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/av1dec: Move message of OBU info back to the beginningFei Wang2024-02-29
| | | | | | | So that can show OBU info even it doesn't have decomposed content. And add OBU content status into the message. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/aarch64/hevc: add luma deblock NEONJ. Dekker2024-02-28
| | | | | | | | | | | Benched using single-threaded full decode on an Ampere Altra. Bpp Before After Speedup 8 73,3s 65,2s 1.124x 10 114,2s 104,0s 1.098x 12 125,8s 115,7s 1.087x Signed-off-by: J. Dekker <jdek@itanimul.li>
* avcodec/libsvtav1: send the EOS signal without a one frame delay to allow ↵Cosmin Stejerean2024-02-27
| | | | | | | | for the library to operate in a low-delay mode Co-authored-by: Amir Naghdinezhad <amir.naghdinezhad@intel.com> Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dxvenc: Use proper alignment, write endian-independent outputAndreas Rheinhardt2024-02-27
| | | | | | | | | Fixes the dxv3enc-dxt1 FATE test with UBSan and on big-endian hardware. Reviewed-by: James Almer <jamrial@gmail.com> Tested-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/dnxhdenc: add ff_dnxhdenc_initsunyuechi2024-02-27
| | | | | | This is for clarity and use in testing, consistent with other parts of the code. Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
* lavc/me_cmp: R-V V nssesunyuechi2024-02-27
| | | | | | | | | | C908: nsse_0_c: 1990.0 nsse_0_rvv_i32: 572.0 nsse_1_c: 910.0 nsse_1_rvv_i32: 456.0 Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
* avcodec/aac: Split ChannelElement in decoder and encoder structsAndreas Rheinhardt2024-02-27
| | | | | | | | | | | | | The AAC decoders share no common code with the AAC encoder, so they are not restricted to using the same structures. This implies that one can use different structs for each component and remove elements not used by the decoders/ the encoder. This leads to quite sizeable savings: sizeof(ChannelElement) for the encoder went down to 134432B here from 547552B; for the decoder it went down to 512800B. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/sbr: Remove unused AACDecContext* parameter from sbr_lf_gen_mipsAndreas Rheinhardt2024-02-27
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacps: Inline ff_ps_ctx_init()Andreas Rheinhardt2024-02-27
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacdec: Rename AACContext to AACDecContextAndreas Rheinhardt2024-02-27
| | | | | | | | | | It is decoder-only; furthermore, there is already an AACContext in use by libfdk-aacenc. Also make aacdec.h provide the typedef for AACContext; up until now, this has been done by sbr.h. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacsbr: Remove unused parameter from sbr_gain_calcAndreas Rheinhardt2024-02-27
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avocdec/aac: Move decoder-only stuff to new header aacdec.hAndreas Rheinhardt2024-02-27
| | | | | | | AACContext is not used by the encoder at all. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacdec_template: Don't use intermediate void*Andreas Rheinhardt2024-02-27
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevc: fix luma 12b overflowRonald S. Bultje2024-02-26
| | | | Signed-off-by: J. Dekker <jdek@itanimul.li>
* avcodec/evc: Remove redefine of HEVC_MAX_ENTRY_POINT_OFFSETSZhao Zhili2024-02-26
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/vaapi_encode: remove a duplicate av_freepTong Wu2024-02-26
| | | | Signed-off-by: Tong Wu <tong1.wu@intel.com>
* lavc/vvc: Read subpic ID when only one subpicture is presentFrank Plowman2024-02-25
| | | | | | | | | | | | | | | | | Previously, the following syntax elements were not read in the case sps_num_subpics_minus is 0: * sps_subpic_id_len_minus1 * sps_subpic_id_mapping_explicitly_signalled_flag * sps_subpic_id_mapping_present_flag * sps_subpic_id[i] This was causing failures to decode bitstreams, for example the DVB's "VVC HDR UHDTV1 OpenGOP 3840x2160 50fps HLG10 PiP" V&V bitstream. Patch fixes this by moving the reads for these syntax elements out a scope. Signed-off-by: Frank Plowman <post@frankplowman.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/vvc: Correct sps_num_subpics_minus1 minimumFrank Plowman2024-02-25
| | | | | | | | The spec says "the value of sps_num_subpics_minus1 shall be in the range of 0 to MaxSlicesPerAu − 1, inclusive." Signed-off-by: Frank Plowman <post@frankplowman.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/vvc: Increase VVC_MAX_* definitions for level 6.3Frank Plowman2024-02-25
| | | | | | Reported-by: James Almer <jamrial@gmail.com> Signed-off-by: Frank Plowman <post@frankplowman.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_h2645: Avoid function pointer casts, fix UBAndreas Rheinhardt2024-02-25
| | | | | | | | | | | | | | | | | The SEI message read/write functions are called via function pointers where the SEI message-specific context is passed as void*. But the actual function definitions use a pointer to their proper context in place of void*, making the calls undefined behaviour. Clang UBSan 17 warns about this. This commit fixes this by adding wrapper functions (created via macros) that have the right type that call the actual functions. This reduced the number of failing FATE tests with UBSan from 164 to 85 here. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/me_cmp: R-V V vsse vsad intrasunyuechi2024-02-25
| | | | | | | | | | | | | | C908: vsad_4_c: 681.0 vsad_4_rvv_i32: 182.2 vsad_5_c: 278.0 vsad_5_rvv_i32: 145.2 vsse_4_c: 595.0 vsse_4_rvv_i32: 125.2 vsse_5_c: 281.0 vsse_5_rvv_i32: 101.2 Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
* lavc/me_cmp: R-V V vsse vsadsunyuechi2024-02-25
| | | | | | | | | | | | | | C908: vsad_0_c: 936.0 vsad_0_rvv_i32: 236.2 vsad_1_c: 424.0 vsad_1_rvv_i32: 190.2 vsse_0_c: 877.0 vsse_0_rvv_i32: 204.2 vsse_1_c: 439.0 vsse_1_rvv_i32: 140.2 Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
* avcodec/cbs_h266_syntax_template: Don't omit unused function parameterAndreas Rheinhardt2024-02-25
| | | | | | | | | | | | The calls to the sei_decoded_picture_hash read and write functions are performed with four pointer arguments; just because one of them is unused by the callees does not mean that they can be omitted: This is undefined behaviour. (This was not recognized because the SEI_MESSAGE_RW macro contains casts.) Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vvcdec: add Intra Block Copy decoderWu Jianhua2024-02-24
| | | | | | | | | | | | | | | | | | Introduction at https://ieeexplore.ieee.org/document/9408666 passed files: 10b444_A_Kwai_3.bit 10b444_B_Kwai_3.bit CodingToolsSets_D_Tencent_2.bit IBC_A_Tencent_2.bit IBC_B_Tencent_2.bit IBC_C_Tencent_2.bit IBC_D_Tencent_2.bit IBC_E_Tencent_1.bit LOSSLESS_B_HHI_3.bit Signed-off-by: Wu Jianhua <toqsxw@outlook.com> Signed-off-by: Nuo Mi <nuomi2021@gmail.com>
* avcodec/vvcdec: add Intra Block Copy parserWu Jianhua2024-02-24
| | | | Co-authored-by: Nuo Mi <nuomi2021@gmail.com>
* avcodec/vvcdec: refact, rename !is_mvp to check_merNuo Mi2024-02-24
| | | | | | For IBC, we'll utilize the check_available function. However, neither MVP nor merge mode need to check the motion estimation region. Let's rename it to avoid confusion.
* avcodec/vvcdec: fix dual tree for skipped transform tree/unitNuo Mi2024-02-24
| | | | fix IBC_E_Tencent_1.bit
* avcodec/vvcdec: ff_vvc_set_intra_mvf, refact to support dmvr tabNuo Mi2024-02-24
|