[x265] [PATCH] tcomslice : removed set and get window*offset() methods
Gopu Govindaswamy
gopu at multicorewareinc.com
Mon Oct 21 11:16:43 CEST 2013
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1382346994 -19800
# Node ID 390f065d76a5e9fde050c099ab74c5a49d78d791
# Parent 6c0df3f74cc7c3d2dcff2e022609531d5d569b15
tcomslice : removed set and get window*offset() methods
diff -r 6c0df3f74cc7 -r 390f065d76a5 source/Lib/TLibCommon/TComPic.cpp
--- a/source/Lib/TLibCommon/TComPic.cpp Mon Oct 21 14:22:49 2013 +0530
+++ b/source/Lib/TLibCommon/TComPic.cpp Mon Oct 21 14:46:34 2013 +0530
@@ -83,7 +83,7 @@
m_reconPicYuv->create(cfg->param.sourceWidth, cfg->param.sourceHeight, g_maxCUWidth, g_maxCUHeight, g_maxCUDepth);
/* store conformance window parameters with picture */
- m_conformanceWindow = cfg->getConformanceWindow();
+ m_conformanceWindow = cfg->m_conformanceWindow;
/* store display window parameters with picture */
m_defaultDisplayWindow = cfg->getDefaultDisplayWindow();
diff -r 6c0df3f74cc7 -r 390f065d76a5 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h Mon Oct 21 14:22:49 2013 +0530
+++ b/source/Lib/TLibCommon/TComSlice.h Mon Oct 21 14:46:34 2013 +0530
@@ -574,34 +574,6 @@
, m_winBottomOffset(0)
{}
- bool getWindowEnabledFlag() const { return m_enabledFlag; }
-
- void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; }
-
- int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; }
-
- void setWindowLeftOffset(int val) { m_winLeftOffset = val; m_enabledFlag = true; }
-
- int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; }
-
- void setWindowRightOffset(int val) { m_winRightOffset = val; m_enabledFlag = true; }
-
- int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; }
-
- void setWindowTopOffset(int val) { m_winTopOffset = val; m_enabledFlag = true; }
-
- int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset : 0; }
-
- void setWindowBottomOffset(int val) { m_winBottomOffset = val; m_enabledFlag = true; }
-
- void setWindow(int offsetLeft, int offsetLRight, int offsetLTop, int offsetLBottom)
- {
- m_enabledFlag = true;
- m_winLeftOffset = offsetLeft;
- m_winRightOffset = offsetLRight;
- m_winTopOffset = offsetLTop;
- m_winBottomOffset = offsetLBottom;
- }
};
class TComVUI
diff -r 6c0df3f74cc7 -r 390f065d76a5 source/Lib/TLibEncoder/TEncCavlc.cpp
--- a/source/Lib/TLibEncoder/TEncCavlc.cpp Mon Oct 21 14:22:49 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncCavlc.cpp Mon Oct 21 14:46:34 2013 +0530
@@ -265,13 +265,13 @@
WRITE_FLAG(vui->getFrameFieldInfoPresentFlag(), "frame_field_info_present_flag");
Window defaultDisplayWindow = vui->getDefaultDisplayWindow();
- WRITE_FLAG(defaultDisplayWindow.getWindowEnabledFlag(), "default_display_window_flag");
- if (defaultDisplayWindow.getWindowEnabledFlag())
+ WRITE_FLAG(defaultDisplayWindow.m_enabledFlag, "default_display_window_flag");
+ if (defaultDisplayWindow.m_enabledFlag)
{
- WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset(), "def_disp_win_left_offset");
- WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset(), "def_disp_win_right_offset");
- WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset(), "def_disp_win_top_offset");
- WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset(), "def_disp_win_bottom_offset");
+ WRITE_UVLC(defaultDisplayWindow.m_winLeftOffset, "def_disp_win_left_offset");
+ WRITE_UVLC(defaultDisplayWindow.m_winRightOffset, "def_disp_win_right_offset");
+ WRITE_UVLC(defaultDisplayWindow.m_winTopOffset, "def_disp_win_top_offset");
+ WRITE_UVLC(defaultDisplayWindow.m_winBottomOffset, "def_disp_win_bottom_offset");
}
TimingInfo *timingInfo = vui->getTimingInfo();
WRITE_FLAG(timingInfo->getTimingInfoPresentFlag(), "vui_timing_info_present_flag");
@@ -399,13 +399,13 @@
WRITE_UVLC(sps->getPicHeightInLumaSamples(), "pic_height_in_luma_samples");
Window conf = sps->getConformanceWindow();
- WRITE_FLAG(conf.getWindowEnabledFlag(), "conformance_window_flag");
- if (conf.getWindowEnabledFlag())
+ WRITE_FLAG(conf.m_enabledFlag, "conformance_window_flag");
+ if (conf.m_enabledFlag)
{
- WRITE_UVLC(conf.getWindowLeftOffset() / TComSPS::getWinUnitX(sps->getChromaFormatIdc()), "conf_win_left_offset");
- WRITE_UVLC(conf.getWindowRightOffset() / TComSPS::getWinUnitX(sps->getChromaFormatIdc()), "conf_win_right_offset");
- WRITE_UVLC(conf.getWindowTopOffset() / TComSPS::getWinUnitY(sps->getChromaFormatIdc()), "conf_win_top_offset");
- WRITE_UVLC(conf.getWindowBottomOffset() / TComSPS::getWinUnitY(sps->getChromaFormatIdc()), "conf_win_bottom_offset");
+ WRITE_UVLC(conf.m_winLeftOffset / TComSPS::getWinUnitX(sps->getChromaFormatIdc()), "conf_win_left_offset");
+ WRITE_UVLC(conf.m_winRightOffset / TComSPS::getWinUnitX(sps->getChromaFormatIdc()), "conf_win_right_offset");
+ WRITE_UVLC(conf.m_winTopOffset / TComSPS::getWinUnitY(sps->getChromaFormatIdc()), "conf_win_top_offset");
+ WRITE_UVLC(conf.m_winBottomOffset / TComSPS::getWinUnitY(sps->getChromaFormatIdc()), "conf_win_bottom_offset");
}
WRITE_UVLC(sps->getBitDepthY() - 8, "bit_depth_luma_minus8");
diff -r 6c0df3f74cc7 -r 390f065d76a5 source/Lib/TLibEncoder/TEncCfg.h
--- a/source/Lib/TLibEncoder/TEncCfg.h Mon Oct 21 14:22:49 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncCfg.h Mon Oct 21 14:46:34 2013 +0530
@@ -59,7 +59,6 @@
//==== File I/O ========
int m_conformanceMode;
- Window m_conformanceWindow;
Window m_defaultDisplayWindow; ///< Represents the default display window parameters
TComVPS m_vps;
@@ -158,6 +157,7 @@
x265_param_t param;
int m_pad[2];
+ Window m_conformanceWindow;
TEncCfg()
{}
@@ -167,8 +167,6 @@
TComVPS *getVPS() { return &m_vps; }
- Window &getConformanceWindow() { return m_conformanceWindow; }
-
//====== Coding Structure ========
int getMaxRefPicNum() { return m_maxRefPicNum; }
diff -r 6c0df3f74cc7 -r 390f065d76a5 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Oct 21 14:22:49 2013 +0530
+++ b/source/encoder/encoder.cpp Mon Oct 21 14:46:34 2013 +0530
@@ -1003,6 +1003,13 @@
m_conformanceWindow.m_winBottomOffset = 0;
m_conformanceWindow.m_winLeftOffset = 0;
+ //========= set default confirmation window ==================================
+ m_defaultDisplayWindow.m_enabledFlag = true;
+ m_defaultDisplayWindow.m_winRightOffset = 0;
+ m_defaultDisplayWindow.m_winTopOffset = 0;
+ m_defaultDisplayWindow.m_winBottomOffset = 0;
+ m_defaultDisplayWindow.m_winLeftOffset = 0;
+
m_progressiveSourceFlag = true;
m_interlacedSourceFlag = false;
m_nonPackedConstraintFlag = false;
@@ -1034,7 +1041,6 @@
m_chromaSampleLocTypeTopField = 0;
m_chromaSampleLocTypeBottomField = 0;
m_neutralChromaIndicationFlag = false;
- m_defaultDisplayWindow.setWindow(0, 0, 0, 0);
m_frameFieldInfoPresentFlag = false;
m_pocProportionalToTimingFlag = false;
m_numTicksPocDiffOneMinus1 = 0;
More information about the x265-devel
mailing list