Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-03 19:53:13 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-03 19:53:13 +0300
commit43c0298208ad6fe36a4dbf03824842d89c3ed143 (patch)
tree27ea5b3341f1318ce79e26e590d36b2c26152fd2 /libavcodec/mpegvideo_enc.c
parentf3af379b5c1816271b1afce0ccb2a935dc29940c (diff)
parent5b6f42da98c26a8aee8d2c2edfcbd0633ad1c607 (diff)
Merge commit '5b6f42da98c26a8aee8d2c2edfcbd0633ad1c607'
* commit '5b6f42da98c26a8aee8d2c2edfcbd0633ad1c607': lavc: Move me_penalty_compensation to codec private options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index a7e3206737..1e0d33d266 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -353,6 +353,8 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->rtp_payload_size)
s->rtp_payload_size = avctx->rtp_payload_size;
+ if (avctx->me_penalty_compensation)
+ s->me_penalty_compensation = avctx->me_penalty_compensation;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
@@ -3729,8 +3731,8 @@ static int encode_picture(MpegEncContext *s, int picture_number)
/* Estimate motion for every MB */
if(s->pict_type != AV_PICTURE_TYPE_I){
- s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8;
- s->lambda2= (s->lambda2* (int64_t)s->avctx->me_penalty_compensation + 128)>>8;
+ s->lambda = (s->lambda * s->me_penalty_compensation + 128) >> 8;
+ s->lambda2 = (s->lambda2 * (int64_t) s->me_penalty_compensation + 128) >> 8;
if (s->pict_type != AV_PICTURE_TYPE_B) {
if((s->avctx->pre_me && s->last_non_b_pict_type==AV_PICTURE_TYPE_I) || s->avctx->pre_me==2){
s->avctx->execute(s->avctx, pre_estimate_motion_thread, &s->thread_context[0], NULL, context_count, sizeof(void*));