Skip to content

Commit 4fc874b

Browse files
authored
Merge branch 'master' into dependabot/github_actions/actions/checkout-5
2 parents 8ea2706 + dcdb49a commit 4fc874b

28 files changed

+623
-578
lines changed

.github/workflows/libvmaf.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
CC: ccache clang
2626
CXX: ccache clang++
2727
experimental: true
28+
- os: ubuntu-24.04-arm
29+
CC: ccache clang
30+
CXX: ccache clang++
2831
runs-on: ${{ matrix.os }}
2932
env:
3033
CC: ${{ matrix.CC }}
@@ -99,7 +102,7 @@ jobs:
99102
echo "upload_url=$(curl -L https://api.github.com/repos/${{ github.repository }}/releases/tags/$(cut -d/ -f3 <<< ${{ github.ref }}) | jq -r ."upload_url")" >> $GITHUB_OUTPUT
100103
101104
- name: Upload vmaf
102-
uses: actions/upload-artifact@v4
105+
uses: actions/upload-artifact@v5
103106
with:
104107
name: ${{ matrix.os }}-${{ matrix.CC }}-vmaf
105108
path: ${{ steps.get_info.outputs.path }}

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
build:
8-
runs-on: windows-2019
8+
runs-on: windows-latest
99
strategy:
1010
fail-fast: false
1111
matrix:
@@ -65,7 +65,7 @@ jobs:
6565
echo "upload_url=$(curl -L https://api.github.com/repos/${{ github.repository }}/releases/tags/$(cut -d/ -f3 <<< ${{ github.ref }}) | jq -r ."upload_url")" >> $GITHUB_OUTPUT
6666
6767
- name: Upload vmaf
68-
uses: actions/upload-artifact@v4
68+
uses: actions/upload-artifact@v5
6969
with:
7070
name: ${{ matrix.msystem }}-vmaf
7171
path: ${{ steps.get_info.outputs.path }}

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM ubuntu:22.04
2+
ARG NV_CODEC_TAG="876af32a202d0de83bd1d36fe74ee0f7fcf86b0d"
23

34
# get and install building tools
45
RUN apt-get update && \
@@ -10,16 +11,24 @@ RUN apt-get update && \
1011
python3 \
1112
python3-pip \
1213
python3-venv \
13-
xxd
14+
xxd \
15+
clang \
16+
wget \
17+
unzip \
18+
nvidia-cuda-dev \
19+
nvidia-cuda-toolkit
1420

1521
# retrieve source code
1622
COPY . /vmaf
1723

1824
# setup environment
1925
ENV PATH=/vmaf:/vmaf/libvmaf/build/tools:$PATH
2026

27+
RUN wget https://github.com/FFmpeg/nv-codec-headers/archive/${NV_CODEC_TAG}.zip && unzip ${NV_CODEC_TAG}.zip && cd nv-codec-headers-${NV_CODEC_TAG} && make && make install
28+
2129
# make vmaf
22-
RUN cd /vmaf && make clean && make
30+
# when disabling NVCC, libvmaf will be built without cubin's which will compile kernels at start of the container
31+
RUN cd /vmaf && make clean && make ENABLE_NVCC=true && make install
2332

2433
# install python tools
2534
RUN pip3 install --no-cache-dir -r /vmaf/python/requirements.txt

Dockerfile.cuda

Lines changed: 0 additions & 46 deletions
This file was deleted.

Dockerfile.ffmpeg

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM vmaf
2+
3+
RUN apt-get update && \
4+
apt-get install -y pkg-config
5+
6+
ARG FFMPEG_TAG=master
7+
ARG NVCC_FLAGS="-gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -O2"
8+
9+
# get ffmpeg
10+
RUN wget https://github.com/FFmpeg/FFmpeg/archive/${FFMPEG_TAG}.zip && unzip ${FFMPEG_TAG}.zip
11+
12+
RUN cd FFmpeg-${FFMPEG_TAG} && ./configure \
13+
--enable-libnpp \
14+
--enable-nonfree \
15+
--enable-nvdec \
16+
--enable-nvenc \
17+
--enable-cuvid \
18+
--enable-cuda \
19+
--enable-cuda-nvcc \
20+
--enable-libvmaf \
21+
--enable-ffnvcodec \
22+
--disable-stripping \
23+
--nvccflags="${NVCC_FLAGS}" && \
24+
make -j && \
25+
make install
26+
27+
RUN mkdir /data
28+
# VMAF+decode GPU (only works for NVDec supported formats https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new)
29+
ENTRYPOINT ["ffmpeg"]

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ NINJA := $(VIRTUAL_ENV_PATH)/ninja
1717
BUILDTYPE_RELEASE := --buildtype release
1818
BUILDTYPE_DEBUG := --buildtype debug
1919
ENABLE_FLOAT := -Denable_float=true
20+
ENABLE_NVCC := true
21+
ENABLE_CUDA := -Denable_cuda=true -Denable_nvcc=$(ENABLE_NVCC)
2022

2123
# Directories
2224
LIBVMAF_DIR := libvmaf
@@ -30,10 +32,10 @@ default: build
3032
all: build debug install test cythonize
3133

3234
$(BUILD_DIR): $(MESON) $(NINJA)
33-
PATH="$(VENV)/bin:$$PATH" $(MESON_SETUP) $(BUILD_DIR) $(LIBVMAF_DIR) $(BUILDTYPE_RELEASE) $(ENABLE_FLOAT)
35+
PATH="$(VENV)/bin:$$PATH" $(MESON_SETUP) $(BUILD_DIR) $(LIBVMAF_DIR) $(BUILDTYPE_RELEASE) $(ENABLE_FLOAT) $(ENABLE_CUDA)
3436

3537
$(DEBUG_DIR): $(MESON) $(NINJA)
36-
PATH="$(VENV)/bin:$$PATH" $(MESON_SETUP) $(DEBUG_DIR) $(LIBVMAF_DIR) $(BUILDTYPE_DEBUG) $(ENABLE_FLOAT)
38+
PATH="$(VENV)/bin:$$PATH" $(MESON_SETUP) $(DEBUG_DIR) $(LIBVMAF_DIR) $(BUILDTYPE_DEBUG) $(ENABLE_FLOAT) $(ENABLE_CUDA)
3739

3840
cythonize: cythonize-deps
3941
pushd python && ../$(VENV_PYTHON) setup.py build_ext --build-lib . && popd || exit 1

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# VMAF - Video Multi-Method Assessment Fusion
22

3-
[![Build Status](https://app.travis-ci.com/Netflix/vmaf.svg?token=KLMprpotiqp3mZnrjtA6&branch=master)](https://app.travis-ci.com/Netflix/vmaf)
43
[![libvmaf](https://github.com/Netflix/vmaf/actions/workflows/libvmaf.yml/badge.svg)](https://github.com/Netflix/vmaf/actions/workflows/libvmaf.yml)
54
[![Windows](https://github.com/Netflix/vmaf/actions/workflows/windows.yml/badge.svg)](https://github.com/Netflix/vmaf/actions/workflows/windows.yml)
65
[![ffmpeg](https://github.com/Netflix/vmaf/actions/workflows/ffmpeg.yml/badge.svg)](https://github.com/Netflix/vmaf/actions/workflows/ffmpeg.yml)

libvmaf/meson_options.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ option('enable_nvtx',
3737
type: 'boolean',
3838
value: false,
3939
description: 'Enable NVTX range support')
40+
41+
option('enable_nvcc',
42+
type: 'boolean',
43+
value: true,
44+
description: 'Use clang to compile CUDA code.')

0 commit comments

Comments
 (0)