[vlc-commits] [Git][videolan/vlc][master] codec: videotoolbox: fix DPB output on IRAP
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jul 12 12:47:34 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e7f161f4 by François Cartegnie at 2024-07-12T12:31:09+00:00
codec: videotoolbox: fix DPB output on IRAP
refs #28700
- - - - -
2 changed files:
- modules/codec/videotoolbox/dpb.c
- modules/codec/videotoolbox/dpb_test.c
Changes:
=====================================
modules/codec/videotoolbox/dpb.c
=====================================
@@ -242,6 +242,9 @@ picture_t * DPBOutputAndRemoval(struct dpb_s *dpb, date_t *ptsdate,
dpb->pf_release(output);
output = next;
}
+
+ /* Output remaining C.5.2.2 2. al.2 */
+ output = EmptyDPB(dpb, ptsdate);
}
else /* Regular bump process */
{
=====================================
modules/codec/videotoolbox/dpb_test.c
=====================================
@@ -267,6 +267,68 @@ static void CheckDPBWithFramesTest(void)
assert(dpb.i_size == 0);
+ /* IRAP, RASL, non-needed slots */
+ info.i_max_pics_buffering = 10; /* let's trigger on needed output only */
+
+ info.i_foc = 22;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ info.b_output_needed = false;
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), -1);
+
+ info.i_foc = 20;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ info.b_output_needed = true;
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), -1);
+
+ info.i_foc = 24;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), -1);
+
+ info.i_foc = 0;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), 20, 22, 24, -1);
+
+ CheckDrain(&dpb, &pts, 0, -1);
+
+ assert(dpb.i_size == 0);
+
+ /* IRAP, RASL, non-needed slots, NoRaslOutputFlag */
+ info.i_max_pics_buffering = 10; /* let's trigger on needed output only */
+
+ info.i_foc = 22;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ info.b_output_needed = false;
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), -1);
+
+ info.i_foc = 20;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ info.b_output_needed = true;
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), -1);
+
+ info.i_foc = 24;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), -1);
+
+ info.i_foc = 0;
+ info.i_poc = info.i_foc & ~1;
+ info.b_flush = (info.i_foc == 0);
+ info.b_no_rasl_output = true;
+ info.b_keyframe = true;
+ CheckOutput(&dpb, &pts, withpic(infocopy(&info), info.i_foc), 20, 24, -1);
+ info.b_no_rasl_output = false;
+ info.b_keyframe = false;
+
+ CheckDrain(&dpb, &pts, 0, -1);
+
+ assert(dpb.i_size == 0);
+
/* Max latency requirements */
info.i_max_pics_buffering = 10;
info.i_max_num_reorder = 7;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e7f161f4955d6dc333fef348806d2809cb501253
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e7f161f4955d6dc333fef348806d2809cb501253
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list