Skip to content

Commit

Permalink
Merge pull request #112 from jcdr428/Correct_CPI_Table_for_UHD
Browse files Browse the repository at this point in the history
Correct cpi table for uhd
  • Loading branch information
lighterowl authored Jan 6, 2020
2 parents 3ad0a4f + 410a170 commit 0c24c4f
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions tsMuxer/tsPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,22 +962,38 @@ void CLPIParser::composeEP_map_for_one_stream_PID(BitStreamWriter& writer, M2TSS
writer.putBit(0); //is_angle_change_point[EP_fine_id] 1 bslbf
int endCode = 0;
if (indexData.m_frameLen > 0) {
if (indexData.m_frameLen < 131072)
endCode = 1;
else if (indexData.m_frameLen < 131072)
endCode = 1;
else if (indexData.m_frameLen < 262144)
endCode = 2;
else if (indexData.m_frameLen < 393216)
endCode = 3;
else if (indexData.m_frameLen < 589824)
endCode = 4;
else if (indexData.m_frameLen < 917504)
endCode = 5;
else if (indexData.m_frameLen < 1310720)
endCode = 6;
else
endCode = 7;
if (V3_flags) {
if (indexData.m_frameLen < 786432)
endCode = 1;
else if (indexData.m_frameLen < 1572864)
endCode = 2;
else if (indexData.m_frameLen < 2359296)
endCode = 3;
else if (indexData.m_frameLen < 3145728)
endCode = 4;
else if (indexData.m_frameLen < 3932160)
endCode = 5;
else if (indexData.m_frameLen < 4718592)
endCode = 6;
else
endCode = 7;
}
else {
if (indexData.m_frameLen < 131072)
endCode = 1;
else if (indexData.m_frameLen < 262144)
endCode = 2;
else if (indexData.m_frameLen < 393216)
endCode = 3;
else if (indexData.m_frameLen < 589824)
endCode = 4;
else if (indexData.m_frameLen < 917504)
endCode = 5;
else if (indexData.m_frameLen < 1310720)
endCode = 6;
else
endCode = 7;
}
}
writer.putBits(3, endCode); //I_end_position_offset[EP_fine_id] 3 bslbf
writer.putBits(11, (itr->first >> 9) % 2048); //PTS_EP_fine[EP_fine_id] 11 uimsbf
Expand Down

0 comments on commit 0c24c4f

Please sign in to comment.