summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-13 01:22:04 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-17 02:54:52 +0100
commit9088cc6df9de86d69c531b4f7b4da2b8b4b5299d (patch)
treee52b22ae4416a2b5c956b9947ec8da116b023a37 /libavcodec/mpegvideo.h
parent2ac3e32802c6b9553677d472fe96a8c3ba237662 (diff)
avcodec/mpegvideo: Allocate several buffers jointly
Reduces the amount of allocations and frees. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 85f02b1355..879b019ffc 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -232,8 +232,8 @@ typedef struct MpegEncContext {
int16_t (*b_bidir_forw_mv_table_base)[2];
int16_t (*b_bidir_back_mv_table_base)[2];
int16_t (*b_direct_mv_table_base)[2];
- int16_t (*p_field_mv_table_base[2][2])[2];
- int16_t (*b_field_mv_table_base[2][2][2])[2];
+ int16_t (*p_field_mv_table_base)[2];
+ int16_t (*b_field_mv_table_base)[2];
int16_t (*p_mv_table)[2]; ///< MV table (1MV per MB) P-frame encoding
int16_t (*b_forw_mv_table)[2]; ///< MV table (1MV per MB) forward mode B-frame encoding
int16_t (*b_back_mv_table)[2]; ///< MV table (1MV per MB) backward mode B-frame encoding
@@ -242,8 +242,8 @@ typedef struct MpegEncContext {
int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode B-frame encoding
int16_t (*p_field_mv_table[2][2])[2]; ///< MV table (2MV per MB) interlaced P-frame encoding
int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding
- uint8_t (*p_field_select_table[2]);
- uint8_t (*b_field_select_table[2][2]);
+ uint8_t (*p_field_select_table[2]); ///< Only the first element is allocated
+ uint8_t (*b_field_select_table[2][2]); ///< Only the first element is allocated
int motion_est; ///< ME algorithm
int me_penalty_compensation;
int me_pre; ///< prepass for motion estimation