summaryrefslogtreecommitdiff
path: root/media-libs/x265/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-26 12:00:09 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-26 12:00:09 +0100
commitf300354de9fe5d997850456a9e1f400193e6544f (patch)
tree402fd6a7727db790bf57f683894052e8791d389e /media-libs/x265/files
parent5c42677148c717eb9f4673237db807f74740b4e9 (diff)
gentoo auto-resync : 26:08:2024 - 12:00:09
Diffstat (limited to 'media-libs/x265/files')
-rw-r--r--media-libs/x265/files/test-ns.patch55
-rw-r--r--media-libs/x265/files/x265-3.5-r5-cpp-std.patch23
-rw-r--r--media-libs/x265/files/x265-3.5-r5-gcc15.patch29
-rw-r--r--media-libs/x265/files/x265-3.5-r5-test-ns_2.patch11
-rw-r--r--media-libs/x265/files/x265-3.6-test-ns_2.patch30
-rw-r--r--media-libs/x265/files/x265-9999-test-ns.patch157
6 files changed, 201 insertions, 104 deletions
diff --git a/media-libs/x265/files/test-ns.patch b/media-libs/x265/files/test-ns.patch
index 898751a7ae2d..86cadade6a09 100644
--- a/media-libs/x265/files/test-ns.patch
+++ b/media-libs/x265/files/test-ns.patch
@@ -1,7 +1,5 @@
Namespace functions for multi-bitdepth builds so that libraries are self-contained.
-Index: source/common/param.h
-===================================================================
--- source.orig/common/param.h
+++ source/common/param.h
@@ -53,6 +53,18 @@ int x265_param_default_preset(x265_param
@@ -23,8 +21,6 @@ Index: source/common/param.h
#define PARAM_NS X265_NS
#endif
}
-Index: source/encoder/api.cpp
-===================================================================
--- source.orig/encoder/api.cpp
+++ source/encoder/api.cpp
@@ -106,9 +106,9 @@ x265_encoder *x265_encoder_open(x265_par
@@ -58,15 +54,6 @@ Index: source/encoder/api.cpp
}
x265_copy_params(&save, encoder->m_latestParam);
int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);
-@@ -604,7 +604,7 @@ fail:
- *pi_nal = 0;
-
- if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
-- x265_csvlog_frame(encoder->m_param, pic_out);
-+ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
-
- if (numEncoded < 0)
- encoder->m_aborted = true;
@@ -637,7 +637,7 @@ void x265_vmaf_encoder_log(x265_encoder*
encoder->fetchStats(&stats, sizeof(stats));
int padx = encoder->m_sps.conformanceWindow.rightOffset;
@@ -76,15 +63,6 @@ Index: source/encoder/api.cpp
}
}
#endif
-@@ -651,7 +651,7 @@ void x265_encoder_log(x265_encoder* enc,
- encoder->fetchStats(&stats, sizeof(stats));
- int padx = encoder->m_sps.conformanceWindow.rightOffset;
- int pady = encoder->m_sps.conformanceWindow.bottomOffset;
-- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
-+ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
- }
- }
-
@@ -872,7 +872,7 @@ void x265_alloc_analysis_data(x265_param
return;
@@ -94,8 +72,6 @@ Index: source/encoder/api.cpp
}
void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis)
-Index: source/encoder/encoder.cpp
-===================================================================
--- source.orig/encoder/encoder.cpp
+++ source/encoder/encoder.cpp
@@ -186,8 +186,8 @@ void Encoder::create()
@@ -127,15 +103,6 @@ Index: source/encoder/encoder.cpp
X265_FREE(m_dupBuffer[i]);
}
-@@ -1592,7 +1592,7 @@ int Encoder::encode(const x265_picture*
- if (m_exportedPic)
- {
- if (!m_param->bUseAnalysisFile && m_param->analysisSave)
-- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
- ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
- m_exportedPic = NULL;
- m_dpb->recycleUnreferenced();
@@ -1968,7 +1968,7 @@ int Encoder::encode(const x265_picture*
/* Free up inputPic->analysisData since it has already been used */
@@ -280,8 +247,6 @@ Index: source/encoder/encoder.cpp
m_aborted = true; \
return; \
}\
-Index: source/common/param.cpp
-===================================================================
--- source.orig/common/param.cpp
+++ source/common/param.cpp
@@ -102,7 +102,7 @@ x265_param *x265_param_alloc()
@@ -293,3 +258,23 @@ Index: source/common/param.cpp
#ifdef SVT_HEVC
x265_free(p->svtHevcParam);
#endif
+--- source.orig/encoder/api.cpp
++++ source/encoder/api.cpp
+@@ -604,7 +604,7 @@ fail:
+ *pi_nal = 0;
+
+ if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
+- x265_csvlog_frame(encoder->m_param, pic_out);
++ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
+
+ if (numEncoded < 0)
+ encoder->m_aborted = true;
+@@ -651,7 +651,7 @@ void x265_encoder_log(x265_encoder* enc,
+ encoder->fetchStats(&stats, sizeof(stats));
+ int padx = encoder->m_sps.conformanceWindow.rightOffset;
+ int pady = encoder->m_sps.conformanceWindow.bottomOffset;
+- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
++ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
+ }
+ }
+
diff --git a/media-libs/x265/files/x265-3.5-r5-cpp-std.patch b/media-libs/x265/files/x265-3.5-r5-cpp-std.patch
new file mode 100644
index 000000000000..99fbf9bd75de
--- /dev/null
+++ b/media-libs/x265/files/x265-3.5-r5-cpp-std.patch
@@ -0,0 +1,23 @@
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Fri, 23 Aug 2024 14:31:40 +0200
+Subject: [PATCH] don't force old c++ standards
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -221,14 +221,6 @@ if(GCC)
+ if(NOT INTEL_CXX AND NOT CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
+ add_definitions(-Wno-class-memaccess)
+ endif()
+- if(ENABLE_HDR10_PLUS)
+- if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
+- message(FATAL_ERROR "gcc version above 4.8 required to support hdr10plus")
+- endif()
+- add_definitions(-std=gnu++11)
+- else()
+- add_definitions(-std=gnu++98)
+- endif()
+ if(ENABLE_PIC)
+ add_definitions(-fPIC)
+ endif(ENABLE_PIC)
diff --git a/media-libs/x265/files/x265-3.5-r5-gcc15.patch b/media-libs/x265/files/x265-3.5-r5-gcc15.patch
new file mode 100644
index 000000000000..6a474d3c192f
--- /dev/null
+++ b/media-libs/x265/files/x265-3.5-r5-gcc15.patch
@@ -0,0 +1,29 @@
+From: Ted Rodgers <ted.d.rodgers@gmail.com>
+Date: Fri, 23 Aug 2024 12:15:56 +0200
+Subject: [PATCH] Explicitly include <cstdint>
+
+GCC 15 will no longer include <cstdint> by default, resulting in build
+failures in projects that do not explicitly include it.
+
+Error:
+/var/tmp/portage/media-libs/x265-3.5-r4/work/x265_3.5/source/dynamicHDR10/json11/json11.cpp:101:32: error: ‘uint8_t’ does not name a type
+ 101 | } else if (static_cast<uint8_t>(ch) <= 0x1f) {
+ | ^~~~~~~
+/var/tmp/portage/media-libs/x265-3.5-r4/work/x265_3.5/source/dynamicHDR10/json11/json11.cpp:28:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
+ 27 | #include <limits>
+ +++ |+#include <cstdint>
+ 28 |
+
+See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/dynamicHDR10/json11/json11.cpp
++++ b/dynamicHDR10/json11/json11.cpp
+@@ -25,6 +25,7 @@
+ #include <cstdlib>
+ #include <cstdio>
+ #include <limits>
++#include <cstdint>
+
+ #if _MSC_VER
+ #pragma warning(disable: 4510) //const member cannot be default initialized
diff --git a/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch b/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch
new file mode 100644
index 000000000000..eec119f7f923
--- /dev/null
+++ b/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch
@@ -0,0 +1,11 @@
+--- source.orig/encoder/encoder.cpp
++++ source/encoder/encoder.cpp
+@@ -1592,7 +1592,7 @@ int Encoder::encode(const x265_picture*
+ if (m_exportedPic)
+ {
+ if (!m_param->bUseAnalysisFile && m_param->analysisSave)
+- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
+ ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
+ m_exportedPic = NULL;
+ m_dpb->recycleUnreferenced();
diff --git a/media-libs/x265/files/x265-3.6-test-ns_2.patch b/media-libs/x265/files/x265-3.6-test-ns_2.patch
new file mode 100644
index 000000000000..63308e5bb48d
--- /dev/null
+++ b/media-libs/x265/files/x265-3.6-test-ns_2.patch
@@ -0,0 +1,30 @@
+--- source.orig/encoder/encoder.cpp
++++ source/encoder/encoder.cpp
+@@ -1478,7 +1478,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+ if (m_exportedPic)
+ {
+ if (!m_param->bUseAnalysisFile && m_param->analysisSave)
+- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
+
+ ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
+
+--- a/common/threadpool.cpp
++++ b/common/threadpool.cpp
+@@ -25,6 +25,7 @@
+ #include "common.h"
+ #include "threadpool.h"
+ #include "threading.h"
++#include "param.h"
+
+ #include <new>
+
+@@ -314,7 +315,7 @@ ThreadPool* ThreadPool::allocThreadPools(x265_param* p, int& numPools, bool isTh
+ sprintf(nextCount, "%d", cpusPerNode[i]);
+ strcat(poolString, nextCount);
+ }
+- x265_param_parse(p, "pools", poolString);
++ PARAM_NS::x265_param_parse(p, "pools", poolString);
+ }
+ #endif
+ if (p->numaPools && *p->numaPools)
diff --git a/media-libs/x265/files/x265-9999-test-ns.patch b/media-libs/x265/files/x265-9999-test-ns.patch
index ed3de18ae83e..35859c54455e 100644
--- a/media-libs/x265/files/x265-9999-test-ns.patch
+++ b/media-libs/x265/files/x265-9999-test-ns.patch
@@ -31,6 +31,25 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
#define PARAM_NS X265_NS
#endif
}
+--- a/common/threadpool.cpp
++++ b/common/threadpool.cpp
+@@ -25,6 +25,7 @@
+ #include "common.h"
+ #include "threadpool.h"
+ #include "threading.h"
++#include "param.h"
+
+ #include <new>
+
+@@ -314,7 +315,7 @@ ThreadPool* ThreadPool::allocThreadPools(x265_param* p, int& numPools, bool isTh
+ sprintf(nextCount, "%d", cpusPerNode[i]);
+ strcat(poolString, nextCount);
+ }
+- x265_param_parse(p, "pools", poolString);
++ PARAM_NS::x265_param_parse(p, "pools", poolString);
+ }
+ #endif
+ if (p->numaPools && *p->numaPools)
--- a/encoder/api.cpp
+++ b/encoder/api.cpp
@@ -106,9 +106,9 @@ x265_encoder *x265_encoder_open(x265_param *p)
@@ -64,16 +83,16 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
}
x265_copy_params(&save, encoder->m_latestParam);
int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);
-@@ -602,7 +602,7 @@ fail:
- *pi_nal = 0;
-
+@@ -604,7 +604,7 @@ fail:
if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
-- x265_csvlog_frame(encoder->m_param, pic_out);
-+ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
+ {
+ for (int layer = 0; layer < encoder->m_param->numLayers; layer++)
+- x265_csvlog_frame(encoder->m_param, pic_out[layer]);
++ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out[layer]);
+ }
if (numEncoded < 0)
- encoder->m_aborted = true;
-@@ -643,7 +643,7 @@ void x265_vmaf_encoder_log(x265_encoder* enc, int argc, char **argv, x265_param
+@@ -646,7 +646,7 @@ void x265_vmaf_encoder_log(x265_encoder* enc, int argc, char **argv, x265_param
encoder->fetchStats(&stats, sizeof(stats));
int padx = encoder->m_sps.conformanceWindow.rightOffset;
int pady = encoder->m_sps.conformanceWindow.bottomOffset;
@@ -82,16 +101,16 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
}
}
#endif
-@@ -657,7 +657,7 @@ void x265_encoder_log(x265_encoder* enc, int argc, char **argv)
- encoder->fetchStats(&stats, sizeof(stats));
- int padx = encoder->m_sps.conformanceWindow.rightOffset;
- int pady = encoder->m_sps.conformanceWindow.bottomOffset;
-- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
-+ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
+@@ -662,7 +662,7 @@ void x265_encoder_log(x265_encoder* enc, int argc, char **argv)
+ for (int layer = 0; layer < encoder->m_param->numLayers; layer++)
+ {
+ encoder->fetchStats(stats, sizeof(stats[layer]), layer);
+- x265_csvlog_encode(encoder->m_param, &stats[0], padx, pady, argc, argv);
++ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats[0], padx, pady, argc, argv);
+ }
}
}
-
-@@ -878,7 +878,7 @@ void x265_alloc_analysis_data(x265_param *param, x265_analysis_data* analysis)
+@@ -884,7 +884,7 @@ void x265_alloc_analysis_data(x265_param *param, x265_analysis_data* analysis)
return;
fail:
@@ -102,7 +121,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis)
--- a/encoder/encoder.cpp
+++ b/encoder/encoder.cpp
-@@ -216,8 +216,8 @@ void Encoder::create()
+@@ -217,8 +217,8 @@ void Encoder::create()
{
m_dupBuffer[i] = (AdaptiveFrameDuplication*)x265_malloc(sizeof(AdaptiveFrameDuplication));
m_dupBuffer[i]->dupPic = NULL;
@@ -113,7 +132,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_dupBuffer[i]->dupPlane = NULL;
m_dupBuffer[i]->dupPlane = X265_MALLOC(char, framesize);
m_dupBuffer[i]->dupPic->planes[0] = m_dupBuffer[i]->dupPlane;
-@@ -768,7 +768,7 @@ int Encoder::setAnalysisData(x265_analysis_data *analysis_data, int poc, uint32_
+@@ -774,7 +774,7 @@ int Encoder::setAnalysisData(x265_analysis_data *analysis_data, int poc, uint32_
curFrame->m_analysisData = (*analysis_data);
curFrame->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
curFrame->m_analysisData.numPartitions = m_param->num4x4Partitions;
@@ -122,7 +141,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
if (m_param->maxCUSize == 16)
{
if (analysis_data->sliceType == X265_TYPE_IDR || analysis_data->sliceType == X265_TYPE_I)
-@@ -872,7 +872,7 @@ void Encoder::destroy()
+@@ -881,7 +881,7 @@ void Encoder::destroy()
for (uint32_t i = 0; i < DUP_BUFFER; i++)
{
X265_FREE(m_dupBuffer[i]->dupPlane);
@@ -131,61 +150,61 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
X265_FREE(m_dupBuffer[i]);
}
-@@ -1478,7 +1478,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
- if (m_exportedPic)
+@@ -1491,7 +1491,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
+ if (*m_exportedPic)
{
if (!m_param->bUseAnalysisFile && m_param->analysisSave)
-- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-
- ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
+- x265_free_analysis_data(m_param, &m_exportedPic[0]->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic[0]->m_analysisData);
-@@ -1892,7 +1892,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
-
- /* Free up inputPic->analysisData since it has already been used */
- if ((m_param->analysisLoad && !m_param->analysisSave) || ((m_param->bAnalysisType == AVC_INFO) && slice->m_sliceType != I_SLICE))
-- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ for (int i = 0; i < m_param->numLayers; i++)
+ {
+@@ -1973,7 +1973,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
- if (pic_out)
- {
-@@ -1971,7 +1971,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
- writeAnalysisFile(&pic_out->analysisData, *outFrame->m_encData);
- pic_out->analysisData.saveParam = pic_out->analysisData.saveParam;
- if (m_param->bUseAnalysisFile)
-- x265_free_analysis_data(m_param, &pic_out->analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &pic_out->analysisData);
+ /* Free up inputPic->analysisData since it has already been used */
+ if ((m_param->analysisLoad && !m_param->analysisSave) || ((m_param->bAnalysisType == AVC_INFO) && slice->m_sliceType != I_SLICE))
+- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ if (pic_out[sLayer])
+ {
+ PicYuv* recpic = outFrame->m_reconPic[0];
+@@ -2052,7 +2052,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
+ writeAnalysisFile(&pic_out[sLayer]->analysisData, *outFrame->m_encData);
+ pic_out[sLayer]->analysisData.saveParam = pic_out[sLayer]->analysisData.saveParam;
+ if (m_param->bUseAnalysisFile)
+- x265_free_analysis_data(m_param, &pic_out[sLayer]->analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &pic_out[sLayer]->analysisData);
+ }
}
- }
- if (m_param->rc.bStatWrite && (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion))
-@@ -1986,7 +1986,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
- writeAnalysisFileRefine(&outFrame->m_analysisData, *outFrame->m_encData);
- }
- if (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion)
-- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
- if (m_param->internalCsp == X265_CSP_I400)
- {
- if (slice->m_sliceType == P_SLICE)
-@@ -2153,7 +2153,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+ if (m_param->rc.bStatWrite && (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion))
+@@ -2067,7 +2067,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
+ writeAnalysisFileRefine(&outFrame->m_analysisData, *outFrame->m_encData);
+ }
+ if (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion)
+- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ if (m_param->internalCsp == X265_CSP_I400)
+ {
+ if (slice->m_sliceType == P_SLICE)
+@@ -2250,7 +2250,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
uint32_t heightInCU = (m_param->sourceHeight + m_param->maxCUSize - 1) >> m_param->maxLog2CUSize;
- frameEnc->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
- frameEnc->m_analysisData.numPartitions = m_param->num4x4Partitions;
-- x265_alloc_analysis_data(m_param, &frameEnc->m_analysisData);
-+ PARAM_NS::x265_alloc_analysis_data(m_param, &frameEnc->m_analysisData);
- frameEnc->m_analysisData.poc = frameEnc->m_poc;
+ frameEnc[0]->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
+ frameEnc[0]->m_analysisData.numPartitions = m_param->num4x4Partitions;
+- x265_alloc_analysis_data(m_param, &frameEnc[0]->m_analysisData);
++ PARAM_NS::x265_alloc_analysis_data(m_param, &frameEnc[0]->m_analysisData);
+ frameEnc[0]->m_analysisData.poc = frameEnc[0]->m_poc;
if (m_param->rc.bStatRead)
- readAnalysisFile(&frameEnc->m_analysisData, frameEnc->m_poc, frameEnc->m_lowres.sliceType);
-@@ -2164,7 +2164,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+ readAnalysisFile(&frameEnc[0]->m_analysisData, frameEnc[0]->m_poc, frameEnc[0]->m_lowres.sliceType);
+@@ -2261,7 +2261,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
for (int i = 0; i < m_param->rc.zonefileCount; i++)
{
- if (m_param->rc.zones[i].startFrame == frameEnc->m_poc)
+ if (m_param->rc.zones[i].startFrame == frameEnc[0]->m_poc)
- x265_encoder_reconfig(this, m_param->rc.zones[i].zoneParam);
+ PARAM_NS::x265_encoder_reconfig(this, m_param->rc.zones[i].zoneParam);
}
}
-@@ -2307,7 +2307,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+@@ -2408,7 +2408,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
analysis->numCUsInFrame = numCUsInFrame;
analysis->numCuInHeight = heightInCU;
analysis->numPartitions = m_param->num4x4Partitions;
@@ -194,7 +213,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
}
if (m_param->bEnableTemporalSubLayers > 2)
{
-@@ -4434,7 +4434,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -4711,7 +4711,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
else if (fread(val, size, readSize, fileOffset) != readSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error reading analysis data\n");\
@@ -203,7 +222,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true;\
return;\
}\
-@@ -4470,7 +4470,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -4747,7 +4747,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
if (poc != curPoc || feof(m_analysisFileIn))
{
x265_log(NULL, X265_LOG_WARNING, "Error reading analysis data: Cannot find POC %d\n", curPoc);
@@ -212,7 +231,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
return;
}
}
-@@ -4504,7 +4504,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -4781,7 +4781,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
if (m_param->scaleFactor)
analysis->numPartitions *= factor;
/* Memory is allocated for inter and intra analysis data based on the slicetype */
@@ -221,7 +240,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
if (m_param->ctuDistortionRefine == CTU_DISTORTION_INTERNAL)
{
-@@ -4757,7 +4757,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -5034,7 +5034,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
else if (fread(val, size, readSize, fileOffset) != readSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error reading analysis data\n");\
@@ -230,7 +249,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true;\
return;\
}\
-@@ -4794,7 +4794,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -5071,7 +5071,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
if (poc != curPoc || feof(m_analysisFileIn))
{
x265_log(NULL, X265_LOG_WARNING, "Error reading analysis data: Cannot find POC %d\n", curPoc);
@@ -239,7 +258,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
return;
}
}
-@@ -4825,7 +4825,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -5102,7 +5102,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
analysis->numCuInHeight = cuLoc.heightInCU;
/* Memory is allocated for inter and intra analysis data based on the slicetype */
@@ -248,7 +267,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
if (m_param->ctuDistortionRefine == CTU_DISTORTION_INTERNAL)
{
-@@ -5440,7 +5440,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
+@@ -5717,7 +5717,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
if (fread(val, size, readSize, fileOffset) != readSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error reading analysis 2 pass data\n"); \
@@ -257,7 +276,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true; \
return; \
}\
-@@ -5454,7 +5454,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
+@@ -5731,7 +5731,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
if (poc != curPoc || feof(m_analysisFileIn))
{
x265_log(NULL, X265_LOG_WARNING, "Error reading analysis 2 pass data: Cannot find POC %d\n", curPoc);
@@ -266,7 +285,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
return;
}
/* Now arrived at the right frame, read the record */
-@@ -5561,7 +5561,7 @@ void Encoder::writeAnalysisFile(x265_analysis_data* analysis, FrameData &curEncD
+@@ -5838,7 +5838,7 @@ void Encoder::writeAnalysisFile(x265_analysis_data* analysis, FrameData &curEncD
if (fwrite(val, size, writeSize, fileOffset) < writeSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error writing analysis data\n");\
@@ -275,7 +294,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true;\
return;\
}\
-@@ -5783,7 +5783,7 @@ void Encoder::writeAnalysisFileRefine(x265_analysis_data* analysis, FrameData &c
+@@ -6060,7 +6060,7 @@ void Encoder::writeAnalysisFileRefine(x265_analysis_data* analysis, FrameData &c
if (fwrite(val, size, writeSize, fileOffset) < writeSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error writing analysis 2 pass data\n"); \