Coder Social home page Coder Social logo

Comments (9)

wantehchang avatar wantehchang commented on June 25, 2024

Hi @dhruv-nudge,

Your cmake command line looks correct. I just repeated your steps in a version of Debian Linux. I can't reproduce the cmake errors. I tested the tip of the main branch of libavif.

What version of libavif are you using?

What is the output of cmake --version?

Note: Unrelated to your cmake problem: I recommend running the ./dav1d.cmd command in the ext directory and adding -DAVIF_CODEC_DAV1D=LOCAL to your cmake command line. The dav1d AV1 decoder is faster than the AV1 decoder in libaom.

from libavif.

dhruv-nudge avatar dhruv-nudge commented on June 25, 2024

hey I am using 1.0.3 like in README

cmake version 3.22.2

when runngin ./libyuv.cmd, I am getting this in logs

-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 

and I get this when I run ./libsharpyuv.cmd

fatal: destination path 'libwebp' already exists and is not an empty directory.
HEAD is now at e2c85878 Add an initializer for the SharpYuvOptions struct.
mkdir: cannot create directory ‘build’: File exists
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR) 
-- Adding -lm flag.
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- TIFF is disabled when statically linking.
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) 
-- Performing Test WEBP_HAVE_FLAG_SSE41
-- Performing Test WEBP_HAVE_FLAG_SSE41 - Failed
-- Performing Test WEBP_HAVE_FLAG_SSE41
-- Performing Test WEBP_HAVE_FLAG_SSE41 - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Performing Test WEBP_HAVE_FLAG_SSE2
-- Performing Test WEBP_HAVE_FLAG_SSE2 - Failed
-- Performing Test WEBP_HAVE_FLAG_SSE2
-- Performing Test WEBP_HAVE_FLAG_SSE2 - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS32
-- Performing Test WEBP_HAVE_FLAG_MIPS32 - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS32
-- Performing Test WEBP_HAVE_FLAG_MIPS32 - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2 - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2 - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Performing Test WEBP_HAVE_FLAG_NEON
-- Performing Test WEBP_HAVE_FLAG_NEON - Success
-- Performing Test WEBP_HAVE_FLAG_MSA
-- Performing Test WEBP_HAVE_FLAG_MSA - Failed
-- Performing Test WEBP_HAVE_FLAG_MSA
-- Performing Test WEBP_HAVE_FLAG_MSA - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ec2-user/libavif/ext/libwebp/build

do we need to install more libraries before following all the steps?

from libavif.

dhruv-nudge avatar dhruv-nudge commented on June 25, 2024

I tried with version 1.0.4 of libavif as well in ubuntu 22, but still getting errors

-- libavif: libyuv not found; libyuv-based fast paths disabled.
-- libavif: libsharpyuv not found
-- libavif: Enabling warnings for GCC
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find aom (missing: AOM_LIBRARY AOM_LIBRARIES AOM_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/Findaom.cmake:32 (find_package_handle_standard_args)
  CMakeLists.txt:463 (find_package)

from libavif.

wantehchang avatar wantehchang commented on June 25, 2024

Thanks for the libavif versions. With version 1.0.x, you need to use the old-style options to enable libaom, libyuv, etc. The README file you read is apparently from the tip of the main branch, so it describes the new-style options. This unfortunate discrepancy will be fixed when we create the 1.1.0 release.

When using version 1.0.x, change

-DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LIBSHARPYUV=LOCAL -DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL

to

-DAVIF_CODEC_AOM=ON -DAVIF_LOCAL_AOM=ON -DAVIF_LOCAL_LIBYUV=ON -DAVIF_LOCAL_LIBSHARPYUV=ON -DAVIF_LOCAL_JPEG=ON -DAVIF_LOCAL_ZLIBPNG=ON

Note that the old-stype options will continue to be supported for a while.

As for the error (or rather, warning) messages when you ran ./libyuv.cmd and ./libsharpyuv.cmd, those libraries are apparently for optional features in libyuv and libsharpyuv. If those libraries are not installed on your system, the optional features are not built. If you can build libavif successfully, it means libavif does not use those optional features of libyuv and libsharpyuv. In that case you can safely ignore those error messages.

Finally, this error message from ./libsharpyuv.cmd

fatal: destination path 'libwebp' already exists and is not an empty directory.

can be fixed by removing the libwebp directory before you run ./libsharpyuv.cmd again.

from libavif.

dhruv-nudge avatar dhruv-nudge commented on June 25, 2024

@wantehchang thanks a lot, it worked!

from libavif.

dhruv-nudge avatar dhruv-nudge commented on June 25, 2024

I also wanted to just confirm are those optional libraries important to convert all kinds of images to avif?
I want to convert all formats (png, jpg, giff, webp, tiff and etc) to avif. I will not convert from avif to any other format.

from libavif.

wantehchang avatar wantehchang commented on June 25, 2024

Hi @dhruv-nudge

I can only answer the question for libyuv: libavif doesn't use the optional feature of libyuv that requires libjpeg.

The question is harder to answer for libsharpyuv. libsharpyuv is a component of libwebp. I believe we are running the cmake command to configure the enture libwebp, and then only build the libsharpyuv component. Intuitively I would expect that those optional features that require additional libraries to be installed on the system are outside libsharpyuv, but I didn't spend the time verifying that.

from libavif.

wantehchang avatar wantehchang commented on June 25, 2024

Also, the avifenc command can only convert PNG and JPEG inputs to AVIF. It cannot convert GIF, WebP, and TIFF to AVIF. I think there is a feature request for avifenc to support additional input image formats. You can look into using ffmpeg or ImageMagick to do that.

from libavif.

jzern avatar jzern commented on June 25, 2024

Intuitively I would expect that those optional features that require additional libraries to be installed on the system are outside libsharpyuv, but I didn't spend the time verifying that.

Yes, that is true. The support libraries (jpeg, tiff, png, gif) are only used by the examples like cwebp and dwebp.

from libavif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.