Ticket #1620: parcat_fix.patch

File parcat_fix.patch, 1.4 KB (added by crosewarne, 9 months ago)

Patch for parcat

Line 
1--- a/source/App/Parcat/parcat.cpp
2+++ b/source/App/Parcat/parcat.cpp
3@@ -220,6 +220,7 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int
4 
5   int bits_for_poc = 8;
6   bool skip_next_sei = false;
7+  bool skip_first_prefix_sei = idx > 1;
8   bool change_poc = false;
9   bool first_idr_slice_after_ph_nal = false;
10 
11@@ -331,7 +332,7 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int
12     }
13     if ((idx > 1 && (nalu_type == NAL_UNIT_CODED_SLICE_IDR_W_RADL || nalu_type == NAL_UNIT_CODED_SLICE_IDR_N_LP))
14       || ((idx > 1 && !idr_found) && (nalu_type == NAL_UNIT_OPI || nalu_type == NAL_UNIT_DCI || nalu_type == NAL_UNIT_VPS || nalu_ty
15pe == NAL_UNIT_SPS || nalu_type == NAL_UNIT_PPS || nalu_type == NAL_UNIT_PREFIX_APS || nalu_type == NAL_UNIT_SUFFIX_APS || nalu_type
16== NAL_UNIT_PH || nalu_type == NAL_UNIT_ACCESS_UNIT_DELIMITER))
17-      || (nalu_type == NAL_UNIT_SUFFIX_SEI && skip_next_sei))
18+      || ((nalu_type == NAL_UNIT_SUFFIX_SEI) && skip_next_sei) || ((nalu_type == NAL_UNIT_PREFIX_SEI) && skip_first_prefix_sei))
19     {
20     }
21     else
22@@ -344,6 +345,10 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int
23     {
24       skip_next_sei = false;
25     }
26+    if(nalu_type == NAL_UNIT_PREFIX_SEI && skip_first_prefix_sei)
27+    {
28+      skip_first_prefix_sei = false;
29+    }
30 
31 
32     p += (nal_end - nal_start);
33