aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avformat/vvc: Reindent after the previous commitAndreas Rheinhardt2024-06-091-11/+11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/vvc: Fix crash on allocation failure, avoid allocationsAndreas Rheinhardt2024-06-091-96/+73
| | | | | | | | | | This is the VVC version of 8b5d15530127fea54e934043a64653859de07353. (Hint: This ensures that the order of NALU arrays is OPI-VPS-SPS-PPS- Prefix-SEI-Suffix-SEI, regardless of the order in the original extradata. I hope this is right.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/vvc: Don't use ff_copy_bits()Andreas Rheinhardt2024-06-094-5/+2
| | | | | | | | | | | There is no benefit in using it: The fast path of copying is not taken because of misalignment; furthermore we are only dealing with a few byte here anyway, so simply copy the bytes manually, avoiding the dependency on bitstream.c in lavf (which also contains a function that is completely unused in lavf). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/vvc: Use put_bytes_output()Andreas Rheinhardt2024-06-091-1/+1
| | | | | | The PutBitContext has just been flushed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc/Makefile: Move rules for lavc/* files to lavc/MakefileAndreas Rheinhardt2024-06-092-8/+4
| | | | | | | | | | | | If any of these files (say A) would be changed in such a way that A acquires a new dependency on another file B, building B would need to be added to all the rules that lead to A being built. Yet currently the rules for several files are spread over the lavc Makefile and the Makefile of the lavc/hevc subdir, making it more likely to be forgotten. So move the rules for these files to the lavc/Makefile. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/aacencdsp: fix rounding in R-V V quantize_bandsRémi Denis-Courmont2024-06-081-1/+1
| | | | We need to round toward zero here.
* lavc/vp8dsp: R-V V vp8_idct_addRémi Denis-Courmont2024-06-082-0/+61
| | | | | | T-Head C908 (cycles): vp8_idct_add_c: 312.2 vp8_idct_add_rvv_i32: 117.0
* sws/input: R-V V rgb24ToUV_half and bgr24ToUV_halfRémi Denis-Courmont2024-06-082-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | T-Head C908: rgb24_to_uv_half_4_c: 2.0 rgb24_to_uv_half_4_rvv_i32: 3.5 rgb24_to_uv_half_64_c: 27.0 rgb24_to_uv_half_64_rvv_i32: 12.5 rgb24_to_uv_half_540_c: 223.7 rgb24_to_uv_half_540_rvv_i32: 105.2 rgb24_to_uv_half_640_c: 265.5 rgb24_to_uv_half_640_rvv_i32: 123.7 rgb24_to_uv_half_960_c: 414.5 rgb24_to_uv_half_960_rvv_i32: 249.5 SpacemiT X60: rgb24_to_uv_half_4_c: 1.7 rgb24_to_uv_half_4_rvv_i32: 4.2 rgb24_to_uv_half_64_c: 24.0 rgb24_to_uv_half_64_rvv_i32: 8.7 rgb24_to_uv_half_540_c: 199.2 rgb24_to_uv_half_540_rvv_i32: 72.5 rgb24_to_uv_half_640_c: 235.7 rgb24_to_uv_half_640_rvv_i32: 85.2 rgb24_to_uv_half_960_c: 353.5 rgb24_to_uv_half_960_rvv_i32: 127.5
* sws/input: R-V V rgb24ToUV and bgr24ToUVRémi Denis-Courmont2024-06-082-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | T-Head C908: rgb24_to_uv_8_c: 2.7 rgb24_to_uv_8_rvv_i32: 3.2 rgb24_to_uv_128_c: 41.0 rgb24_to_uv_128_rvv_i32: 12.7 rgb24_to_uv_1080_c: 342.5 rgb24_to_uv_1080_rvv_i32: 105.7 rgb24_to_uv_1280_c: 406.0 rgb24_to_uv_1280_rvv_i32: 124.2 rgb24_to_uv_1920_c: 626.0 rgb24_to_uv_1920_rvv_i32: 186.0 SpacemiT X60: rgb24_to_uv_8_c: 2.5 rgb24_to_uv_8_rvv_i32: 3.0 rgb24_to_uv_128_c: 36.5 rgb24_to_uv_128_rvv_i32: 5.7 rgb24_to_uv_1080_c: 304.2 rgb24_to_uv_1080_rvv_i32: 49.0 rgb24_to_uv_1280_c: 360.5 rgb24_to_uv_1280_rvv_i32: 57.5 rgb24_to_uv_1920_c: 540.7 rgb24_to_uv_1920_rvv_i32: 86.2
* sws/input: R-V V rgb24ToY & bgr24ToYRémi Denis-Courmont2024-06-085-2/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | T-Head C908: rgb24_to_y_8_c: 2.0 rgb24_to_y_8_rvv_i32: 2.7 rgb24_to_y_128_c: 26.2 rgb24_to_y_128_rvv_i32: 9.2 rgb24_to_y_1080_c: 219.5 rgb24_to_y_1080_rvv_i32: 76.2 rgb24_to_y_1280_c: 276.2 rgb24_to_y_1280_rvv_i32: 89.7 rgb24_to_y_1920_c: 389.7 rgb24_to_y_1920_rvv_i32: 134.2 SpacemiT X60: rgb24_to_y_8_c: 1.7 rgb24_to_y_8_rvv_i32: 2.2 rgb24_to_y_128_c: 23.2 rgb24_to_y_128_rvv_i32: 4.2 rgb24_to_y_1080_c: 195.0 rgb24_to_y_1080_rvv_i32: 33.7 rgb24_to_y_1280_c: 231.0 rgb24_to_y_1280_rvv_i32: 40.0 rgb24_to_y_1920_c: 346.2 rgb24_to_y_1920_rvv_i32: 59.7
* libavfi/dnn: enable LibTorch xpu device option supportWenbin Chen2024-06-081-1/+15
| | | | | | | | | Add xpu device support to libtorch backend. To enable xpu support you need to add "-Wl,--no-as-needed -lintel-ext-pt-gpu -Wl,--as-needed" to "--extra-libs" when configure ffmpeg. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* avcodec/vvcdec: support mv wraparoundNuo Mi2024-06-082-10/+87
| | | | | | | | | | | | | A 360 video specific tool see https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9503377 passed files: DMVR_A_Huawei_3.bit WRAP_D_InterDigital_4.bit WRAP_A_InterDigital_4.bit WRAP_B_InterDigital_4.bit WRAP_C_InterDigital_4.bit ERP_A_MediaTek_3.bit
* avcodec/vvcdec: misc, reindent inter.cNuo Mi2024-06-081-139/+139
|
* avcodec/vvcdec: refact out emulated_edge_no_wrapNuo Mi2024-06-081-30/+61
| | | | prepare for refrence wraparound
* avcodec/vvcdec: misc, move src offset inside emulated_edgeNuo Mi2024-06-081-10/+6
|
* avcodec/vvcdec: refact, remove emulated_edge_dmvr and emulated_edge_bilinear ↵Nuo Mi2024-06-081-100/+46
| | | | to simplify code
* aacdec_usac: zero out alpha values for the current frameLynne2024-06-081-0/+4
|
* aacdec_usac: fix stereo alpha values for transientsLynne2024-06-083-9/+19
| | | | | Typo. Also added comments and fixed the branch underneath.
* aacdec_usac: use correct TNS valuesLynne2024-06-083-2/+13
| | | | The standard slightly modified the maximum TNS bands allowed.
* aacdec_usac: do not round noise amplitude valuesLynne2024-06-081-1/+1
| | | | Use floating point division instead of integer division.
* aacdec_usac: skip coeff decoding if the number to be decoded is 0Lynne2024-06-081-1/+7
| | | | Yet another thing not mentioned in the spec.
* aacdec_usac: decouple TNS active from TNS data present flagLynne2024-06-082-10/+16
| | | | | The issue was that in case of common TNS parameters, TNS was entirely skipped, as tns.present was set to 0.
* aacdec_usac: do not continue parsing bitstream on core_mode == 1Lynne2024-06-081-0/+1
| | | | Although LPD is not functional yet, the bitstream ends at that point.
* aacdec_usac: respect tns_on_lr flagLynne2024-06-082-4/+13
| | | | This was left out, and due to av_unused, forgotten about.
* aacdec_usac: correctly set and use the layout mapLynne2024-06-081-42/+63
|
* aacdec_usac: remove fallback for custom maps with invalid positionLynne2024-06-081-2/+0
| | | | Not needed as every possible index is mapped.
* aacdec_usac: tag LFE channels as such in the channel mapLynne2024-06-081-0/+3
| | | | Missed.
* aacdec_usac: clean up nb_elems on errorLynne2024-06-081-0/+3
| | | | | | | | Require that there is a valid layout with a valid number of channels before accepting nb_elems. The value is required when flushing. Thanks to kasper93 for figuring it out.
* aacdec: increase MAX_ELEM_ID to 64Lynne2024-06-081-1/+1
| | | | In USAC, we set the max to 64.
* lavc: bump minor and add APIchanges entry for new USAC profileLynne2024-06-082-2/+5
|
* aac: define a new profile for USACLynne2024-06-084-0/+7
| | | | This allows users to determine whether a stream is USAC or not.
* mpeg4audio: explicitly define each AOTLynne2024-06-081-40/+42
| | | | | | This makes it far easier to figure out which AOT belongs to which profile. Also, explicitly highlight the holes.
* mpeg4audio: rename AOT_USAC_NOSBR to AOT_USACLynne2024-06-082-7/+3
| | | | | | | | | | The issue is that AOT 45 isn't defined anywhere, and looking at the git blame, it seems to have sprung up through a reordering of the enum, and adding a hole. The spec does not define an explicit AOT for SBR and no SBR, and only uses AOT 42 (previously AOT_USAC_NOSBR), so just rename AOT_USAC to it and replace its use everywhere.
* fftools/ffmpeg_mux_init: Free pts on errorMichael Niedermayer2024-06-071-1/+1
| | | | | | | Fixes: CID1538863 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/cmdutils: Add protective () to FLAGSMichael Niedermayer2024-06-071-1/+1
| | | | | | | issue found while reviewing CID1452612 Free of array-typed value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/sdp: Check before appending ","Michael Niedermayer2024-06-071-0/+3
| | | | | | | Found by reviewing code related to CID1500301 String not null terminated Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rpl: reject invalid sample rateKacper Michajłow2024-06-071-0/+2
| | | | | | | | | Fixes overflow check for bit_rate multiplication few lines below. Found by OSS-Fuzz. Signed-off-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libx264: Check init_get_bits8() return codeMichael Niedermayer2024-06-071-1/+3
| | | | | | | Fixes: CID1594529 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ilbcdec: Remove dead codeMichael Niedermayer2024-06-071-6/+0
| | | | | | | | | Yes the same dead code is in "iLBC Speech Coder ANSI-C Source Code" Fixes: CID1509370 Logically dead code Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp8: Check cond initMichael Niedermayer2024-06-071-1/+5
| | | | | | | Fixes: CID1598563 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp8: Check mutex initMichael Niedermayer2024-06-071-1/+5
| | | | | | | Fixes: CID1598556 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavfilter/signature_lookup: fix jaccard distanceGerion Entrup2024-06-071-1/+2
| | | | | | | | | | | | | | | Actually, the jaccard distance is defined as D = 1 - intersect / union. Additionally, the distance value is compared against a constant that must be between 0 and 1, which is not the case here. Both facts together has led to the fact, that the function always returned a matching course signature. To leave the constant intact and to avoid floating point computation, this commit multiplies with 1 << 16 making the constant effectively 9000 / (1<<16) =~ 0.14. Reported-by: Sachin Tilloo <sachin.tilloo@gmail.com> Reviewed-by: Sachin Tilloo <sachin.tilloo@gmail.com> Tested-by: Sachin Tilloo <sachin.tilloo@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/vc1dsp: R-V V vc1_inv_trans_4x4Rémi Denis-Courmont2024-06-072-0/+47
| | | | | | | | | T-Head C908 (cycles): vc1dsp.vc1_inv_trans_4x4_c: 310.7 vc1dsp.vc1_inv_trans_4x4_rvv_i32: 120.0 We could use 1 `vlseg4e64.v` instead of 4 `vle16.v`, but that seems to be about 7% slower.
* lavc/vc1dsp: R-V V vc1_inv_trans_4x8Rémi Denis-Courmont2024-06-072-0/+79
| | | | | | T-Head C908 (cycles): vc1dsp.vc1_inv_trans_4x8_c: 653.2 vc1dsp.vc1_inv_trans_4x8_rvv_i32: 234.0
* lavc/vc1dsp: R-V V vc1_inv_trans_8x4Rémi Denis-Courmont2024-06-072-0/+75
| | | | | | T-Head C908 (cycles): vc1dsp.vc1_inv_trans_8x4_c: 626.2 vc1dsp.vc1_inv_trans_8x4_rvv_i32: 215.2
* lavc/vc1dsp: R-V V vc1_inv_trans_8x8Rémi Denis-Courmont2024-06-072-0/+112
| | | | | | T-Head C908 (cycles): vc1dsp.vc1_inv_trans_8x8_c: 871.7 vc1dsp.vc1_inv_trans_8x8_rvv_i32: 286.7
* checkasm: disable unaligned access emulationRémi Denis-Courmont2024-06-071-0/+6
| | | | | | | | | | | | The OS may silently fix (emulate) unaligned hardware access exceptions. This is extremely slow and code should be fixed not to rely on unaligned access on affected hardware. Accordingly this requests that the OS disable emulation and instead throw Bus error, which will be caught by checkasm's signal handler. This has no effects if the hardware supports unaligned access in hardware, since no exceptions are generated. prctl() will fail safe in that case.
* lavc/flacdsp: fix sign extension in R-V V wasted33Rémi Denis-Courmont2024-06-071-3/+2
| | | | | We need to use either VWCVT.X.X.V or VSEXT.VF2. The later is preferable to avoid changing VTYPE.
* libswscale/x86/yuv_2_rgb: fix some commentsRamiro Polla2024-06-071-4/+4
|
* avcodec/mediacodecenc: workaround the alignment requirement for H.265Zhao Zhili2024-06-071-3/+8
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>