Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/h264ErrorLeadingPictures
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Sep 4, 2023
2 parents 2e5b866 + f1e3ae8 commit 397ae2e
Show file tree
Hide file tree
Showing 23 changed files with 429 additions and 300 deletions.
131 changes: 48 additions & 83 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-18.04
INSTALL_LIBS: libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 qt5-default
QMAKE_COMMAND: qmake
include:
- os: ubuntu-20.04
INSTALL_LIBS: libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 qt5-default
QMAKE_COMMAND: qmake
Expand Down Expand Up @@ -61,23 +58,23 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-18.04
QT_FILE: qtBase_5.15.1_bionic.zip
- os: ubuntu-20.04
QT_FILE: qtBase_6.5.2_ubuntu20.zip
LIBDE265_REMOTE: libde265.so
LIBDE265_LOCAL: libde265-internals.so
ARTIFACT_NAME: YUView.AppImage
ARTIFACT_NAME: YUView.Ubuntu20.AppImage
CPU_COUNT_COMMAND: nproc
- os: macos-10.15
QT_FILE: qtBase_5.15.1_mac.zip
- os: macos-11
QT_FILE: qtBase_6.5.2_mac11.zip
LIBDE265_REMOTE: libde265.dylib
LIBDE265_LOCAL: libde265-internals.dylib
ARTIFACT_NAME: YUView-Mac.zip
ARTIFACT_NAME: YUView-Mac11-BigSur.zip
CPU_COUNT_COMMAND: sysctl -n hw.logicalcpu
- os: macos-11.0
QT_FILE: qtBase_5.15.1_mac.zip
- os: macos-12
QT_FILE: qtBase_6.5.2_mac12.zip
LIBDE265_REMOTE: libde265.dylib
LIBDE265_LOCAL: libde265-internals.dylib
ARTIFACT_NAME: YUView-Mac-BigSur.zip
ARTIFACT_NAME: YUView-Mac12-Monterey.zip
CPU_COUNT_COMMAND: sysctl -n hw.logicalcpu
steps:
- uses: actions/checkout@v3
Expand All @@ -87,32 +84,20 @@ jobs:
cd ../../
mkdir -p YUViewQt/YUViewQt
cd YUViewQt/YUViewQt
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-5.15.1/${{matrix.QT_FILE}} -o Qt.zip
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-6.5.2/${{matrix.QT_FILE}} -o Qt.zip
unzip -qa Qt.zip
echo "$GITHUB_WORKSPACE/../../YUViewQt/YUViewQt/Qt/bin" >> $GITHUB_PATH
shell: bash
- name: Install MacDeployQT
run: |
cd $GITHUB_WORKSPACE/../../YUViewQt/YUViewQt
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtDeployTools-5.15.1/qtTools_5.15.1_mac.zip -o deployQt.zip
unzip -qa deployQt.zip
shell: bash
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11.0'
- name: Install Macdeploy Qt
run: |
cp $GITHUB_WORKSPACE/../../YUViewQt/YUViewQt/Qttools/bin/macdeployqt $GITHUB_WORKSPACE/../../YUViewQt/YUViewQt/Qt/bin/macdeployqt
strip $GITHUB_WORKSPACE/../../YUViewQt/YUViewQt/Qt/bin/macdeployqt
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11.0'
- name: Install Linuxdeployqt
run: |
curl -L https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage -o linuxdeployqt-6-x86_64.AppImage
chmod a+x linuxdeployqt-6-x86_64.AppImage
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-20.04'
- name: Install Linux packages
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libatspi2.0-dev
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04'
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libatspi2.0-dev libfuse2
if: matrix.os == 'ubuntu-20.04'
- name: Install libde265
run: |
curl -L https://github.com/ChristianFeldmann/libde265/releases/download/v1.1/${{matrix.LIBDE265_REMOTE}} -o ${{matrix.LIBDE265_LOCAL}}
Expand All @@ -136,7 +121,7 @@ jobs:
zip -r ${{matrix.ARTIFACT_NAME}} YUView.app/
mkdir $GITHUB_WORKSPACE/artifacts
cp ${{matrix.ARTIFACT_NAME}} $GITHUB_WORKSPACE/artifacts/
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11.0'
if: matrix.os == 'macos-11' || matrix.os == 'macos-12'
- name: Build Appimage (Linux)
run: |
cd build
Expand All @@ -145,62 +130,49 @@ jobs:
mv YUView-*.AppImage YUView.AppImage
mkdir $GITHUB_WORKSPACE/artifacts
cp YUView.AppImage $GITHUB_WORKSPACE/artifacts/
cd $GITHUB_WORKSPACE
ls -l
cd $GITHUB_WORKSPACE/artifacts
ls -l
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-20.04'
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{matrix.ARTIFACT_NAME}}
path: artifacts
- name: Upload Release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: artifacts/${{matrix.ARTIFACT_NAME}}
asset_name: ${{matrix.ARTIFACT_NAME}}
asset_content_type: application/zip
if: github.event_name == 'release'
files: artifacts/${{matrix.ARTIFACT_NAME}}
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
auto_update: true
ARTIFACT_NAME: YUView-Win.zip
ARTIFACT_NAME: YUView-Win2019.zip
QT_FILE: qtBase_6.5.2_win2019.zip
- os: windows-2019
auto_update: false
ARTIFACT_NAME: YUView-Win-noautoupdate.zip
ARTIFACT_NAME: YUView-Win2019-noautoupdate.zip
QT_FILE: qtBase_6.5.2_win2019.zip
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- run: git fetch --prune --unshallow
- name: Install Qt base
run: |
cd ../../
mkdir -p YUViewQt/YUViewQt
cd YUViewQt/YUViewQt
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-5.15.1/qtBase_5.15.1_win.zip -o Qt.zip
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-6.5.2/${{matrix.QT_FILE}} -o Qt.zip
7z x Qt.zip
echo "${{ github.workspace }}\..\..\YUViewQt\YUViewQt\Qt\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Qt deploy tools
run: |
cd ../../YUViewQt/YUViewQt
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtDeployTools-5.15.1/qtTools_5.15.1_win.zip -o deployQt.zip
7z x deployQt.zip
- name: Install libde265
run: |
curl -L https://github.com/ChristianFeldmann/libde265/releases/download/v1.1/libde265.dll -o libde265.dll
curl -L https://raw.githubusercontent.com/ChristianFeldmann/libde265/master/COPYING -o libde265License.txt
- name: Install jom
run: |
Get-Location
curl -L https://github.com/ChristianFeldmann/jom/releases/download/v1.1.3-build/jom.exe -o jom.exe
cp jom.exe ../../YUViewQt/YUViewQt/Qt/bin/
choco install jom
- name: Install openSSL
run: |
mkdir openSSL
Expand All @@ -212,13 +184,16 @@ jobs:
run: sed -i -- "s/#define UPDATE_FEATURE_ENABLE 0/#define UPDATE_FEATURE_ENABLE 1/g" YUViewLib/src/common/Typedef.h
shell: bash
if: matrix.auto_update == true
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
- name: Build
run: |
echo "Creating Build dir and entering it"
mkdir build
cd build
echo "Qmake Version:"
d:\a\YUViewQt\YUViewQt\Qt\bin\qmake --version
echo "Executing qmake..."
d:\a\YUViewQt\YUViewQt\Qt\bin\qmake CONFIG+=UNITTESTS ..
echo "Executing jom:"
jom
- name: Run tests
run: |
Expand All @@ -230,7 +205,7 @@ jobs:
mkdir deploy
cd deploy
cp ../build/YUViewApp/YUView.exe .
d:\a\YUViewQt\YUViewQt\Qttools\bin\windeployqt.exe --release --no-compiler-runtime YUView.exe
d:\a\YUViewQt\YUViewQt\Qt\bin\windeployqt.exe --release --no-compiler-runtime YUView.exe
cp ../openSSL/*.dll .
mkdir decoder
cp ..\libde265.dll decoder
Expand All @@ -244,44 +219,34 @@ jobs:
run: |
cd ${{ github.workspace }}/deployment/wix
cp 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\v142\MergeModules\Microsoft_VC142_CRT_x64.msm' .
& "${{ env.WIX }}\bin\heat.exe" dir ../../deploy -gg -dr APPLICATIONFOLDER -srd -sreg -cg YUViewComponents -out harvestedDirectory.wxs
& "${{ env.WIX }}\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 -ext "${{ env.WIX }}\bin\WixUIExtension.dll" YUView.wxs
& "${{ env.WIX }}\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 harvestedDirectory.wxs
& "${{ env.WIX }}\bin\Light.exe" -b ../../deploy -out bin/Release/YUViewSetup.msi -pdbout bin/Release/YUViewSetup.wixpdb -cultures:null -ext "${{ env.WIX }}\bin\WixUIExtension.dll" -contentsfile obj/Release/YUViewSetup.wixproj.BindContentsFileListnull.txt -outputsfile obj/Release/YUViewSetup.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj/Release/YUViewSetup.wixproj.BindBuiltOutputsFileListnull.txt obj/Release/YUView.wixobj obj/Release/harvestedDirectory.wixobj
& "C:\Program Files (x86)\WiX Toolset v3.11\bin\heat.exe" dir ../../deploy -gg -dr APPLICATIONFOLDER -srd -sreg -cg YUViewComponents -out harvestedDirectory.wxs
& "C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll" YUView.wxs
& "C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 harvestedDirectory.wxs
& "C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe" -b ../../deploy -out bin/Release/YUViewSetup.msi -pdbout bin/Release/YUViewSetup.wixpdb -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll" -contentsfile obj/Release/YUViewSetup.wixproj.BindContentsFileListnull.txt -outputsfile obj/Release/YUViewSetup.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj/Release/YUViewSetup.wixproj.BindBuiltOutputsFileListnull.txt obj/Release/YUView.wixobj obj/Release/harvestedDirectory.wixobj
cd ${{ github.workspace }}
cp deployment/wix/bin/Release/YUViewSetup.msi ./
if: matrix.auto_update == true
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{matrix.ARTIFACT_NAME}}
path: artifacts
- name: Upload Windows installer Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: YUViewSetup.msi
path: ./YUViewSetup.msi
if: matrix.auto_update == true
- name: Upload Windows zip to Release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release Zip
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: artifacts/YUView-Win.zip
asset_name: ${{matrix.ARTIFACT_NAME}}
asset_content_type: application/zip
if: github.event_name == 'release'
- name: Upload Windows installer to Release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
files: artifacts/YUView-Win.zip
- name: Release Installer
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && matrix.auto_update == true
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: YUViewSetup.msi
asset_name: YUViewSetup.msi
asset_content_type: application/zip
if: github.event_name == 'release' && matrix.auto_update == true
files: YUViewSetup.msi

# How to upload files to the release:
# https://github.com/Blacksmoke16/oq/pull/47/files#diff-082c28d748ad2e3eecc5508d740d9417R9-R29
Expand Down
12 changes: 6 additions & 6 deletions YUViewLib/src/decoder/decoderDav1d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ decoderDav1d::decoderDav1d(int signalID, bool cachingDecoder) : decoderBaseSingl
{
currentOutputBuffer.clear();

// Libde265 can only decoder HEVC in YUV format
// libdav1d can only decode the YUV format
this->rawFormat = video::RawFormat::YUV;

QSettings settings;
Expand Down Expand Up @@ -217,7 +217,7 @@ template <typename T> T decoderDav1d::resolve(T &fun, const char *symbol, bool o
if (!ptr)
{
if (!optional)
setError(QStringLiteral("Error loading the libde265 library: Can't find function %1.")
setError(QStringLiteral("Error loading the libdav1d library: Can't find function %1.")
.arg(symbol));
return nullptr;
}
Expand Down Expand Up @@ -285,7 +285,7 @@ bool decoderDav1d::decodeNextFrame()
{
if (decoderState != DecoderState::RetrieveFrames)
{
DEBUG_DAV1D("decoderLibde265::decodeNextFrame: Wrong decoder state.");
DEBUG_DAV1D("decoderDav1d::decodeNextFrame: Wrong decoder state.");
return false;
}
if (decodedFrameWaiting)
Expand Down Expand Up @@ -546,7 +546,7 @@ bool decoderDav1d::checkLibraryFile(QString libFilePath, QString &error)
}

// Now let's see if we can retrive all the function pointers that we will need.
// If this works, we can be fairly certain that this is a valid libde265 library.
// If this works, we can be fairly certain that this is a valid libdav1d library.
testDecoder.resolveLibraryFunctionPointers();

error = testDecoder.decoderErrorString();
Expand All @@ -566,8 +566,8 @@ QString decoderDav1d::getDecoderName() const
QStringList decoderDav1d::getLibraryNames() const
{
// If the file name is not set explicitly, QLibrary will try to open
// the libde265.so file first. Since this has been compiled for linux
// it will fail and not even try to open the libde265.dylib.
// the libdav1d.so file first. Since this has been compiled for linux
// it will fail and not even try to open the libdav1d.dylib.
// On windows and linux ommitting the extension works
if (is_Q_OS_MAC)
return QStringList() << "libdav1d-internals.dylib"
Expand Down
2 changes: 1 addition & 1 deletion YUViewLib/src/decoder/decoderFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void decoderFFmpeg::cacheCurStatistics()
bool decoderFFmpeg::pushData(QByteArray &data)
{
if (!this->raw_pkt)
this->raw_pkt = this->ff.allocatePaket();
this->raw_pkt = this->ff.allocatePacket();
if (data.length() == 0)
{
// Push an empty packet to indicate that the file has ended
Expand Down
2 changes: 1 addition & 1 deletion YUViewLib/src/decoder/decoderVVDec.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class decoderVVDec : public decoderBaseSingleLib
static bool checkLibraryFile(QString libFilePath, QString &error);

QString getDecoderName() const override;
QString getCodecName() const override { return "hevc"; }
QString getCodecName() const override { return "vvc"; }

int nrSignalsSupported() const override { return nrSignals; }

Expand Down
Loading

0 comments on commit 397ae2e

Please sign in to comment.