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 lavc/aacpsdsp: use ptrdiff_t for stride in hybrid_analysis 2017-06-28 12:22:39 +02:00
aacpsdsp_neon.S lavc/arm: fix lack of precision in ff_ps_stereo_interpolate_neon 2017-06-28 11:59:34 +02:00
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 Merge commit '12004a9a7f' 2017-03-20 22:35:07 +01:00
audiodsp_neon.S Merge commit '12004a9a7f' 2017-03-20 22:35:07 +01:00
blockdsp_arm.h blockdsp: drop the high_bit_depth parameter 2016-09-22 09:47:52 +02:00
blockdsp_init_arm.c blockdsp: drop the high_bit_depth parameter 2016-09-22 09:47:52 +02:00
blockdsp_init_neon.c lavc/arm: fix indent in blockdsp_init_neon 2017-03-20 19:01:25 +01:00
blockdsp_neon.S
cabac.h
dca.h avcodec/dca: remove old decoder 2016-01-31 17:09:38 +01:00
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 Merge commit '90b1b9350c' 2016-01-02 11:21:36 +01:00
fmtconvert_vfp.S
g722dsp_init_arm.c Merge commit '702458538d' 2015-02-16 02:16:29 +01:00
g722dsp_neon.S Merge commit '702458538d' 2015-02-16 02:16:29 +01:00
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 avcodec/h264dsp, h264idct: Fix lengths of array parameters 2021-08-08 17:44:57 +02:00
h264dsp_neon.S Merge commit '0676de935b' 2019-03-22 16:06:04 -03:00
h264idct_neon.S Merge commit '9dde6ab06c' 2017-11-11 13:44:07 -03:00
h264pred_init_arm.c Merge commit '256ef19844' 2015-07-18 02:13:22 +02:00
h264pred_neon.S
h264qpel_init_arm.c Merge commit '7fb993d338' 2014-07-25 13:05:08 +02:00
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 lavc/hevcdec: fix the HEVC decoder crash when memory over-read 2020-04-20 10:28:04 +08:00
hpeldsp_arm.h
hpeldsp_arm.S Merge commit '92c5755a18' 2017-03-21 15:10:46 +01:00
hpeldsp_armv6.S
hpeldsp_init_arm.c
hpeldsp_init_armv6.c
hpeldsp_init_neon.c
hpeldsp_neon.S
idct.h Merge commit '2ec9fa5ec6' 2017-03-21 14:29:52 -03:00
idctdsp_arm.h
idctdsp_arm.S idct: Change type of array stride parameters to ptrdiff_t 2016-09-29 14:48:03 +02:00
idctdsp_armv6.S
idctdsp_init_arm.c idct_arm: remove use of ff_put/add_pixels_clamped function pointer. 2017-04-06 10:03:27 -04:00
idctdsp_init_armv5te.c Merge commit '4de8b60684' 2014-07-21 01:56:22 +02:00
idctdsp_init_armv6.c idct: Change type of array stride parameters to ptrdiff_t 2016-09-29 14:48:03 +02:00
idctdsp_init_neon.c avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_size 2014-09-24 21:43:19 -03:00
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 Merge commit '2d60444331' 2014-07-17 23:27:40 +02:00
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 Merge commit '41ed7ab45f' 2016-06-21 21:55:34 +02:00
mlpdsp_init_arm.c
mpegaudiodsp_fixed_armv6.S
mpegaudiodsp_init_arm.c Merge commit '2caa93b813' 2017-03-21 16:04:22 -03:00
mpegvideo_arm.c avcodec/arm/mpegvideo_arm: Use static_assert to check offsets 2024-03-31 00:08:43 +01:00
mpegvideo_arm.h Merge commit '835f798c7d' 2014-08-15 20:11:56 +02:00
mpegvideo_armv5te.c Merge commit '41ed7ab45f' 2016-06-21 21:55:34 +02:00
mpegvideo_armv5te_s.S
mpegvideo_neon.S
mpegvideoencdsp_armv6.S Merge commit 'c166148409' 2014-07-07 15:36:58 +02:00
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 avcodec: Remove deprecated old encode/decode APIs 2021-04-27 10:43:12 -03:00
pixblockdsp_armv6.S Merge commit 'f46bb608d9' 2014-07-10 01:22:14 +02:00
pixblockdsp_init_arm.c libavcodec: arm: Add a NEON implementation of pixblockdsp 2020-05-15 23:37:43 +03:00
pixblockdsp_neon.S libavcodec: arm: Add a NEON implementation of pixblockdsp 2020-05-15 23:37:43 +03:00
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 sbcenc: add armv6 and neon asm optimizations 2018-03-07 22:26:53 +01:00
sbcdsp_init_arm.c Include attributes.h directly 2021-04-19 14:34:10 +02:00
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 avcodec/arm/sbrdsp_neon: Use a free register instead of putting 2 things in one 2018-01-12 22:45:02 +01:00
simple_idct_arm.S Merge commit '41ed7ab45f' 2016-06-21 21:55:34 +02:00
simple_idct_armv5te.S Merge commit '014852e932' 2017-03-19 16:12:07 +01:00
simple_idct_armv6.S Merge commit '2ec9fa5ec6' 2017-03-21 14:29:52 -03:00
simple_idct_neon.S Merge commit '2ec9fa5ec6' 2017-03-21 14:29:52 -03:00
startcode.h Merge commit 'db7f1c7c5a' 2014-08-05 12:46:10 +02:00
startcode_armv6.S h264: Move start code search functions into separate source files. 2014-08-04 22:22:54 +02:00
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 Fix compile error on arm4/arm5 platform 2014-09-23 21:11:05 +02:00
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 arm: use a local label instead of the function symbol in ff_prefetch_arm 2015-07-20 23:10:29 +02:00
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 Merge commit '6892df9294' 2017-03-19 18:41:26 +01:00
vp3dsp_neon.S
vp6dsp_init_arm.c Merge commit '721d57e608' 2017-03-19 17:15:24 -03:00
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 Merge commit 'cef914e083' 2019-03-14 16:19:41 -03:00
vp9dsp_init.h vp9: re-split the decoder/format/dsp interface header files. 2017-03-28 18:04:26 -04:00
vp9dsp_init_10bpp_arm.c arm: Add NEON optimizations for 10 and 12 bit vp9 MC 2017-01-24 22:35:50 +02:00
vp9dsp_init_12bpp_arm.c arm: Add NEON optimizations for 10 and 12 bit vp9 MC 2017-01-24 22:35:50 +02:00
vp9dsp_init_16bpp_arm_template.c lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h 2021-01-01 14:11:01 +01:00
vp9dsp_init_arm.c lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h 2021-01-01 14:11:01 +01:00
vp9itxfm_16bpp_neon.S arm: vp9itxfm16: Do a simpler half/quarter idct16/idct32 when possible 2017-03-19 22:54:33 +02:00
vp9itxfm_neon.S arm/aarch64: vp9: Fix vertical alignment 2017-03-19 22:53:32 +02:00
vp9lpf_16bpp_neon.S arm: Add NEON optimizations for 10 and 12 bit vp9 loop filter 2017-01-24 22:35:59 +02:00
vp9lpf_neon.S arm/aarch64: vp9: Fix vertical alignment 2017-03-19 22:53:32 +02:00
vp9mc_16bpp_neon.S arm: Add NEON optimizations for 10 and 12 bit vp9 MC 2017-01-24 22:35:50 +02:00
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