[x265] silence GCC 7 warnings
Mateusz Brzostek
mateusz at msystem.waw.pl
Sat Feb 11 19:58:19 CET 2017
Sorry for previous patch (problems with spaces).
Proper patch in attachment.
Mateusz
-------------- next part --------------
# HG changeset patch
# User Ma0 <mateuszb at poczta.onet.pl>
# Date 1486838752 -3600
# Sat Feb 11 19:45:52 2017 +0100
# Node ID 4501964283cf57c636f33c8978ee0297b1af1592
# Parent fe2f2dd96f8cf9fb88a720a96aab4ff5b21768df
silence GCC 7 warnings
diff -r fe2f2dd96f8c -r 4501964283cf source/common/bitstream.cpp
--- a/source/common/bitstream.cpp Fri Feb 10 14:23:32 2017 +0530
+++ b/source/common/bitstream.cpp Sat Feb 11 19:45:52 2017 +0100
@@ -64,9 +64,9 @@
switch (writeBytes)
{
- case 4: push_back(write_bits >> 24);
- case 3: push_back(write_bits >> 16);
- case 2: push_back(write_bits >> 8);
+ case 4: push_back(write_bits >> 24); // fall-through
+ case 3: push_back(write_bits >> 16); // fall-through
+ case 2: push_back(write_bits >> 8); // fall-through
case 1: push_back(write_bits);
}
diff -r fe2f2dd96f8c -r 4501964283cf source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Fri Feb 10 14:23:32 2017 +0530
+++ b/source/encoder/ratecontrol.cpp Sat Feb 11 19:45:52 2017 +0100
@@ -1896,20 +1896,20 @@
else if (m_framesDone == 0 && !m_isVbv && m_param->rc.rateControlMode == X265_RC_ABR)
{
/* for ABR alone, clip the first I frame qp */
- lqmax = (m_lstep * m_isGrainEnabled) ? x265_qp2qScale(ABR_INIT_QP_GRAIN_MAX) :
+ lqmax = (m_isGrainEnabled && m_lstep) ? x265_qp2qScale(ABR_INIT_QP_GRAIN_MAX) :
x265_qp2qScale(ABR_INIT_QP_MAX);
- q = X265_MIN(lqmax, q);
+ q = X265_MIN(lqmax, q);
}
q = x265_clip3(lqmin, lqmax, q);
/* Set a min qp at scenechanges and transitions */
if (m_isSceneTransition)
{
- double minScenecutQscale =x265_qp2qScale(ABR_SCENECUT_INIT_QP_MIN);
- q = X265_MAX(minScenecutQscale, q);
- m_lastQScaleFor[P_SLICE] = X265_MAX(minScenecutQscale, m_lastQScaleFor[P_SLICE]);
+ double minScenecutQscale = x265_qp2qScale(ABR_SCENECUT_INIT_QP_MIN);
+ q = X265_MAX(minScenecutQscale, q);
+ m_lastQScaleFor[P_SLICE] = X265_MAX(minScenecutQscale, m_lastQScaleFor[P_SLICE]);
}
rce->qpNoVbv = x265_qScale2qp(q);
- if(m_sliceType == P_SLICE)
+ if (m_sliceType == P_SLICE)
{
m_avgPFrameQp = m_avgPFrameQp == 0 ? rce->qpNoVbv : m_avgPFrameQp;
m_avgPFrameQp = (m_avgPFrameQp + rce->qpNoVbv) / 2;
More information about the x265-devel
mailing list