[x265] [PATCH] cli: rename input/output classes to be more specific
Steve Borho
steve at borho.org
Tue Mar 31 04:11:36 CEST 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1427767880 18000
# Mon Mar 30 21:11:20 2015 -0500
# Node ID 9b3ee9b369eb7e7329d8dbae8174adf160c121df
# Parent 45bac4cace5e485920b9786e54c035df0b0bcec3
cli: rename input/output classes to be more specific
Input -> InputFile
Output -> ReconFile
No behavior changes
diff -r 45bac4cace5e -r 9b3ee9b369eb source/input/input.cpp
--- a/source/input/input.cpp Mon Mar 30 12:44:33 2015 -0500
+++ b/source/input/input.cpp Mon Mar 30 21:11:20 2015 -0500
@@ -27,7 +27,7 @@
using namespace x265;
-Input* Input::open(InputFileInfo& info, bool bForceY4m)
+InputFile* InputFile::open(InputFileInfo& info, bool bForceY4m)
{
const char * s = strrchr(info.filename, '.');
diff -r 45bac4cace5e -r 9b3ee9b369eb source/input/input.h
--- a/source/input/input.h Mon Mar 30 12:44:33 2015 -0500
+++ b/source/input/input.h Mon Mar 30 21:11:20 2015 -0500
@@ -54,17 +54,17 @@
const char *filename;
};
-class Input
+class InputFile
{
protected:
- virtual ~Input() {}
+ virtual ~InputFile() {}
public:
- Input() {}
+ InputFile() {}
- static Input* open(InputFileInfo& info, bool bForceY4m);
+ static InputFile* open(InputFileInfo& info, bool bForceY4m);
virtual void startReader() = 0;
diff -r 45bac4cace5e -r 9b3ee9b369eb source/input/y4m.h
--- a/source/input/y4m.h Mon Mar 30 12:44:33 2015 -0500
+++ b/source/input/y4m.h Mon Mar 30 21:11:20 2015 -0500
@@ -33,7 +33,7 @@
namespace x265 {
// x265 private namespace
-class Y4MInput : public Input, public Thread
+class Y4MInput : public InputFile, public Thread
{
protected:
diff -r 45bac4cace5e -r 9b3ee9b369eb source/input/yuv.h
--- a/source/input/yuv.h Mon Mar 30 12:44:33 2015 -0500
+++ b/source/input/yuv.h Mon Mar 30 21:11:20 2015 -0500
@@ -33,7 +33,7 @@
namespace x265 {
// private x265 namespace
-class YUVInput : public Input, public Thread
+class YUVInput : public InputFile, public Thread
{
protected:
diff -r 45bac4cace5e -r 9b3ee9b369eb source/output/output.cpp
--- a/source/output/output.cpp Mon Mar 30 12:44:33 2015 -0500
+++ b/source/output/output.cpp Mon Mar 30 21:11:20 2015 -0500
@@ -27,7 +27,7 @@
using namespace x265;
-Output* Output::open(const char *fname, int width, int height, uint32_t bitdepth, uint32_t fpsNum, uint32_t fpsDenom, int csp)
+ReconFile* ReconFile::open(const char *fname, int width, int height, uint32_t bitdepth, uint32_t fpsNum, uint32_t fpsDenom, int csp)
{
const char * s = strrchr(fname, '.');
diff -r 45bac4cace5e -r 9b3ee9b369eb source/output/output.h
--- a/source/output/output.h Mon Mar 30 12:44:33 2015 -0500
+++ b/source/output/output.h Mon Mar 30 21:11:20 2015 -0500
@@ -29,18 +29,18 @@
namespace x265 {
// private x265 namespace
-class Output
+class ReconFile
{
protected:
- virtual ~Output() {}
+ virtual ~ReconFile() {}
public:
- Output() {}
+ ReconFile() {}
- static Output* open(const char *fname, int width, int height, uint32_t bitdepth,
- uint32_t fpsNum, uint32_t fpsDenom, int csp);
+ static ReconFile* open(const char *fname, int width, int height, uint32_t bitdepth,
+ uint32_t fpsNum, uint32_t fpsDenom, int csp);
virtual bool isFail() const = 0;
diff -r 45bac4cace5e -r 9b3ee9b369eb source/output/y4m.h
--- a/source/output/y4m.h Mon Mar 30 12:44:33 2015 -0500
+++ b/source/output/y4m.h Mon Mar 30 21:11:20 2015 -0500
@@ -30,7 +30,7 @@
namespace x265 {
// private x265 namespace
-class Y4MOutput : public Output
+class Y4MOutput : public ReconFile
{
protected:
diff -r 45bac4cace5e -r 9b3ee9b369eb source/output/yuv.h
--- a/source/output/yuv.h Mon Mar 30 12:44:33 2015 -0500
+++ b/source/output/yuv.h Mon Mar 30 21:11:20 2015 -0500
@@ -32,7 +32,7 @@
namespace x265 {
// private x265 namespace
-class YUVOutput : public Output
+class YUVOutput : public ReconFile
{
protected:
diff -r 45bac4cace5e -r 9b3ee9b369eb source/x265.cpp
--- a/source/x265.cpp Mon Mar 30 12:44:33 2015 -0500
+++ b/source/x265.cpp Mon Mar 30 21:11:20 2015 -0500
@@ -68,8 +68,8 @@
struct CLIOptions
{
- Input* input;
- Output* recon;
+ InputFile* input;
+ ReconFile* recon;
std::fstream bitstreamFile;
bool bProgress;
bool bForceY4m;
@@ -335,7 +335,7 @@
info.frameCount = 0;
getParamAspectRatio(param, info.sarWidth, info.sarHeight);
- this->input = Input::open(info, this->bForceY4m);
+ this->input = InputFile::open(info, this->bForceY4m);
if (!this->input || this->input->isFail())
{
x265_log(param, X265_LOG_ERROR, "unable to open input file <%s>\n", inputfn);
@@ -393,8 +393,8 @@
{
if (reconFileBitDepth == 0)
reconFileBitDepth = param->internalBitDepth;
- this->recon = Output::open(reconfn, param->sourceWidth, param->sourceHeight, reconFileBitDepth,
- param->fpsNum, param->fpsDenom, param->internalCsp);
+ this->recon = ReconFile::open(reconfn, param->sourceWidth, param->sourceHeight, reconFileBitDepth,
+ param->fpsNum, param->fpsDenom, param->internalCsp);
if (this->recon->isFail())
{
x265_log(param, X265_LOG_WARNING, "unable to write reconstruction file\n");
More information about the x265-devel
mailing list