Anton Khirnov
0892ec947c
lavc/hevcdec: pass SliceHeader explicitly to pred_weight_table()
...
And replace the HEVCContext* parameter by void *logctx.
Makes it clear that only SliceHeader is modified by this function.
7 months ago
Anton Khirnov
90fc331b0f
lavc/hevcdec: only ignore INVALIDDATA in decode_nal_unit()
...
All other errors should cause a failure, regardless of the value of
err_recognition. Also, print a warning message when skipping invalid NAL
units.
7 months ago
Anton Khirnov
8eb134f4f9
lavc/hevcdec: drop an always-zero variable
7 months ago
Anton Khirnov
8c8072c29c
lavc/hevcdec: move active PPS from HEVCParamSets to HEVCContext
...
"Currently active PPS" is a property of the decoding process, not of the
list of available parameter sets.
7 months ago
Anton Khirnov
0f47342c12
lavc/hevcdec: stop accessing parameter sets through HEVCParamSets
...
Instead, accept PPS/SPS as function arguments.
Makes the code shorter and significantly reduces diff in future commits.
7 months ago
Anton Khirnov
38b8ae4112
lavc/hevc/pred: stop accessing parameter sets through HEVCParamSets
...
Instead, accept PPS/SPS as function arguments.
Makes the code shorter and significantly reduces diff in future commits.
7 months ago
Anton Khirnov
d0868d70ea
lavc/hevc/cabac: stop accessing parameter sets through HEVCParamSets
...
Instead, accept PPS/SPS as function arguments.
Makes the code shorter and significantly reduces diff in future commits.
7 months ago
Anton Khirnov
b38aecffec
lavc/hevc/filter: stop accessing parameter sets through HEVCParamSets
...
Instead, accept PPS as a function argument and retrieve SPS through it.
Makes the code shorter and significantly reduces diff in future commits.
7 months ago
Anton Khirnov
fb873a05b3
lavc/hevc/mvs: stop accessing parameter sets through HEVCParamSets
...
Instead, accept PPS as a function argument and retrieve SPS through it.
Makes the code shorter and significantly reduces diff in future commits.
7 months ago
Anton Khirnov
6ddba110eb
lavc/hevc/parser: stop using HEVCParamSets.[psv]ps
...
The parser does not need to preserve these between frames.
7 months ago
Anton Khirnov
2e46d68f55
lavc/hevc_ps: make SPS hold a reference to its VPS
...
SPS and its dependent PPSes depend on, and are parsed for, specific VPS data.
This will be useful in following commits.
7 months ago
Anton Khirnov
c879165b39
lavc/hevc_ps: make PPS hold a reference to its SPS
...
PPS depends on, and is parsed for, specific SPS data.
This will be useful in following commits.
7 months ago
Anton Khirnov
e12fd62d1d
lavc/hevcdec: drop a redundant assignment in hevc_decode_frame()
...
The exact same code is executed at the beginning of decode_nal_units()
7 months ago
Anton Khirnov
a82f2b0924
lavc/hevcdec: simplify condition
7 months ago
Anton Khirnov
0407556716
lavc/hevcdec: do not free SliceHeader arrays in pic_arrays_free()
...
SliceHeader.{entry_point_offset,size,offset} are not derived from frame
size and do not need to be freed here.
7 months ago
Rémi Denis-Courmont
b6f37ffba7
lavc/vc1dsp: match C block layout in inv_trans_4x8_rvv
...
Although checkasm does not verify this, the decoder requires that the
transform updates the input block exactly like the C code does.
This fixes vc1-ism, vc1_ilaced_twomv, vc1_sa00040, vc1_sa10091,
vc1_sa10143, vc1_sa20021, vc1test_smm0005 and wmv3-drm-dec tests.
7 months ago
Rémi Denis-Courmont
6c05069e68
lavc/vc1dsp: match C block layout in inv_trans_4x4_rvv
...
Although checkasm does not verify this, the decoder requires that the
transform updates the input block exactly like the C code does.
This fixes vc1-ism, vc1_ilaced_twomv, vc1_sa00040, vc1_sa10091,
vc1_sa10143, vc1_sa20021, vc1test_smm0005 and wmv3-drm-dec tests.
7 months ago
Andreas Rheinhardt
a0ff31e740
avcodec/vvc/inter: Don't return void
...
Returning a void is not allowed by the spec. Just return instead.
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
7 months ago
James Almer
94f2274a8b
x86/aacencdsp: fix ff_aac_quantize_bands_avx on unix64 ABI
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 months ago
James Almer
91b9af0058
x86/aacencdsp: add AVX version of quantize_bands
...
quant_bands_signed_c: 1928.0
quant_bands_signed_sse2: 406.0
quant_bands_signed_avx: 207.0
quant_bands_unsigned_c: 1702.0
quant_bands_unsigned_sse2: 404.0
quant_bands_unsigned_avx: 209.0
Signed-off-by: James Almer <jamrial@gmail.com>
8 months ago
Andreas Rheinhardt
3af6136669
avcodec/dnxhdenc: Simplify padding
...
It is unnecessary to first pad to 32bits; the memset later
will pad everything will with zeroes anyway.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
b0e0b3c58a
avcodec/dnxhdenc: Move PutBitContext from ctx to stack
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
542abee213
avcodec/cbs_h266_syntax_template: Use correct format specifier
...
H266RawSliceHeader.num_entry_points is an uint32_t.
Fixes -Wformat warnings:
https://fate.ffmpeg.org/log.cgi?slot=aarch64-osx-clang-1200.0.32.29&time=20240604151047&log=compile
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
dd8fb0aaae
avcodec/hevc/Makefile: Move rules for lavc/* files to lavc/Makefile
...
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>
8 months ago
Rémi Denis-Courmont
daac101e61
lavc/aacencdsp: fix rounding in R-V V quantize_bands
...
We need to round toward zero here.
8 months ago
Rémi Denis-Courmont
658439934b
lavc/vp8dsp: R-V V vp8_idct_add
...
T-Head C908 (cycles):
vp8_idct_add_c: 312.2
vp8_idct_add_rvv_i32: 117.0
8 months ago
Nuo Mi
f68f40736f
avcodec/vvcdec: support mv wraparound
...
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
8 months ago
Nuo Mi
685174069f
avcodec/vvcdec: misc, reindent inter.c
8 months ago
Nuo Mi
a4013e748a
avcodec/vvcdec: refact out emulated_edge_no_wrap
...
prepare for refrence wraparound
8 months ago
Nuo Mi
8abdf0a28e
avcodec/vvcdec: misc, move src offset inside emulated_edge
8 months ago
Nuo Mi
2d98786fee
avcodec/vvcdec: refact, remove emulated_edge_dmvr and emulated_edge_bilinear to simplify code
8 months ago
Lynne
714596bcbf
aacdec_usac: zero out alpha values for the current frame
8 months ago
Lynne
c2d459cb51
aacdec_usac: fix stereo alpha values for transients
...
Typo.
Also added comments and fixed the branch underneath.
8 months ago
Lynne
7223523335
aacdec_usac: use correct TNS values
...
The standard slightly modified the maximum TNS bands allowed.
8 months ago
Lynne
9b41cc0430
aacdec_usac: do not round noise amplitude values
...
Use floating point division instead of integer division.
8 months ago
Lynne
a18d0659f4
aacdec_usac: skip coeff decoding if the number to be decoded is 0
...
Yet another thing not mentioned in the spec.
8 months ago
Lynne
1ad9a4008b
aacdec_usac: decouple TNS active from TNS data present flag
...
The issue was that in case of common TNS parameters, TNS was
entirely skipped, as tns.present was set to 0.
8 months ago
Lynne
c0fdb0cdfd
aacdec_usac: do not continue parsing bitstream on core_mode == 1
...
Although LPD is not functional yet, the bitstream ends at that point.
8 months ago
Lynne
8ecaa64b9b
aacdec_usac: respect tns_on_lr flag
...
This was left out, and due to av_unused, forgotten about.
8 months ago
Lynne
25b848a0bd
aacdec_usac: correctly set and use the layout map
8 months ago
Lynne
ae495b56ff
aacdec_usac: remove fallback for custom maps with invalid position
...
Not needed as every possible index is mapped.
8 months ago
Lynne
91ab17e2fe
aacdec_usac: tag LFE channels as such in the channel map
...
Missed.
8 months ago
Lynne
62cd6d9e59
aacdec_usac: clean up nb_elems on error
...
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.
8 months ago
Lynne
5c328e6c1e
aacdec: increase MAX_ELEM_ID to 64
...
In USAC, we set the max to 64.
8 months ago
Lynne
91fd6ca000
lavc: bump minor and add APIchanges entry for new USAC profile
8 months ago
Lynne
1c066867df
aac: define a new profile for USAC
...
This allows users to determine whether a stream is USAC or not.
8 months ago
Lynne
ee419804da
mpeg4audio: explicitly define each AOT
...
This makes it far easier to figure out which AOT belongs to which
profile.
Also, explicitly highlight the holes.
8 months ago
Lynne
8a2fe8a5b9
mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC
...
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.
8 months ago
Michael Niedermayer
dce69ba89e
avcodec/libx264: Check init_get_bits8() return code
...
Fixes: CID1594529 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 months ago
Michael Niedermayer
8a64a003b5
avcodec/ilbcdec: Remove dead code
...
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>
8 months ago