Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
libthai-dev libtool libudev-dev libunwind-dev liburing-dev libvlc-dev libwayland-dev \
libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev \
libxkbcommon-dev libxrandr-dev libxss-dev libxtst-dev linux-libc-dev mono-complete \
ninja-build pkgconf tar tex-common texinfo unzip zip
nasm ninja-build pkgconf tar tex-common texinfo unzip zip

sudo locale-gen en_US.UTF-8
sudo locale-gen en_GB.UTF-8
Expand All @@ -232,7 +232,7 @@ jobs:
- name: macOS Homebrew Dependency Install
if: runner.os == 'macOS'
run: |
brew install autoconf autoconf-archive automake libtool mono unzip zip
brew install autoconf autoconf-archive automake libtool mono nasm unzip zip

- name: Checkout code
uses: actions/checkout@v6
Expand Down
1 change: 1 addition & 0 deletions indra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ endif ()

# Declare All Dependency Includes
include(APR)
include(AVIF)
include(Boost)
include(bugsplat)
include(CEFPlugin)
Expand Down
6 changes: 6 additions & 0 deletions indra/cmake/AVIF.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- cmake -*-
include_guard()
add_library(ll::libavif INTERFACE IMPORTED)

find_package(libavif CONFIG REQUIRED)
target_link_libraries(ll::libavif INTERFACE avif)
1 change: 1 addition & 0 deletions indra/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set(cmake_SOURCE_FILES
00-Common.cmake
APR.cmake
AVIF.cmake
Boost.cmake
BootstrapVcpkg.cmake
bugsplat.cmake
Expand Down
3 changes: 3 additions & 0 deletions indra/llimage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ target_sources(llimage
llimagepng.cpp
llimagetga.cpp
llimagewebp.cpp
llimageavif.cpp
llimageworker.cpp
llpngwrapper.cpp
)
Expand All @@ -32,6 +33,7 @@ target_sources(llimage
llimagepng.h
llimagetga.h
llimagewebp.h
llimageavif.h
llimageworker.h
llmapimagetype.h
llpngwrapper.h
Expand All @@ -52,6 +54,7 @@ target_link_libraries(llimage
llmath
llcommon
ll::libwebp
ll::libavif
ll::libpng
ll::libjpeg
)
Expand Down
14 changes: 12 additions & 2 deletions indra/llimage/llimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "llimagejpeg.h"
#include "llimagepng.h"
#include "llimagewebp.h"
#include "llimageavif.h"
#include "llimagedxt.h"
#include "llmemory.h"

Expand Down Expand Up @@ -2049,7 +2050,8 @@ file_extensions[] =
{ "mip", IMG_CODEC_DXT },
{ "dxt", IMG_CODEC_DXT },
{ "png", IMG_CODEC_PNG },
{ "webp", IMG_CODEC_WEBP }
{ "webp", IMG_CODEC_WEBP },
{ "avif", IMG_CODEC_AVIF }
};

static struct
Expand All @@ -2069,7 +2071,8 @@ wide_file_extensions[] =
{ L"mip", IMG_CODEC_DXT },
{ L"dxt", IMG_CODEC_DXT },
{ L"png", IMG_CODEC_PNG },
{ L"webp", IMG_CODEC_WEBP }
{ L"webp", IMG_CODEC_WEBP },
{ L"avif", IMG_CODEC_AVIF }
};
#define NUM_FILE_EXTENSIONS LL_ARRAY_SIZE(file_extensions)
#if 0
Expand Down Expand Up @@ -2270,6 +2273,9 @@ LLImageFormatted* LLImageFormatted::createFromType(S8 codec)
case IMG_CODEC_WEBP:
image = new LLImageWebP();
break;
case IMG_CODEC_AVIF:
image = new LLImageAVIF();
break;
case IMG_CODEC_J2C:
image = new LLImageJ2C();
break;
Expand Down Expand Up @@ -2314,6 +2320,10 @@ S8 LLImageFormatted::getCodecFromMimeType(std::string_view mimetype)
{
return IMG_CODEC_WEBP;
}
else if (mimetype == "image/avif")
{
return IMG_CODEC_AVIF;
}
return IMG_CODEC_INVALID;
}

Expand Down
3 changes: 2 additions & 1 deletion indra/llimage/llimage.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ typedef enum e_image_codec
IMG_CODEC_DXT = 6,
IMG_CODEC_PNG = 7,
IMG_CODEC_WEBP = 8,
IMG_CODEC_EOF = 9
IMG_CODEC_AVIF = 9,
IMG_CODEC_EOF = 10
} EImageCodec;

//============================================================================
Expand Down
Loading