From 075429617901094011e6eac9d752c2ea026fe89f Mon Sep 17 00:00:00 2001 From: Andre Zeps Date: Sun, 25 Jan 2026 21:06:53 +0100 Subject: [PATCH] Predict skipped macroblocks after last slice --- pl_mpeg.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pl_mpeg.h b/pl_mpeg.h index b42f53f..cb83354 100755 --- a/pl_mpeg.h +++ b/pl_mpeg.h @@ -3098,6 +3098,14 @@ void plm_video_decode_picture(plm_video_t *self) { self->start_code = plm_buffer_next_start_code(self->buffer); } + // Predict skipped macroblocks after the last slice + while (self->macroblock_address < self->mb_size - 1 ) { + self->macroblock_address++; + self->mb_row = self->macroblock_address / self->mb_width; + self->mb_col = self->macroblock_address % self->mb_width; + plm_video_predict_macroblock(self); + } + // If this is a reference picture rotate the prediction pointers if ( self->picture_type == PLM_VIDEO_PICTURE_TYPE_INTRA ||