FFmpeg/libavcodec/arm
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
..
aac.h
aacpsdsp_init_arm.c
aacpsdsp_neon.S
ac3dsp_arm.S
ac3dsp_armv6.S
ac3dsp_init_arm.c avcodec/ac3dsp: make len a size_t in float_to_fixed24 2023-11-22 18:33:00 -03:00
ac3dsp_neon.S avcodec/ac3: Remove unused fixed-point ARMv7 DSP 2024-04-18 08:38:14 +02:00
asm-offsets.h
audiodsp_arm.h
audiodsp_init_arm.c
audiodsp_init_neon.c
audiodsp_neon.S
blockdsp_arm.h
blockdsp_init_arm.c
blockdsp_init_neon.c
blockdsp_neon.S
cabac.h
dca.h
flacdsp_arm.S
flacdsp_init_arm.c avcodec/flacdsp: Split encoder-only parts into a ctx of its own 2022-08-05 03:28:45 +02:00
fmtconvert_init_arm.c avcodec/fmtconvert: Remove unused AVCodecContext parameter 2022-09-21 20:26:40 +02:00
fmtconvert_neon.S
fmtconvert_vfp.S
g722dsp_init_arm.c
g722dsp_neon.S
h264chroma_init_arm.c avcodec/h264chroma: Constify src in h264_chroma_mc_func 2022-08-05 03:02:13 +02:00
h264cmc_neon.S avcodec/h264chroma: Constify src in h264_chroma_mc_func 2022-08-05 03:02:13 +02:00
h264dsp_init_arm.c
h264dsp_neon.S
h264idct_neon.S
h264pred_init_arm.c
h264pred_neon.S
h264qpel_init_arm.c
h264qpel_neon.S arm/aarch64: Improve scheduling in the avg form of h264_qpel 2021-10-18 14:27:36 +03:00
hevcdsp_arm.h lavc/hevc*: move to hevc/ subdir 2024-06-04 11:46:27 +02:00
hevcdsp_deblock_neon.S Revert "avcodec/arm/hevc: remove duplicate mov of deblock neon" 2023-03-23 09:39:32 +02:00
hevcdsp_idct_neon.S codec/arm/hevcdsp_idct_neon: remove duplicate mov 2023-03-07 14:31:08 +02:00
hevcdsp_init_arm.c lavc/hevc*: move to hevc/ subdir 2024-06-04 11:46:27 +02:00
hevcdsp_init_neon.c lavc/hevc*: move to hevc/ subdir 2024-06-04 11:46:27 +02:00
hevcdsp_qpel_neon.S Revert "arm: hevc_qpel: Fix the assembly to work with non-multiple of 8 widths" 2022-01-04 14:31:48 +01:00
hevcdsp_sao_neon.S
hpeldsp_arm.h
hpeldsp_arm.S
hpeldsp_armv6.S
hpeldsp_init_arm.c
hpeldsp_init_armv6.c
hpeldsp_init_neon.c
hpeldsp_neon.S
idct.h
idctdsp_arm.h
idctdsp_arm.S
idctdsp_armv6.S
idctdsp_init_arm.c
idctdsp_init_armv5te.c
idctdsp_init_armv6.c
idctdsp_init_neon.c
idctdsp_neon.S
int_neon.S
jrevdct_arm.S
lossless_audiodsp_init_arm.c
lossless_audiodsp_neon.S
Makefile avcodec: Remove DCT, FFT, MDCT and RDFT 2023-10-01 02:25:09 +02:00
mathops.h
me_cmp_armv6.S
me_cmp_init_arm.c avcodec/mpegvideoenc: Add MPVEncContext 2025-03-26 04:08:33 +01:00
mlpdsp_armv5te.S libavcodec/arm/mlpdsp_armv5te: fix label format to work with binutils 2.43 2024-08-13 23:24:13 +03:00
mlpdsp_armv6.S
mlpdsp_init_arm.c
mpegaudiodsp_fixed_armv6.S
mpegaudiodsp_init_arm.c
mpegvideo_arm.c avcodec/arm/mpegvideo_arm: Use static_assert to check offsets 2024-03-31 00:08:43 +01:00
mpegvideo_arm.h
mpegvideo_armv5te.c
mpegvideo_armv5te_s.S
mpegvideo_neon.S
mpegvideoencdsp_armv6.S
mpegvideoencdsp_init_arm.c avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t 2024-09-01 13:42:30 +02:00
neon.S
neontest.c
pixblockdsp_armv6.S
pixblockdsp_init_arm.c
pixblockdsp_neon.S
rv34dsp_init_arm.c
rv34dsp_neon.S
rv40dsp_init_arm.c arm: rv40dsp: Change stride parameters to ptrdiff_t 2022-09-02 23:04:58 +03:00
rv40dsp_neon.S
sbcdsp_armv6.S
sbcdsp_init_arm.c
sbcdsp_neon.S avcodec/arm/sbcenc: avoid callee preserved vfp registers 2022-09-13 09:51:51 +03:00
sbrdsp_init_arm.c
sbrdsp_neon.S
simple_idct_arm.S
simple_idct_armv5te.S
simple_idct_armv6.S
simple_idct_neon.S
startcode.h
startcode_armv6.S
synth_filter_init_arm.c avcodec: Remove DCT, FFT, MDCT and RDFT 2023-10-01 02:25:09 +02:00
synth_filter_neon.S dca_core: convert to lavu/tx 2022-11-06 14:39:36 +01:00
synth_filter_vfp.S dca_core: convert to lavu/tx 2022-11-06 14:39:36 +01:00
vc1dsp.h
vc1dsp_init_arm.c
vc1dsp_init_neon.c arm: vc1sdp: Change stride parameters to ptrdiff_t 2022-09-02 23:04:55 +03:00
vc1dsp_neon.S arm: vc1dsp: Canonicalize the syntax for aligned NEON loads/stores 2022-09-29 10:28:45 +03:00
videodsp_arm.h
videodsp_armv5te.S
videodsp_init_arm.c
videodsp_init_armv5te.c avcodec/videodsp: Constify buf in VideoDSPContext.prefetch 2022-07-31 03:14:34 +02:00
vorbisdsp_init_arm.c lavc/vorbisdsp: use ptrdiff_t rather than intptr_t 2022-09-19 13:51:00 -03:00
vorbisdsp_neon.S
vp3dsp_init_arm.c
vp3dsp_neon.S
vp6dsp_init_arm.c
vp6dsp_neon.S
vp8.h avcodec/arm/vp8: Don't discard const 2024-03-31 00:08:43 +01:00
vp8_armv6.S avcodec/vp56: Move VP5-9 range coder functions to a header of their own 2022-07-28 03:49:54 +02:00
vp8dsp.h avcodec/vp8dsp: Constify src in vp8_mc_func 2022-09-11 20:57:51 +02:00
vp8dsp_armv6.S avcodec/vp8dsp: Constify src in vp8_mc_func 2022-09-11 20:57:51 +02:00
vp8dsp_init_arm.c
vp8dsp_init_armv6.c
vp8dsp_init_neon.c
vp8dsp_neon.S
vp9dsp_init.h
vp9dsp_init_10bpp_arm.c
vp9dsp_init_12bpp_arm.c
vp9dsp_init_16bpp_arm_template.c
vp9dsp_init_arm.c
vp9itxfm_16bpp_neon.S
vp9itxfm_neon.S
vp9lpf_16bpp_neon.S
vp9lpf_neon.S
vp9mc_16bpp_neon.S
vp9mc_neon.S arm: vp9mc: Load only 12 pixels in the 4 pixel wide horizontal filter 2025-01-03 17:53:48 -05:00
vpx_arith.h avcodec/vp56: Move VP5-9 range coder functions to a header of their own 2022-07-28 03:49:54 +02:00