1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/mpegvideo_dec: Move ff_mpv_report_decode_progress() to h263dec.c

It is its only user. Also make it static and call it
before ff_mpeg_draw_horiz_band().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-05-16 19:46:40 +02:00
parent e12cbf6095
commit a1e4be5740
3 changed files with 8 additions and 10 deletions

View File

@ -174,6 +174,12 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
return 0;
}
static void report_decode_progress(MpegEncContext *s)
{
if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame && !s->er.error_occurred)
ff_thread_progress_report(&s->cur_pic.ptr->progress, s->mb_y);
}
static int decode_slice(MpegEncContext *s)
{
const int part_mask = s->partitioned_frame
@ -278,8 +284,8 @@ static int decode_slice(MpegEncContext *s)
if (++s->mb_x >= s->mb_width) {
s->mb_x = 0;
report_decode_progress(s);
ff_mpeg_draw_horiz_band(s, s->mb_y * mb_size, mb_size);
ff_mpv_report_decode_progress(s);
s->mb_y++;
}
return 0;
@ -305,8 +311,8 @@ static int decode_slice(MpegEncContext *s)
ff_h263_loop_filter(s);
}
report_decode_progress(s);
ff_mpeg_draw_horiz_band(s, s->mb_y * mb_size, mb_size);
ff_mpv_report_decode_progress(s);
s->mb_x = 0;
}

View File

@ -424,13 +424,6 @@ av_cold void ff_mpeg_flush(AVCodecContext *avctx)
s->pp_time = 0;
}
void ff_mpv_report_decode_progress(MpegEncContext *s)
{
if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame && !s->er.error_occurred)
ff_thread_progress_report(&s->cur_pic.ptr->progress, s->mb_y);
}
static inline int hpel_motion_lowres(MpegEncContext *s,
uint8_t *dest, const uint8_t *src,
int field_based, int field_select,

View File

@ -57,7 +57,6 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx);
*/
int ff_mpv_alloc_dummy_frames(MpegEncContext *s);
void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]);
void ff_mpv_report_decode_progress(MpegEncContext *s);
void ff_mpv_frame_end(MpegEncContext *s);
int ff_mpv_export_qp_table(const MpegEncContext *s, AVFrame *f,