The branch, master has been updated
       via  071db4b81cca7fe041dc41a109e84f8643c43fb5 (commit)
       via  141f5c9071e10c08d0ca35fb8b663ee17ad5f709 (commit)
       via  6bdea3ae2380f238188b87832e4629436eea55a4 (commit)
      from  c4ce51ee62205c74604767f1b7dab6a036edac7f (commit)


- Log -----------------------------------------------------------------
commit 071db4b81cca7fe041dc41a109e84f8643c43fb5
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Oct 28 22:30:21 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Mon Nov 10 12:22:05 2025 +0800

    tests/fate/hevc: add a mv-hevc sample using long term ref

diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak
index 739735802e..351f188968 100644
--- a/tests/fate/hevc.mak
+++ b/tests/fate/hevc.mak
@@ -303,6 +303,11 @@ FATE_HEVC-$(call FRAMECRC, HEVC, HEVC, SCALE_FILTER 
CONCAT_PROTOCOL) += fate-hev
 fate-hevc-mv-position: CMD = framecrc -i $(TARGET_SAMPLES)/hevc/multiview.mov 
-map 0:v:vpos:left -map 0:v:vpos:right
 FATE_HEVC-$(call FRAMECRC, MOV, HEVC) += fate-hevc-mv-position
 
+# The sample is from PICO VR. It use long term ref.
+# Check long term ref being reset in IDR frame.
+fate-hevc-mv-ltr: CMD = framecrc -i $(TARGET_SAMPLES)/hevc/pico-mv-hevc.mp4 
-map 0:vidx:1
+FATE_HEVC-$(call FRAMECRC, MOV, HEVC) += fate-hevc-mv-ltr
+
 fate-hevc-alpha: CMD = framecrc -i $(TARGET_SAMPLES)/hevc/alpha.mp4
 FATE_HEVC-$(call FRAMECRC, MOV, HEVC) += fate-hevc-alpha
 
diff --git a/tests/ref/fate/hevc-mv-ltr b/tests/ref/fate/hevc-mv-ltr
new file mode 100644
index 0000000000..e342fbb6ca
--- /dev/null
+++ b/tests/ref/fate/hevc-mv-ltr
@@ -0,0 +1,68 @@
+#tb 0: 1/60
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 2048x1536
+#sar 0: 0/1
+0,          0,          0,        1,  4718592, 0xa201f61d
+0,          1,          1,        1,  4718592, 0x63438b04
+0,          2,          2,        1,  4718592, 0xb2ef2022
+0,          3,          3,        1,  4718592, 0x9bcd7e4e
+0,          4,          4,        1,  4718592, 0x7d84b453
+0,          5,          5,        1,  4718592, 0xe1825fd9
+0,          6,          6,        1,  4718592, 0x4d3fa47e
+0,          7,          7,        1,  4718592, 0x3717852e
+0,          8,          8,        1,  4718592, 0x3b894106
+0,          9,          9,        1,  4718592, 0x94b23d4d
+0,         10,         10,        1,  4718592, 0x813ef53f
+0,         11,         11,        1,  4718592, 0xa4fd9eb2
+0,         12,         12,        1,  4718592, 0x719308ab
+0,         13,         13,        1,  4718592, 0xcc53abdb
+0,         14,         14,        1,  4718592, 0x69a1fbad
+0,         15,         15,        1,  4718592, 0xb1dee2e6
+0,         16,         16,        1,  4718592, 0x8892b11a
+0,         17,         17,        1,  4718592, 0xeea14ec7
+0,         18,         18,        1,  4718592, 0x1c8351a2
+0,         19,         19,        1,  4718592, 0x616a56d6
+0,         20,         20,        1,  4718592, 0x166e9329
+0,         21,         21,        1,  4718592, 0xe62a5ada
+0,         22,         22,        1,  4718592, 0x7ad680b9
+0,         23,         23,        1,  4718592, 0xa6c5d534
+0,         24,         24,        1,  4718592, 0xfbfbfd9a
+0,         25,         25,        1,  4718592, 0x30c3a53f
+0,         26,         26,        1,  4718592, 0x7229cad1
+0,         27,         27,        1,  4718592, 0x2703bd48
+0,         28,         28,        1,  4718592, 0xc46880e9
+0,         29,         29,        1,  4718592, 0x9480ac78
+0,         30,         30,        1,  4718592, 0xc9410aa9
+0,         31,         31,        1,  4718592, 0x7094d03d
+0,         32,         32,        1,  4718592, 0x63b02bce
+0,         33,         33,        1,  4718592, 0x5b7bf9c5
+0,         34,         34,        1,  4718592, 0x99af0869
+0,         35,         35,        1,  4718592, 0x54b382b6
+0,         36,         36,        1,  4718592, 0xc2511916
+0,         37,         37,        1,  4718592, 0x9833e473
+0,         38,         38,        1,  4718592, 0x91062ed4
+0,         39,         39,        1,  4718592, 0x47669bea
+0,         40,         40,        1,  4718592, 0x0bde1655
+0,         41,         41,        1,  4718592, 0x0c638749
+0,         42,         42,        1,  4718592, 0x4d5c380a
+0,         43,         43,        1,  4718592, 0x1780c529
+0,         44,         44,        1,  4718592, 0xe16a41da
+0,         45,         45,        1,  4718592, 0xfc265995
+0,         46,         46,        1,  4718592, 0x4fa62cc5
+0,         47,         47,        1,  4718592, 0x3c1263dc
+0,         48,         48,        1,  4718592, 0x43e21353
+0,         49,         49,        1,  4718592, 0x81a20ca5
+0,         50,         50,        1,  4718592, 0x74a6065b
+0,         51,         51,        1,  4718592, 0x5305f734
+0,         52,         52,        1,  4718592, 0xe287f597
+0,         53,         53,        1,  4718592, 0xc7c5dd6b
+0,         54,         54,        1,  4718592, 0x5b173885
+0,         55,         55,        1,  4718592, 0xb146d1f2
+0,         56,         56,        1,  4718592, 0x9c462f75
+0,         57,         57,        1,  4718592, 0x5214a211
+0,         58,         58,        1,  4718592, 0x473dd1c2
+0,         59,         59,        1,  4718592, 0x85efaa75
+0,         60,         60,        1,  4718592, 0x0885206c
+0,         61,         61,        1,  4718592, 0xe591f7c0
+0,         62,         62,        1,  4718592, 0xecd67225

commit 141f5c9071e10c08d0ca35fb8b663ee17ad5f709
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Oct 28 20:25:12 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Mon Nov 10 12:22:05 2025 +0800

    avcodec/hevc: reset long_term_rps.nb_refs for IDR
    
    For mv-hevc, the second layer of IDR frame can be a P slice.
    long_term_rps wasn't been reset before the patch, which leading to
    ff_hevc_frame_nb_refs return incorrect result.
    
    This fix decoding failure for samples from Pico VR.

diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 8d432a9a1f..3f471dbc14 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -917,6 +917,7 @@ static int hls_slice_header(SliceHeader *sh, const 
HEVCContext *s, GetBitContext
             sh->short_term_ref_pic_set_size     = 0;
             sh->short_term_rps                  = NULL;
             sh->long_term_ref_pic_set_size      = 0;
+            sh->long_term_rps.nb_refs           = 0;
             sh->slice_temporal_mvp_enabled_flag = 0;
         }
 

commit 6bdea3ae2380f238188b87832e4629436eea55a4
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Oct 28 20:20:23 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Mon Nov 10 12:22:05 2025 +0800

    avcodec/hevc: remove an always true condition
    
    long_rps is &sh->long_term_rps.

diff --git a/libavcodec/hevc/refs.c b/libavcodec/hevc/refs.c
index 15f37bfcd8..ccf7258ec4 100644
--- a/libavcodec/hevc/refs.c
+++ b/libavcodec/hevc/refs.c
@@ -626,10 +626,8 @@ int ff_hevc_frame_nb_refs(const SliceHeader *sh, const 
HEVCPPS *pps,
             ret += !!(rps->used & (1 << i));
     }
 
-    if (long_rps) {
-        for (i = 0; i < long_rps->nb_refs; i++)
-            ret += !!long_rps->used[i];
-    }
+    for (i = 0; i < long_rps->nb_refs; i++)
+        ret += !!long_rps->used[i];
 
     if (sh->inter_layer_pred) {
         av_assert0(pps->sps->vps->num_direct_ref_layers[layer_idx] < 2);

-----------------------------------------------------------------------

Summary of changes:
 libavcodec/hevc/hevcdec.c  |  1 +
 libavcodec/hevc/refs.c     |  6 ++--
 tests/fate/hevc.mak        |  5 ++++
 tests/ref/fate/hevc-mv-ltr | 68 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 4 deletions(-)
 create mode 100644 tests/ref/fate/hevc-mv-ltr


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to