This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 9051caa12c1fe0bcab575786a45a76d5ed228bf6 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Fri Jun 27 12:55:33 2025 +0200 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Sat Mar 7 20:14:36 2026 +0100 avcodec/mpegvideo_enc: Inline intra_dc_precision when known Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/mjpegenc.c | 2 +- libavcodec/mpegvideo_enc.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index c5531b1c9f..ee70e17bcd 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -279,7 +279,7 @@ int ff_mjpeg_encode_stuffing(MPVEncContext *const s) fail: for (int i = 0; i < 3; i++) - s->last_dc[i] = 128 << s->c.intra_dc_precision; + s->last_dc[i] = 128; return ret; } diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 90ff7bf1cb..c0bae3f3e4 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -3024,7 +3024,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ mb_y = ff_speedhq_mb_y_order_to_mb(mb_y_order, s->c.mb_height, &first_in_slice); if (first_in_slice && mb_y_order != s->c.start_mb_y) ff_speedhq_end_slice(s); - s->last_dc[0] = s->last_dc[1] = s->last_dc[2] = 1024 << s->c.intra_dc_precision; + s->last_dc[0] = s->last_dc[1] = s->last_dc[2] = 1024; } else { mb_y = mb_y_order; } @@ -3882,9 +3882,8 @@ static int encode_picture(MPVMainEncContext *const m, const AVPacket *pkt) s->c. intra_matrix[j] = av_clip_uint8(( luma_matrix[i] * s->c.qscale) >> 3); } s->c.y_dc_scale_table = - s->c.c_dc_scale_table = ff_mpeg12_dc_scale_table[s->c.intra_dc_precision]; - s->c.chroma_intra_matrix[0] = - s->c.intra_matrix[0] = ff_mpeg12_dc_scale_table[s->c.intra_dc_precision][8]; + s->c.c_dc_scale_table = ff_mpeg12_dc_scale_table[0]; + s->c.chroma_intra_matrix[0] = s->c.intra_matrix[0] = 8; } else { static const uint8_t y[32] = {13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13}; static const uint8_t c[32] = {14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14}; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
