multimedia/mythtv: fix build on powerpc64
Error:
libswscale/ppc/yuv2rgb_altivec.c:452:1: error: call to 'vec_xl' is ambiguous
DEFCSP420_CVT(yuv2_rgb24, out_rgb24)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libswscale/ppc/yuv2rgb_altivec.c:353:38: note: expanded from macro 'DEFCSP420_CVT'
u = (vector signed char) vec_xl(0, ui); \
^~~~~~
/usr/lib/clang/13.0.0/include/altivec.h:17562:1: note: candidate function
vec_xl(ptrdiff_t __offset, const unsigned char *__ptr) {
^
Additionaly, a merge of 8960641b32
is necessary.
This commit is contained in:
parent
8e2c64a7e5
commit
75a05b4f4a
5 changed files with 72 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
--- external/FFmpeg/libswscale/ppc/yuv2rgb_altivec.c.orig 2022-09-13 01:58:14 UTC
|
||||
+++ external/FFmpeg/libswscale/ppc/yuv2rgb_altivec.c
|
||||
@@ -284,7 +284,7 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector s
|
||||
* ------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
-#if !HAVE_VSX
|
||||
+#if !HAVE_VSX && !defined(__clang__)
|
||||
static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr)
|
||||
{
|
||||
const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset);
|
|
@ -0,0 +1,14 @@
|
|||
--- libs/libmyth/audio/audiooutpututil.cpp.orig 2022-08-13 16:59:56 UTC
|
||||
+++ libs/libmyth/audio/audiooutpututil.cpp
|
||||
@@ -212,9 +212,9 @@ char *AudioOutputUtil::GeneratePinkFrames(char *frames
|
||||
static_cast<float>(0x03fffffff);
|
||||
int32_t ires = res;
|
||||
if (bits == 16)
|
||||
- *samp16++ = qToLittleEndian<int16_t>(ires >> 16);
|
||||
+ *samp16++ = qToLittleEndian<qint16>(ires >> 16);
|
||||
else
|
||||
- *samp32++ = qToLittleEndian<int32_t>(ires);
|
||||
+ *samp32++ = qToLittleEndian<qint32>(ires);
|
||||
}
|
||||
else
|
||||
{
|
|
@ -0,0 +1,17 @@
|
|||
--- libs/libmyth/audio/eldutils.cpp.orig 2022-08-13 16:59:56 UTC
|
||||
+++ libs/libmyth/audio/eldutils.cpp
|
||||
@@ -257,11 +257,11 @@ int eld::update_eld(const char *buf, int size)
|
||||
m_e.aud_synch_delay = GRAB_BITS(buf, 6, 0, 8) * 2;
|
||||
m_e.spk_alloc = GRAB_BITS(buf, 7, 0, 7);
|
||||
|
||||
- m_e.port_id = qFromLittleEndian<uint64_t>(buf + 8);
|
||||
+ m_e.port_id = qFromLittleEndian<quint64>(buf + 8);
|
||||
|
||||
/* not specified, but the spec's tendency is little endian */
|
||||
- m_e.manufacture_id = qFromLittleEndian<uint16_t>(buf + 16);
|
||||
- m_e.product_id = qFromLittleEndian<uint16_t>(buf + 18);
|
||||
+ m_e.manufacture_id = qFromLittleEndian<quint16>(buf + 16);
|
||||
+ m_e.product_id = qFromLittleEndian<quint16>(buf + 18);
|
||||
|
||||
if (ELD_FIXED_BYTES + mnl > size)
|
||||
{
|
|
@ -0,0 +1,11 @@
|
|||
--- libs/libmythtv/io/mythavformatwriter.cpp.orig 2022-08-13 16:59:56 UTC
|
||||
+++ libs/libmythtv/io/mythavformatwriter.cpp
|
||||
@@ -270,7 +270,7 @@ int MythAVFormatWriter::WriteAudioFrame(unsigned char
|
||||
#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
|
||||
auto buf16 = reinterpret_cast<uint16_t *>(Buffer);
|
||||
for (int i = 0; i < m_audioChannels * m_audioFrameSize; i++)
|
||||
- buf16[i] = qFromLittleEndian<uint16_t>(buf16[i]);
|
||||
+ buf16[i] = qFromLittleEndian<quint16>(buf16[i]);
|
||||
#endif
|
||||
|
||||
AVCodecContext *avctx = m_codecMap.GetCodecContext(m_audioStream);
|
|
@ -0,0 +1,19 @@
|
|||
--- libs/libmythtv/recorders/NuppelVideoRecorder.cpp.orig 2022-08-13 16:59:56 UTC
|
||||
+++ libs/libmythtv/recorders/NuppelVideoRecorder.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <QStringList>
|
||||
+#include <QtEndian>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -2558,7 +2559,7 @@ void NuppelVideoRecorder::WriteAudio(unsigned char *bu
|
||||
#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
|
||||
auto buf16 = reinterpret_cast<uint16_t *>(buf);
|
||||
for (int i = 0; i < m_audioChannels * sample_cnt; i++)
|
||||
- buf16[i] = qToLittleEndian<uint16_t>(buf16[i]);
|
||||
+ buf16[i] = qToLittleEndian<quint16>(buf16[i]);
|
||||
#endif
|
||||
if (m_audioChannels == 2)
|
||||
{
|
Loading…
Reference in a new issue