summaryrefslogtreecommitdiff
path: root/multimedia/x265/files
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/x265/files')
-rw-r--r--multimedia/x265/files/patch-bug-42213
-rw-r--r--multimedia/x265/files/patch-md533
-rw-r--r--multimedia/x265/files/patch-source_CMakeLists.txt22
-rw-r--r--multimedia/x265/files/patch-source_encoder_api.cpp45
4 files changed, 67 insertions, 46 deletions
diff --git a/multimedia/x265/files/patch-bug-422 b/multimedia/x265/files/patch-bug-422
deleted file mode 100644
index b26f06db7be1..000000000000
--- a/multimedia/x265/files/patch-bug-422
+++ /dev/null
@@ -1,13 +0,0 @@
-See:
-
- https://bitbucket.org/multicoreware/x265/issues/422
-
---- common/pixel.cpp 2018-05-21 08:33:10 UTC
-+++ common/pixel.cpp 2018-08-05 21:57:26 UTC
-@@ -923,5 +923,5 @@
- {
- for (int i = 0; i < count; i++)
-- dst[i] = (uint16_t)(src[i] * 256.0);
-+ dst[i] = (int16_t)(src[i] * 256.0);
- }
-
diff --git a/multimedia/x265/files/patch-md5 b/multimedia/x265/files/patch-md5
deleted file mode 100644
index fea6f09f1d9b..000000000000
--- a/multimedia/x265/files/patch-md5
+++ /dev/null
@@ -1,33 +0,0 @@
-Use FreeBSD's MD5-implementation instead of yet another bundled one.
-
- -mi
-
---- common/CMakeLists.txt 2016-01-25 00:16:50.000000000 -0500
-+++ common/CMakeLists.txt 2016-02-02 17:57:52.620700000 -0500
-@@ -109,5 +109,4 @@
- threadpool.cpp threadpool.h
- wavefront.h wavefront.cpp
-- md5.cpp md5.h
- bitstream.h bitstream.cpp
- yuv.cpp yuv.h
---- common/picyuv.h 2016-01-25 00:16:50.000000000 -0500
-+++ common/picyuv.h 2016-02-02 21:52:24.690114000 -0500
-@@ -25,6 +25,8 @@
- #define X265_PICYUV_H
-
-+#include <sys/types.h>
-+#include <md5.h>
-+
- #include "common.h"
--#include "md5.h"
- #include "x265.h"
-
---- encoder/frameencoder.cpp 2016-01-25 00:16:50.000000000 -0500
-+++ encoder/frameencoder.cpp 2016-02-02 18:06:58.918647000 -0500
-@@ -667,5 +667,5 @@
- m_seiReconPictureDigest.m_method = SEIDecodedPictureHash::MD5;
- for (int i = 0; i < planes; i++)
-- MD5Final(&m_state[i], m_seiReconPictureDigest.m_digest[i]);
-+ MD5Final(m_seiReconPictureDigest.m_digest[i], &m_state[i]);
- }
- else if (m_param->decodedPictureHashSEI == 2)
diff --git a/multimedia/x265/files/patch-source_CMakeLists.txt b/multimedia/x265/files/patch-source_CMakeLists.txt
new file mode 100644
index 000000000000..d7c218ce3f51
--- /dev/null
+++ b/multimedia/x265/files/patch-source_CMakeLists.txt
@@ -0,0 +1,22 @@
+===> Checking for items in STAGEDIR missing from pkg-plist
+Error: Orphaned: bin/libSvtHevcEnc.so
+Error: Orphaned: include/EbApi.h
+Error: Orphaned: include/EbErrorCodes.h
+Error: Orphaned: include/EbTime.h
+
+--- source/CMakeLists.txt.orig 2019-01-23 09:47:18 UTC
++++ source/CMakeLists.txt
+@@ -570,13 +570,6 @@ if(ENABLE_HDR10_PLUS)
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+ endif()
+
+-if(SVTHEVC_FOUND)
+- install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbApi.h" DESTINATION include)
+- install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbErrorCodes.h" DESTINATION include)
+- install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbTime.h" DESTINATION include)
+- install(FILES "${SVT_HEVC_LIBRARY}" DESTINATION ${BIN_INSTALL_DIR})
+-endif()
+-
+ install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
+ if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
+ if(MSVC_IDE)
diff --git a/multimedia/x265/files/patch-source_encoder_api.cpp b/multimedia/x265/files/patch-source_encoder_api.cpp
new file mode 100644
index 000000000000..6b65641169f5
--- /dev/null
+++ b/multimedia/x265/files/patch-source_encoder_api.cpp
@@ -0,0 +1,45 @@
+source/encoder/api.cpp:432:17: error: cannot jump from this
+ goto statement to its label
+ goto fail;
+ ^
+source/encoder/api.cpp:436:36: note: jump bypasses variable
+ initialization
+ EB_H265_ENC_CONFIGURATION* svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
+ ^
+source/encoder/api.cpp:413:17: error: cannot jump from this
+ goto statement to its label
+ goto fail;
+ ^
+source/encoder/api.cpp:436:36: note: jump bypasses variable
+ initialization
+ EB_H265_ENC_CONFIGURATION* svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
+ ^
+source/encoder/api.cpp:406:21: error: cannot jump from this
+ goto statement to its label
+ goto fail;
+ ^
+source/encoder/api.cpp:436:36: note: jump bypasses variable
+ initialization
+ EB_H265_ENC_CONFIGURATION* svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
+ ^
+3 errors generated.
+
+--- source/encoder/api.cpp.orig 2019-01-23 09:47:18 UTC
++++ source/encoder/api.cpp
+@@ -355,6 +355,7 @@ int x265_encoder_encode(x265_encoder *enc, x265_nal **
+ static unsigned char picSendDone = 0;
+ numEncoded = 0;
+ static int codedNal = 0, eofReached = 0;
++ EB_H265_ENC_CONFIGURATION* svtParam = NULL;
+
+ if (encoder->m_param->bEnableSvtHevc)
+ {
+@@ -433,7 +434,7 @@ int x265_encoder_encode(x265_encoder *enc, x265_nal **
+ }
+ }
+
+- EB_H265_ENC_CONFIGURATION* svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
++ svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
+ if (eofReached && svtParam->codeEosNal == 0 && !codedNal)
+ {
+ EB_BUFFERHEADERTYPE *outputStreamPtr = 0;