ffmpeg/libavcodec/aarch64
Andreas Rheinhardt a064d34a32 avcodec/mpegvideoenc: Add MPVEncContext
Many of the fields of MpegEncContext (which is also used by decoders)
are actually only used by encoders. Therefore this commit adds
a new encoder-only structure and moves all of the encoder-only
fields to it except for those which require more explicit
synchronisation between the main slice context and the other
slice contexts. This synchronisation is currently mainly provided
by ff_update_thread_context() which simply copies most of
the main slice context over the other slice contexts. Fields
which are moved to the new MPVEncContext no longer participate
in this (which is desired, because it is horrible and for the
fields b) below wasteful) which means that some fields can only
be moved when explicit synchronisation code is added in later commits.

More explicitly, this commit moves the following fields:
a) Fields not copied by ff_update_duplicate_context():
dct_error_sum and dct_count; the former does not need synchronisation,
the latter is synchronised in merge_context_after_encode().
b) Fields which do not change after initialisation (these fields
could also be put into MPVMainEncContext at the cost of
an indirection to access them): lambda_table, adaptive_quant,
{luma,chroma}_elim_threshold, new_pic, fdsp, mpvencdsp, pdsp,
{p,b_forw,b_back,b_bidir_forw,b_bidir_back,b_direct,b_field}_mv_table,
[pb]_field_select_table, mb_{type,var,mean}, mc_mb_var, {min,max}_qcoeff,
{inter,intra}_quant_bias, ac_esc_length, the *_vlc_length fields,
the q_{intra,inter,chroma_intra}_matrix{,16}, dct_offset, mb_info,
mjpeg_ctx, rtp_mode, rtp_payload_size, encode_mb, all function
pointers, mpv_flags, quantizer_noise_shaping,
frame_reconstruction_bitfield, error_rate and intra_penalty.
c) Fields which are already (re)set explicitly: The PutBitContexts
pb, tex_pb, pb2; dquant, skipdct, encoding_error, the statistics
fields {mv,i_tex,p_tex,misc,last}_bits and i_count; last_mv_dir,
esc_pos (reset when writing the header).
d) Fields which are only used by encoders not supporting slice
threading for which synchronisation doesn't matter: esc3_level_length
and the remaining mb_info fields.
e) coded_score: This field is only really used when FF_MPV_FLAG_CBP_RD
is set (which implies trellis) and even then it is only used for
non-intra blocks. For these blocks dct_quantize_trellis_c() either
sets coded_score[n] or returns a last_non_zero value of -1
in which case coded_score will be reset in encode_mb_internal().
Therefore no old values are ever used.

The MotionEstContext has not been moved yet.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-26 04:08:33 +01:00
..
h26x aarch64: h26x: Fix the indentation of one function 2024-09-26 13:42:11 +03:00
vvc avcodec/aarch64/vvc: Optimize vvc_avg{8, 10, 12} 2025-03-07 15:51:20 +02:00
aacencdsp_init.c avcodec/aarch64/aacencdsp: NEON implementation 2025-01-28 10:44:40 +02:00
aacencdsp_neon.S avcodec/aarch64/aacencdsp: NEON implementation 2025-01-28 10:44:40 +02:00
aacpsdsp_init_aarch64.c
aacpsdsp_neon.S aarch64: Reindent all assembly to 8/24 column indentation 2023-10-21 23:25:54 +03:00
ac3dsp_init_aarch64.c avcodec/ac3: Implement sum_square_butterfly_float for aarch64 NEON 2024-04-08 13:36:40 +03:00
ac3dsp_neon.S avcodec/aarch64/ac3dsp_neon.S: Optimize ac3_sum_square_butterfly_int32_neon 2025-03-02 01:17:53 +02:00
cabac.h
fdct.h lavc/aarch64/fdct: add neon-optimized fdct for aarch64 2024-05-13 14:54:10 +02:00
fdctdsp_init_aarch64.c lavc/aarch64/fdct: add neon-optimized fdct for aarch64 2024-05-13 14:54:10 +02:00
fdctdsp_neon.S lavc/aarch64/fdct: add neon-optimized fdct for aarch64 2024-05-13 14:54:10 +02:00
fmtconvert_init.c avcodec/fmtconvert: Remove unused AVCodecContext parameter 2022-09-21 20:26:40 +02:00
fmtconvert_neon.S
h264chroma_init_aarch64.c avcodec/h264chroma: Constify src in h264_chroma_mc_func 2022-08-05 03:02:13 +02:00
h264cmc_neon.S aarch64: Lowercase UXTW/SXTW and similar flags 2023-10-21 23:25:23 +03:00
h264dsp_init_aarch64.c
h264dsp_neon.S aarch64: Make the indentation more consistent 2023-10-21 23:25:29 +03:00
h264idct_neon.S aarch64: Lowercase UXTW/SXTW and similar flags 2023-10-21 23:25:23 +03:00
h264pred_init.c lavc/aarch64: add pred functions for 10-bit 2021-08-21 00:06:26 +03:00
h264pred_neon.S lavc/aarch64: Fix ff_pred16x16_plane_neon_10 2024-12-17 14:50:29 +02:00
h264qpel_init_aarch64.c lavc/aarch64: h264qpel, add 10-bit lowpass_8_10 based functions 2023-12-07 23:20:14 +02:00
h264qpel_neon.S lavc/aarch64: h264qpel, add 10-bit lowpass_8_10 based functions 2023-12-07 23:20:14 +02:00
hevcdsp_deblock_neon.S avcodec/aarch64/hevc: add luma deblock NEON 2024-02-28 10:14:58 +01:00
hevcdsp_idct_neon.S aarch64/hevcdsp_idct_neon: Add implementation for idct dc 12 2025-03-04 17:01:58 +08:00
hevcdsp_init_aarch64.c aarch64/hevcdsp_idct_neon: Add implementation for idct dc 12 2025-03-04 17:01:58 +08:00
hpeldsp_init_aarch64.c
hpeldsp_neon.S aarch64: Consistently use lowercase for vector element specifiers 2023-10-21 23:25:18 +03:00
idct.h avcodec/aarch64/idct: Add missing stddef 2022-02-21 13:10:04 +01:00
idctdsp_init_aarch64.c lavc/aarch64: fix include for cpu.h 2024-05-13 14:50:38 +02:00
idctdsp_neon.S avcodec/idctdsp: Arm 64-bit NEON block add and clamp fast paths 2022-04-01 10:03:34 +03:00
Makefile avcodec/aarch64/aacencdsp: NEON implementation 2025-01-28 10:44:40 +02:00
me_cmp_init_aarch64.c avcodec/mpegvideoenc: Add MPVEncContext 2025-03-26 04:08:33 +01:00
me_cmp_neon.S avcodec/aarch64/me_cmp: add dotprod implementations of sse16 and vsse_intra16 2024-08-17 15:31:48 +02:00
mpegaudiodsp_init.c
mpegaudiodsp_neon.S lavc/hevcdsp_qpel_neon: using movi.16b instead of movi.2d 2023-11-28 15:54:49 +02:00
mpegvideoencdsp_init.c avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t 2024-09-01 13:42:30 +02:00
mpegvideoencdsp_neon.S avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t 2024-09-01 13:42:30 +02:00
neon.S aarch64: Consistently use lowercase for vector element specifiers 2023-10-21 23:25:18 +03:00
neontest.c
opusdsp_init.c lavc/opus*: move to opus/ subdir 2024-09-02 11:56:53 +02:00
opusdsp_neon.S avcodec/aarch64/opusdsp_neon: Simplify opus_postfilter_neon 2025-02-10 14:55:16 +02:00
pixblockdsp_init_aarch64.c
pixblockdsp_neon.S
rv40dsp_init_aarch64.c avcodec/h264chroma: Constify src in h264_chroma_mc_func 2022-08-05 03:02:13 +02:00
sbrdsp_init_aarch64.c
sbrdsp_neon.S aarch64: Consistently use lowercase for vector element specifiers 2023-10-21 23:25:18 +03:00
simple_idct_neon.S aarch64: Consistently use lowercase for vector element specifiers 2023-10-21 23:25:18 +03:00
synth_filter_init.c avcodec: Remove DCT, FFT, MDCT and RDFT 2023-10-01 02:25:09 +02:00
synth_filter_neon.S avcodec: Remove DCT, FFT, MDCT and RDFT 2023-10-01 02:25:09 +02:00
vc1dsp_init_aarch64.c avcodec/h264chroma: Constify src in h264_chroma_mc_func 2022-08-05 03:02:13 +02:00
vc1dsp_neon.S avcodec/vc1: Arm 64-bit NEON unescape fast path 2022-04-01 10:03:34 +03:00
videodsp.S lavc/aarch64: fix relocation out of range error 2021-09-25 21:55:29 +03:00
videodsp_init.c avcodec/videodsp: Constify buf in VideoDSPContext.prefetch 2022-07-31 03:14:34 +02:00
vorbisdsp_init.c lavc/vorbisdsp: use ptrdiff_t rather than intptr_t 2022-09-19 13:51:00 -03:00
vorbisdsp_neon.S
vp8dsp.h avcodec/vp8dsp: Constify src in vp8_mc_func 2022-09-11 20:57:51 +02:00
vp8dsp_init_aarch64.c
vp8dsp_neon.S aarch64: Make the indentation more consistent 2023-10-21 23:25:29 +03:00
vp9dsp_init.h
vp9dsp_init_10bpp_aarch64.c
vp9dsp_init_12bpp_aarch64.c
vp9dsp_init_16bpp_aarch64_template.c
vp9dsp_init_aarch64.c
vp9itxfm_16bpp_neon.S aarch64: Use ret x<n> instead of br x<n> where possible 2021-11-16 13:43:56 +02:00
vp9itxfm_neon.S aarch64: Implement stack spilling in a consistent way. 2022-10-11 09:12:02 +02:00
vp9lpf_16bpp_neon.S aarch64: Implement stack spilling in a consistent way. 2022-10-11 09:12:02 +02:00
vp9lpf_neon.S aarch64: Implement stack spilling in a consistent way. 2022-10-11 09:12:02 +02:00
vp9mc_16bpp_neon.S
vp9mc_aarch64.S
vp9mc_neon.S aarch64: vp9mc: Load only 12 pixels in the 4 pixel wide horizontal filter 2025-01-03 17:53:46 -05:00