[x265] [PATCH] Rename usersei-file to nalu-file
indumathi at multicorewareinc.com
indumathi at multicorewareinc.com
Fri Jun 22 09:17:27 CEST 2018
# HG changeset patch
# User indumathi at multicorewareinc.com
# Date 1529648256 -19800
# Fri Jun 22 11:47:36 2018 +0530
# Node ID 8d1092f478c4ded9c6bd62a72501a99dc28bcec1
# Parent 656b5b442f0b636f5e56048886e1fbaa1c59d3e5
Rename usersei-file to nalu-file
diff -r 656b5b442f0b -r 8d1092f478c4 doc/reST/cli.rst
--- a/doc/reST/cli.rst Mon Jun 11 19:44:51 2018 +0530
+++ b/doc/reST/cli.rst Fri Jun 22 11:47:36 2018 +0530
@@ -2136,7 +2136,7 @@
Maximum luma value allowed for input pictures. Any values above max-luma
are clipped. No default.
-.. option:: --usersei-file <filename>
+.. option:: --nalu-file <filename>
Text file containing userSEI in POC order : <POC><space><PREFIX><space><NAL UNIT TYPE>/<SEI TYPE><space><SEI Payload>
Parse the input file specified and inserts SEI messages into the bitstream.
diff -r 656b5b442f0b -r 8d1092f478c4 source/common/param.cpp
--- a/source/common/param.cpp Mon Jun 11 19:44:51 2018 +0530
+++ b/source/common/param.cpp Fri Jun 22 11:47:36 2018 +0530
@@ -302,7 +302,7 @@
param->bDisableLookahead = 0;
param->bCopyPicToFrame = 1;
param->maxAUSizeFactor = 1;
- param->userSeiFile = NULL;
+ param->naluFile = NULL;
/* DCT Approximations */
param->bLowPassDct = 0;
@@ -1049,7 +1049,7 @@
OPT("pic-struct") p->pictureStructure = atoi(value);
OPT("chunk-start") p->chunkStart = atoi(value);
OPT("chunk-end") p->chunkEnd = atoi(value);
- OPT("usersei-file") p->userSeiFile = strdup(value);
+ OPT("nalu-file") p->naluFile = strdup(value);
else
return X265_PARAM_BAD_NAME;
}
diff -r 656b5b442f0b -r 8d1092f478c4 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Jun 11 19:44:51 2018 +0530
+++ b/source/encoder/encoder.cpp Fri Jun 22 11:47:36 2018 +0530
@@ -79,7 +79,7 @@
m_threadPool = NULL;
m_analysisFileIn = NULL;
m_analysisFileOut = NULL;
- m_seiFile = NULL;
+ m_naluFile = NULL;
m_offsetEmergency = NULL;
m_iFrameNum = 0;
m_iPPSQpMinus26 = 0;
@@ -413,19 +413,19 @@
m_emitCLLSEI = p->maxCLL || p->maxFALL;
- if (m_param->userSeiFile)
+ if (m_param->naluFile)
{
- m_seiFile = x265_fopen(m_param->userSeiFile, "r");
- if (!m_seiFile)
+ m_naluFile = x265_fopen(m_param->naluFile, "r");
+ if (!m_naluFile)
{
- x265_log_file(NULL, X265_LOG_ERROR, "%s file not found or Failed to open\n", m_param->userSeiFile);
+ x265_log_file(NULL, X265_LOG_ERROR, "%s file not found or Failed to open\n", m_param->naluFile);
m_aborted = true;
}
else
- m_enableUserSei = 1;
+ m_enableNal = 1;
}
else
- m_enableUserSei = 0;
+ m_enableNal = 0;
#if ENABLE_HDR10_PLUS
if (m_bToneMap)
@@ -797,8 +797,8 @@
}
X265_FREE(temp);
}
- if (m_seiFile)
- fclose(m_seiFile);
+ if (m_naluFile)
+ fclose(m_naluFile);
if (m_param)
{
if (m_param->csvfpt)
@@ -943,7 +943,7 @@
* Format of the file : <POC><space><PREFIX><space><NAL UNIT TYPE>/<SEI TYPE><space><SEI Payload> */
x265_sei_payload seiMsg;
seiMsg.payload = NULL;
- if (m_enableUserSei)
+ if (m_enableNal)
readUserSeiFile(seiMsg, m_pocLast);
if (pic_in->bitDepth < 8 || pic_in->bitDepth > 16)
{
@@ -1030,8 +1030,8 @@
if (m_bToneMap && toneMap.payload)
toneMapEnable = 1;
int numPayloads = pic_in->userSEI.numPayloads + toneMapEnable;
- if (m_enableUserSei && seiMsg.payload)
- numPayloads += m_enableUserSei;
+ if (m_enableNal && seiMsg.payload)
+ numPayloads += m_enableNal;
inFrame->m_userSEI.numPayloads = numPayloads;
if (inFrame->m_userSEI.numPayloads)
@@ -1047,7 +1047,7 @@
x265_sei_payload input;
if ((i == (numPayloads - 1)) && toneMapEnable)
input = toneMap;
- else if (m_enableUserSei)
+ else if (m_enableNal)
input = seiMsg;
else
input = pic_in->userSEI.payloads[i];
@@ -4739,9 +4739,9 @@
void Encoder::readUserSeiFile(x265_sei_payload& seiMsg, int curPoc)
{
char line[1024];
- while (!feof(m_seiFile))
+ while (!feof(m_naluFile))
{
- fgets(line, sizeof(line), m_seiFile);
+ fgets(line, sizeof(line), m_naluFile);
int poc = atoi(strtok(line, " "));
char *prefix = strtok(NULL, " ");
int nalType = atoi(strtok(NULL, "/"));
diff -r 656b5b442f0b -r 8d1092f478c4 source/encoder/encoder.h
--- a/source/encoder/encoder.h Mon Jun 11 19:44:51 2018 +0530
+++ b/source/encoder/encoder.h Fri Jun 22 11:47:36 2018 +0530
@@ -169,7 +169,7 @@
Frame* m_exportedPic;
FILE* m_analysisFileIn;
FILE* m_analysisFileOut;
- FILE* m_seiFile;
+ FILE* m_naluFile;
x265_param* m_param;
x265_param* m_latestParam; // Holds latest param during a reconfigure
RateControl* m_rateControl;
@@ -213,7 +213,7 @@
double m_cR;
int m_bToneMap; // Enables tone-mapping
- int m_enableUserSei;
+ int m_enableNal;
#ifdef ENABLE_HDR10_PLUS
const hdr10plus_api *m_hdr10plus_api;
diff -r 656b5b442f0b -r 8d1092f478c4 source/x265.h
--- a/source/x265.h Mon Jun 11 19:44:51 2018 +0530
+++ b/source/x265.h Fri Jun 22 11:47:36 2018 +0530
@@ -1642,7 +1642,7 @@
* Default 0 (disabled). */
int chunkEnd;
/* File containing base64 encoded SEI messages in POC order */
- const char* userSeiFile;
+ const char* naluFile;
} x265_param;
diff -r 656b5b442f0b -r 8d1092f478c4 source/x265cli.h
--- a/source/x265cli.h Mon Jun 11 19:44:51 2018 +0530
+++ b/source/x265cli.h Fri Jun 22 11:47:36 2018 +0530
@@ -304,7 +304,7 @@
{ "no-single-sei", no_argument, NULL, 0 },
{ "atc-sei", required_argument, NULL, 0 },
{ "pic-struct", required_argument, NULL, 0 },
- { "usersei-file", required_argument, NULL, 0 },
+ { "nalu-file", required_argument, NULL, 0 },
{ 0, 0, 0, 0 },
{ 0, 0, 0, 0 },
{ 0, 0, 0, 0 },
@@ -355,7 +355,7 @@
H0(" --dhdr10-info <filename> JSON file containing the Creative Intent Metadata to be encoded as Dynamic Tone Mapping\n");
H0(" --[no-]dhdr10-opt Insert tone mapping SEI only for IDR frames and when the tone mapping information changes. Default disabled\n");
#endif
- H0(" --usersei-file <filename> Text file containing SEI messages in the following format : <POC><space><PREFIX><space><NAL UNIT TYPE>/<SEI TYPE><space><SEI Payload>\n");
+ H0(" --nalu-file <filename> Text file containing SEI messages in the following format : <POC><space><PREFIX><space><NAL UNIT TYPE>/<SEI TYPE><space><SEI Payload>\n");
H0("-f/--frames <integer> Maximum number of frames to encode. Default all\n");
H0(" --seek <integer> First frame to encode\n");
H1(" --[no-]interlace <bff|tff> Indicate input pictures are interlace fields in temporal order. Default progressive\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 7328 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180622/f63baa9f/attachment.bin>
More information about the x265-devel
mailing list