Swiftpack.co - Package - SDWebImage/libavif-Xcode

libavif + Xcode

CI Status Version License Platform Carthage compatible

A wrapper for libavif + Xcode project. This enables Carthage && SwiftPM support.

This repo also including the CocoaPods's spec file to use libavif.

Requirements

  • iOS 8
  • macOS 10.7
  • tvOS 9.0 (rav1e unavailable)
  • watchOS 2.0 (rav1e unavailable)

aom && dav1d && rav1e

aom

By default, libavif is built with aom codec support. aom is the first AV1 codec during the standard draft implementation.

dav1d (Decoding)

dav1d is the new and next generation AV1 codec, focused on speed and correctness.

See more about explanation for why starting a new project but not improving aom

From v0.3.0, libavif can built with dav1d. For CocoaPods user, you can simply use the subspec for this. Carthage for optional dav1d codec is not supported currently.

rav1e (Encoding)

rav1e is the fastest and safest AV1 encoder. Which use Rust programming to provide fast and safe codec compared to aom. Its current form it is most suitable for cases where libaom (the reference encoder) is too slow.

See more about performance

From v0.4.3, libavif can built with rav1e. For CocoaPods user, you can simply use the subspec for this. Carthage for optional rav1c codec is not supported currently.

Note rav1e currently only support iOS && macOS. watchOS and tvOS supports need Rust community upstream support.

Installation

Carthage

libavif is (via this repo) available through Carthage.

github "SDWebImage/libavif-Xcode"

Note Carthage does not support dav1d or rav1e optional codec, use only aom.

CocoaPods

libavif is available through CocoaPods.

By default, libavif is built with aom decoding/encoding codec, which is stable, but slow.

pod 'libavif'

If you need the dav1d decoding codec, use the subspec:

pod 'libavif/libdav1d'

If you need the rav1e encoding codec, use the subspec:

pod 'libavif/librav1e'

SwiftPM

libavif is available through Swift Package Manager.

let package = Package(
    dependencies: [
        .package(url: "https://github.com/SDWebImage/libavif-Xcode", from: "0.4.5")
    ],
    // ...
)

Note SwiftPM does not support dav1d or rav1e optional codec, use only aom.

Usage

Use libavif as you would normally, this is just a repo that adds an Xcode proj.

For Swift Package Manager user, it's recommended to use the modular import instead of C headers.

  • Objective-C
@import libavif;
// or if you don't use module
#import <avif/avif.h>
  • Swift
import libavif

License

libavif is available under the BSD License.

Github

link
Stars: 3

Used By

Total: 0