summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-09 14:14:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-10 18:49:35 +0200
commit73ea6db0ba815b80d6e7b06e86e4c5db9e2032ed (patch)
tree65f39e336c15f87016cd6fca36de09ec046dc980 /libavcodec/mpegvideo.h
parentd576b37fa7e2d23737f04b6c1df2a132ff4b113f (diff)
avcodec/mpegpicture: Move encoding_error and mb_var_sum to MpegEncCtx
These fields are only ever set by the encoder for the current picture and for no other picture. So only one set of these values needs to exist, so move them to MpegEncContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 47619c1976..1ddf8034aa 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -236,10 +236,13 @@ typedef struct MpegEncContext {
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
- /* The following three arrays are encoder-only */
+ /* The following fields are encoder-only */
uint16_t *mb_var; ///< Table for MB variances
uint16_t *mc_mb_var; ///< Table for motion compensated MB variances
uint8_t *mb_mean; ///< Table for MB luminance
+ int64_t mb_var_sum; ///< sum of MB variance for current frame
+ int64_t mc_mb_var_sum; ///< motion compensated MB variance for current frame
+ uint64_t encoding_error[MPEGVIDEO_MAX_PLANES];
int motion_est; ///< ME algorithm
int me_penalty_compensation;