The fastest and safest AV1 encoder.

Related tags

Video av1 av1-encoder
Overview

rav1e Travis Build Status Actions Status Coverage Status

The fastest and safest AV1 encoder.

Table of Content

Overview

rav1e is an AV1 video encoder. It is designed to eventually cover all use cases, though in its current form it is most suitable for cases where libaom (the reference encoder) is too slow.

Features

  • Intra, inter, and switch frames
  • 64x64 superblocks
  • 4x4 to 64x64 RDO-selected square and rectangular blocks
  • DC, H, V, Paeth, smooth, and all directional prediction modes
  • DCT, (FLIP-)ADST and identity transforms (up to 64x64, 16x16 and 32x32 respectively)
  • 8-, 10- and 12-bit depth color
  • 4:2:0, 4:2:2 and 4:4:4 chroma sampling
  • 11 speed settings (0-10, exhaustive to near real-time)
  • Constant quantizer and target bitrate (single- and multi-pass) encoding modes
  • Still picture mode

Documentation

Find the documentation in doc/

Releases

For the foreseeable future, a weekly pre-release of rav1e will be published every Tuesday.

Building

Toolchain: Rust

rav1e currently requires Rust 1.44.1 or later to build.

Dependency: NASM

Some x86_64-specific optimizations require NASM 2.14.02 or newer and are enabled by default.

The CI is testing against nasm 2.15.05, so bugs for other versions might happen. If you find one please open an issue!

Install nasm

ubuntu 20.04 (nasm 2.14.02)

sudo apt install nasm

ubuntu 18.04 (nasm 2.14.02)

sudo apt install nasm-mozilla
# link nasm into $PATH
sudo ln /usr/lib/nasm-mozilla/bin/nasm /usr/local/bin/

fedora 31, 32 (nasm 2.14.02)

sudo dnf install nasm

windows (nasm 2.15.05)
Have a NASM binary in your system PATH.

$NASM_VERSION="2.15.05" # or newer
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl --ssl-no-revoke -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o "C:\nasm"
# set path for the current sessions
set PATH="%PATH%;C:\nasm"

macOS (nasm 2.15.05)

brew install nasm

Release binary

To build release binary in target/release/rav1e run:

cargo build --release

Unstable features

Experimental API and Features can be enabled by using the unstable feature.

cargo build --features <feature>,unstable

Current unstable features

  • Channel API:
cargo build --features channel-api,unstable

Those Features and API are bound to change and evolve, do not rely on them staying the same over releases.

Target-specific builds

The rust autovectorizer can produce a binary that is about 6%-7% faster if it can use avx2 in the general code, you may allow it by issuing:

RUSTFLAGS="-C target-cpu=native" cargo build --release
# or
RUSTFLAGS="-C target-feature=+avx2,+fma" cargo build --release

The resulting binary will not work on cpus that do not sport the same set of SIMD extensions enabled.

NOTE : You may use rustc --print target-cpus to check if the cpu is supported, if not -C target-cpu=native would be a no-op.

Building the C-API

rav1e provides a C-compatible set of library, header and pkg-config file.

To build and install it you can use cargo-c:

cargo install cargo-c
cargo cinstall --release

Usage

Compressing video

Input videos must be in y4m format. The monochrome color format is not supported.

cargo run --release --bin rav1e -- input.y4m -o output.ivf

(Find a y4m-file for testing at tests/small_input.y4m or at http://ultravideo.cs.tut.fi/#testsequences)

Decompressing video

Encoder output should be compatible with any AV1 decoder compliant with the v1.0.0 specification. You can build compatible aomdec using the following:

mkdir aom_test && cd aom_test
cmake /path/to/aom -DAOM_TARGET_CPU=generic -DCONFIG_AV1_ENCODER=0 -DENABLE_TESTS=0 -DENABLE_DOCS=0 -DCONFIG_LOWBITDEPTH=1
make -j8
./aomdec ../output.ivf -o output.y4m

Configuring

rav1e has several optional features that can be enabled by passing --features to cargo. Passing --all-features is discouraged.

Features

Find a full list in feature-table in Cargo.toml

  • asm - enabled by default. When enabled, assembly is built for the platforms supporting it.
    • x86_64: Requires nasm.
    • aarch64
      • Requires gas
      • Alternative: Use clang assembler by setting CC=clang

NOTE: SSE2 is always enabled on x86_64, neon is always enabled for aarch64, you may set the environment variable RAV1E_CPU_TARGET to rust to disable all the assembly-optimized routines at the runtime.

Contributing

Please read our guide to contributing to rav1e.

Getting in Touch

Come chat with us on the IRC channel #daala on Freenode! If you don't have IRC set up you can easily connect from your web browser.

Comments
  • Don't restrict partition sizes to exactly fit on the right or bottom frame boundaries

    Don't restrict partition sizes to exactly fit on the right or bottom frame boundaries

    • Current block partitioning approach on right or borrtom frame boundaries in rav1e
    • Both topdown and bottomup function keep splitting the input SB (SuperBlock) until no partitioned blocks straddle on the right or bottom frame boundaries. (The condition whether keep splitting or not is checked by 'must_split', which is set true if the current partition size straddle on the frame boundary or other condition such as if current size is larger than desired max partition size as shown in the code, https://github.com/xiph/rav1e/blob/8f273bcbde77e5f3711138a57c13dec9dc793973/src/encoder.rs#L2546)

    Affected areas of codebase can be:

    • [x] Partition search functions should not restrict partition sizes to exactly fit on the right or bottom frame boundaries
    • [x] Distortion compute functions to use visible area, which can be any size not defined by av1 partition sizes ~~- [x] Intra prediction to predict only visible pixels only~~
    • [x] Ref pixels for intra pred (i.e. intra edge pixels) should not use invisible pixels. ~~- [ ] Inter prediction (Motion Estimation) to predict only visible pixels only~~ ~~- [ ] Define the pixel values for invisible area as input to forward transforms, i.e. what kind of padding to use for input and reconstructed frame? Already defined that extension of directly adjacent and last available pixel.~~
    enhancement high priority compression performance 
    opened by ycho 47
  • Tile encoding

    Tile encoding

    (description updated on 16 april 2019)

    This PR implements tile encoding (#631).

    1. The (many) first commits introduce tiling structures, which allow to expose simultaneous tiled regions of the whole frame data.
    2. Following commits use the tiling structures where necessary in the whole codebase.
    3. Then, command line arguments are added, the encoder encodes tiles separately, and separate tiles are written to the bitstream.
    4. Finally, parallelization is enabled (spoiler: 1 line of code).

    Context

    Encoding a frame first involves frame-wise accesses (initialization, etc.), then tile-wise accesses (to encode tiles in parallel), then frame-wise accesses using the results of tile-encoding (deblocking, cdef, …):

                                    \
          +----------------+         |
          |                |         |
          |                |         |  Frame-wise accesses
          |                |          >
          |                |         |   - FrameState<T>
          |                |         |   - Frame<T>
          +----------------+         |   - Plane<T>
                                    /    - ...
    
                  ||   tiling views
                  \/
                                    \
      +---+  +---+  +---+  +---+     |
      |   |  |   |  |   |  |   |     |  Tile encoding (possibly in parallel)
      +---+  +---+  +---+  +---+     |
                                     |
      +---+  +---+  +---+  +---+     |  Tile-wise accesses
      |   |  |   |  |   |  |   |      >
      +---+  +---+  +---+  +---+     |   - TileStateMut<'_, T>
                                     |   - TileMut<'_, T>
      +---+  +---+  +---+  +---+     |   - PlaneRegionMut<'_, T>
      |   |  |   |  |   |  |   |     |
      +---+  +---+  +---+  +---+     |
                                    /
    
                  ||   vanishing of tiling views
                  \/
                                    \
          +----------------+         |
          |                |         |
          |                |         |  Frame-wise accesses
          |                |          >
          |                |         |  (deblocking, CDEF, ...)
          |                |         |
          +----------------+         |
                                    /
    

    Tiling

    As you know, in Rust, it is not sufficient not to read/write the same memory from several threads, it must be impossible to write (safe) code that could do it. More precisely, a mutable reference may not alias any other reference to the same memory.

    That's the reason why, as a preliminary step, I replaced accesses using the whole plane as a raw slice in addition to the stride information by PlaneSlice (#1035) and PlaneMutSlice (#1043).

    But Plane(Mut)Slice still borrows the whole plane slice, so it does not, in itself, solves the problem.

    There are several structures to be tiled, which form a tree:

     +- FrameState → TileState
     |  +- Frame → Tile
     |  |  +- Plane → PlaneRegion 
     |  +  RestorationState → TileRestorationState
     |  |  +- RestorationPlane → TileRestorationPlane
     |  |     +- FrameRestorationUnits → TileRestorationUnits
     |  +  FrameMotionVectors → TileMotionVectors
     +- FrameBlocks → TileBlocks
    

    Most of them exist both in const and mutable version (e.g. PlaneRegion and PlaneRegionMut).

    Tiling structures

    PlaneRegion

    This is a view of bounded region of a Plane. It is similar to PlaneSlice, except that it does not borrow the whole underlying raw slice. That way, it is possible to get several non-overlapping regions simultaneously.

    In the end, we should probably merge it with PlaneSlice, but it requires more work because some frame-wise code still uses PlaneSlice in the code base.

    It is possible to retrieve a subregion of a region (which may not exceed its parent). In theory, a subregion is defined by a rectangle (for example: x, y, width, height), but in practice, we need more flexibility. For example, we often need to retrieve a region from an offset, using the same bottom-right corner as its parent without providing width and height.

    For that purpose, I propose a specific Area structure (actually, a Rust enum) to describe subregion bounds. Here are some usage examples:

    let region = plane.region(Area::Rect { x: 32, y: 32, width: 512, height: 512 });
    
    // the area is relative to the parent region
    let subregion = region.subregion(Area::StartingAt { x: 128, y: 128 });
    // it is equivalent to
    let subregion = region.subregion(Area::Rect { x: 128, y: 128, width: 384, height: 384 });
    // or
    let subregion = plane.region(Area:: Rect { x: 160, y: 160, width: 384, height: 384 });
    

    Retrieving a subregion from a BlockOffset is so common accross the code base that I decided to expose it directly:

    let bo = BlockOffset { x: 2, y: 3 };
    let subregion = region.subregion(Area::BlockStartingAt { bo });
    

    Like Plane(Mut)Slice, it provides operator[] and iterators over its rows:

    let row5 = &region[5];
    let value = region[3][4];
    for row in region.rows_iter() {
        let _first_four_values = &row[..4];
    }
    

    The mutable versions of the structure (PlaneRegionMut) and methods are also provided.

    Tile

    A Tile is a view of 3 colocated plane regions (Tile is to a PlaneRegion as a Frame is to a Plane).

    The mutable version (TileMut) is also provided.

    TileState

    The way the FrameState fields are mapped in TileState depends on how they are accessed tile-wise and frame-wise.

    Some fields (like qc) are only used during tile-encoding, so they are only stored in TileState.

    Some other fields (like input or segmentation) are not written tile-wise, so they just reference the matching field in FrameState.

    Some others (like rec) are written tile-wise, but must be accessible frame-wise once the tile views vanish (e.g. for deblocking).

    It contains 2 tiled views: TileRestorationState and a vector of TileMotionVectorsMut (a tiled view of FrameMotionVectors).

    This structure is only provided as mutable (TileStateMut). A const version is not necessary, and would require to instantiate a const version of all its embedded tiled views.

    TileBlocks

    TileBlocks is a tiled view of FrameBlocks. It exposes the blocks associated to the tile.

    The mutable version (TileBlocksMut) is also provided.

    Splitting into tiles

    A TilingInfo structure computes all the details about tiling from the frame width and height and the (log2 of the) number of tile columns and rows. The details are accessible for initializing data or writing into the bitstream.

    It provides an iterator over tiles (yielding one TileStateMut and one TileBlocksMut for each tile).

    Frame offsets vs tile offsets

    In encode_tile(), super-block, block and plane offsets are expressed relative to the tile. The tiling views expose its data relative to the tile:

    • plane_region[y][x] is pixel (x, y) relative to the plane region,
    • tile_blocks[boy][box] contains the Block at (box, boy) relative to the tile,

    TileStateMut exposes some references to frame-level data stored in FrameState:

    • input is a reference to the whole frame,
    • input_hres and input_qres are references to the whole planes.

    When accessing these frame-level data, tile offsets are converted to frame offsets, for example by:

    let frame_bo = ts.to_frame_block_offset(bo);
    

    Current state

    It works.

    Need more tests and reviews.

    Usage

    Pass the requested log2 number of tiles, with --tile-cols-log2 and --tile-rows-log2. For example, to request 2x2 tiles:

    rav1e video.y4m -o video.ivf --tile-cols-log2 1 --tile-rows-log2 1
    

    Currently, the number of tiles is passed in log2 (like in libaom, even if the aomenc options are called --tile-columns and --tile-rows), to avoid any confusion. Maybe we could find a correct user-friendly option later.

    Note that the actual number of tiles may be smaller (e.g. if the image size has fewer super-blocks).

    opened by rom1v 40
  • [WIP] Add horz/vert (2:1 only) partitions to top-down partition rdo

    [WIP] Add horz/vert (2:1 only) partitions to top-down partition rdo

    Not complete yet.

    TODO :

    • [x] Required to add rectangular transforms, i.e. 8x4, 4x8, 16x8, 8x16, 32x16, 16x32, 32x64, 64x32
    • [x] Check the rectangular transforms work correctly with existing helper functions
    • [x] Check currently enabled intra prediction code can also work for rectangular cases
    • [x] Test top-down partition rdo with new partitions added
    • [x] Check with each of minimum block size
    • [x] Check both of intra and inter modes works correctly with rectangular block sizes/
    WorkInProgress 
    opened by ycho 31
  • Allow inclusion in static builds

    Allow inclusion in static builds

    I'm trying to build a static version ffmpeg including rav1e, but it seems like one can't compile a static library that includes lgcc_s, because there's only a shard version of it.

    gcc-10 -L<prefix>/lib -I<prefix>/lib -L/usr/lib/gcc/x86_64-linux-gnu/10 -static -Wl,--as-needed -Wl,-z,noexecstack -I<prefix>/include/rav1e -L<prefix>/lib -o /tmp/ffconf.EpJq5glV/test /tmp/ffconf.EpJq5glV/test.o -lrav1e -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lm -lpthread
    /usr/bin/ld: cannot find -lgcc_s
    collect2: error: ld returned 1 exit status
    ERROR: rav1e >= 0.1.0 not found using pkg-config
    

    I'm not a lot into C so I'm not sure if that is something that even can be changed at all or if there's something I couldn't find that's allows this (although I searched quite thorough and all of the "solutions" simply didn't work or aren't applicable).

    opened by cromefire 29
  • Desync with speed 0 and 1

    Desync with speed 0 and 1

    Tested with commit: acb7b69227ab29b42f8258b66d5c0dfee9a32470

    ./target/release/rav1e ~/Downloads/crowd_run_2160p50.y4m -o test.ivf -r test_rec.y4m --quantizer 128 --speed=1 --limit=3 --low_latency --tune=Psnr

    ../aom_build/aomdec test.ivf -o test_dec.y4m -v ../aom_build/aomdec test.ivf --rawvideo -o test_dec.yuv -v ffmpeg -i test_rec.y4m test_rec.yuv -v 0 cmp test_rec.yuv test_dec.yuv

    test_rec.yuv test_dec.yuv differ: char 8324073, line 1 ==> difference in 2nd frame

    Similar desync with speed 0. 1st frame is fine. Checked that it first happens at the 2nd frame both 1st and 2nd frame when two frames are encoded, and does. not happen if only one frame is encoded. Speed 2, 6 and 10 were fine.

    bug high priority Chef's Choice desync cursed 
    opened by ycho 25
  • Adaptive keyframe selection

    Adaptive keyframe selection

    Detects the level of difference between the current frame and the previous frame, and if the difference is above a preset threshold, encodes the current frame as a keyframe.

    Introduces a new CLI option, --max-keyint (-i), to set the maximum interval between two keyframes. Reuses the existing --keyint (-I) option as the minimum interval between two keyframes. Adjusts the default settings to be 15 frames minimum and 150 frames maximum. In theory, 300 frames may even be a safe default, but a conservative default was selected given that decoder performance is still insufficient for higher definition videos, and particularly long keyframe intervals negatively impact seek time.

    Compression improvements were up to 25% on test sources.

    Before:

    Frame 1499 - Inter frame - 756 bytes - encoded 1500 frames, 1.15 fps, 656.97 Kb/s
    
    Key Frames:     50    avg size:   27489 B
    Inter:        1450    avg size:    2676 B
    Intra Only:      0    avg size:       0 B
    Switch:          0    avg size:       0 B
    

    After:

    Frame 1499 - Inter frame - 725 bytes - encoded 1500 frames, 1.15 fps, 538.58 Kb/s
    
    Key Frames:     13    avg size:   27876 B
    Inter:        1487    avg size:    2653 B
    Intra Only:      0    avg size:       0 B
    Switch:          0    avg size:       0 B
    

    Closes #717

    research WorkInProgress 
    opened by shssoichiro 23
  • Add tiles support

    Add tiles support

    • [ ] Implement the configuration settings
      • Context structure
      • Expose CLI options for it
    • [ ] have the Frame provide a tile iterator example
      • [ ] Have a FrameTileIterator
      • [ ] Have a FrameTile
      • [ ] Make the FrameTile produce PlaneSlice
    • [ ] Use the tile elements in the codebase
    enhancement conformance research difficult WorkInProgress 
    opened by lu-zero 23
  • Enable open partition on frame boundary

    Enable open partition on frame boundary

    Issue #2166

    • AV1 spec allows to use a partition that straddle on frame boundary if certain condition met, i.e, 'Not Split' is allowed if more than half of the partition size is available (based on coded frame size, i.e. multipe of 8 pixels) in either horizontal or vertical.

    • For top-down partition search (i.e current speed levels 2~10), use bottomup on frame boundary

    • Functon for computing visible area of a partition or a tx block based on actual frame size (not a coded size) is added and in general it should be only used for a compute distortion. Hence, do not use it for adjusting the block size. One good critical example would be that a coefficient block size, when it is encoded, is not affected by visibility.

    • CFL specially requires to read outside the coded frame, when it compute average and obtain ac components for luma block, i.e. luma_ac().

    opened by ycho 21
  • Failed to spawn process

    Failed to spawn process

    Hi there, my OS is Windows 10 and I'm trying to build rav1e I got this error:

    error: failed to run custom build command for `rav1e v0.3.1`
    
    Caused by:
      process didn't exit successfully: `C:\Users\Серега\Desktop\RUST\stream\target\debug\build\rav1e-f617848cd6c89f31\build-script-build` (exit code: 101)
    --- stdout
    cargo:rustc-cfg=nasm_x86_64
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/ipred.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/ipred.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/me.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/me.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/itx_ssse3.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/itx_ssse3.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/sad_sse2.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/sad_sse2.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/sad_avx.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/sad_avx.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/satd.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/satd.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/cdef.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/cdef.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/tables.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/tables.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/mc.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/mc.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/ipred_ssse3.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/ipred_ssse3.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/itx.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/itx.o"
    running: "nasm" "-fwin64" "-g" "-IC:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out/" "-Isrc/" "C:\\Users\\Серега\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\rav1e-0.3.1\\src/x86/mc_ssse3.asm" "-o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/mc_ssse3.o"
    running: "lib" "/OUT:C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\rav1easm.lib" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/ipred.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/ipred_ssse3.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/itx.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/itx_ssse3.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/mc.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/mc_ssse3.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/me.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/sad_sse2.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/sad_avx.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/satd.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/cdef.o" "C:\\Users\\Серега\\Desktop\\RUST\\stream\\target\\debug\\build\\rav1e-14e80f4d321818c9\\out\\src/x86/tables.o"
    
    --- stderr
    thread 'main' panicked at 'failed to spawn process: No such file or directory. (os error 2)', C:\Users\Серега\.cargo\registry\src\github.com-1ecc6299db9ec823\nasm-rs-0.1.7\src\lib.rs:339:19
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    opened by TheRadioGuy 21
  • Frame flushing regression - last sub GOP constructed incorrectly

    Frame flushing regression - last sub GOP constructed incorrectly

    I perform semi-regular encoder benchmarks on a set of anime-centered clips. While preparing this month's report I noticed a massive drop in BD rate (up to 12% less efficiency).

    I bisected the commits between the last "good" tests, performed on commit 64b9f501, and the one where I first noticed the drop, commit 57e4f926. Turned out the bad commit is 3202bf70 (ping @shssoichiro):

    # sh bd_rate.sh /c/Users/utente/Desktop/regressionTesting/rav1e-0.1.0-1219-be245fc0.out /c/Users/utente/Desktop/regressionTesting/rav1e-0.1.0-1222-3202bf70.out
            RATE (%) DSNR (dB)
     MSSSIM 12.5511 -0.502696
    PSNRHVS 12.6137 -0.699069
      HVMAF 12.4122 -1.06813
    

    BD rate report up to the commit before the bad one:

    # sh bd_rate.sh /c/Users/utente/Desktop/regressionTesting/rav1e-0.1.0-977-64b9f501.out /c/Users/utente/Desktop/regressionTesting/rav1e-0.1.0-1219-be245fc0.out
            RATE (%) DSNR (dB)
     MSSSIM -3.70748 0.161186
    PSNRHVS -3.5851 0.215709
      HVMAF -5.32006 0.524379
    

    BD rate between 64b9f501 and a more recent one (d3b81ca1):

    # sh bd_rate.sh /c/Users/utente/Desktop/regressionTesting/rav1e-0.1.0-977-64b9f501.out /c/Users/utente/Desktop/regressionTesting/rav1e-0.1.0-1768-d3b81ca1.out
            RATE (%) DSNR (dB)
     MSSSIM 9.60217 -0.394358
    PSNRHVS 9.65825 -0.547198
      HVMAF 6.88864 -0.659584
    

    The regression can be reliably replicated on a variety anime clips with different resolutions (1280x720, 1920x1080), so I'm sure it's not just a pathological case with this particular clip.

    Note that the regression is not nearly as bad on more "real life" content, for example ToS:

    # sh bd_rate.sh /c/Users/utente/Desktop/codecComparison/TearsOfSteel/statistics/rav1e-0.1.0-977-64b9f501.out /c/Users/utente/Desktop/codecComparison/TearsOfSteel/statistics/rav1e-0.1.0-1726-57e4f926.out
            RATE (%) DSNR (dB)
     MSSSIM 0.557544 -0.0240243
    PSNRHVS 0.898872 -0.0503387
      HVMAF -0.0647014 -0.0338935
    

    I'm using the AppVeyor Win64 builds in an MSYS2 environment on Win7 64bits. The clip used during bisection can be found here (FFV1 video in MKV container): https://mega.nz/#!QwhCxIob!I_aWvxX_igulPzZw9nr__nxvr7X-jYPcOlCLUfqL_-I Cmdlines used during bisection: seq -w 112 16 160 | xargs -n1 -P6 -I {} ./rav1e-0.1.0-1222-3202bf70.exe --low_latency false -o rav1e-0.1.0-1222-3202bf70/test.rav1e.cq{}.ivf --quantizer {} -s 2 --tune Psnr orig.i420.y4m

    bug conformance BLOCKER 
    opened by SmilingWolf 21
  • add mp4 muxer.

    add mp4 muxer.

    @kodabb and @tdaede This will fix https://github.com/xiph/rav1e/issues/998. I am not familiar with rust. Any suggestion is welcome.

    Please ignore de2611a and 32b57af, I already sent them out at https://github.com/xiph/rav1e/pull/1259

    thanks

    opened by xuguangxin 20
  • Fails to build for target minimum MacOS target when MACOSX_DEPLOYMENT_TARGET is set

    Fails to build for target minimum MacOS target when MACOSX_DEPLOYMENT_TARGET is set

    Describe the bug When building librav1e.0.5.1.dylib on MacOS Monterey with export MACOSX_DEPLOYMENT_TARGET=10.12, the library is still built for MacOS 12 and above.

    To Reproduce

    cd /Library/Developer/CommandLineTools/SDKs
    sudo curl -L 'https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.12.sdk.tar.xz' | sudo tar -xzf -
    export MACOSX_DEPLOYMENT_TARGET=10.12
    export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.12.sdk
    

    Build rav1e

    otool -l librav1e.0.5.1.dylib
    

    Observe in the output:

          cmd LC_BUILD_VERSION
      cmdsize 32
     platform 1
        minos 12.0
          sdk 12.3
       ntools 1
         tool 3
      version 762.0
    

    Expected behavior

    otool -l librav1e.0.5.1.dylib
    

    Observe in the output:

          cmd LC_VERSION_MIN_MACOSX
      cmdsize 16
      version 10.12
          sdk 10.12
    

    Required Information Toolchain (if is a build problem):

    $ cargo --version
    cargo 1.61.0
    $ rustc --version
    rustc 1.61.0
    $ nasm --version # if on x86_64
    NASM version 2.15.05 compiled on Oct 23 2022
    

    Version:

    $ rav1e --version
    rav1e 0.5.1 (0.5.1) (release)
    

    Operating system:

    $ uname -a
    Darwin static.38.39.185.78.cyberlynk.net 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
    

    Console Output Please paste the console output below if it is relevant,

    This is a crash report from a user trying to use the library as part of GIMP.

    Process: file-heif [5090] Path: /Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/plug-ins/file-heif/file-heif Identifier: file-heif Version: 0 Code Type: X86-64 (Native) Parent Process: gimp [5001] Responsible: file-heif [5090] User ID: 501

    Date/Time: 2022-12-05 22:08:13.578 -0500 OS Version: Mac OS X 10.14.6 (18G9323) Report Version: 12 Anonymous UUID: xxxx

    Sleep/Wake UUID: xxxxxx

    Time Awake Since Boot: 100000 seconds Time Since Wake: 9500 seconds

    System Integrity Protection: enabled

    Crashed Thread: 0

    Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

    Termination Reason: DYLD, [0x1] Library missing

    Application Specific Information: dyld: launch, loading dependent libraries

    Dyld Error Message: Library not loaded: @rpath/lib/librav1e.0.5.1.dylib Referenced from: /Applications/GIMP.app/Contents/Resources/lib/libheif.1.dylib Reason: no suitable image found. Did find: /Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/plug-ins/file-heif/../../../../../lib/librav1e.0.5.1.dylib: cannot load 'librav1e.0.5.1.dylib' (load command 0x80000034 is unknown)

    Binary Images: 0x100467000 - 0x100476fff +file-heif (0) /Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/plug-ins/file-heif/file-heif

    Model: MacBookPro11,4, BootROM 427.140.8.0.0, 4 processors, Intel Core i7, 2.8 GHz, 16 GB, SMC 2.29f24 Graphics: kHW_IntelIrisProItem, Intel Iris Pro, spdisplays_builtin Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120 Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x152), Broadcom BCM43xx 1.0 (7.77.61.3 AirPortDriverBrcmNIC-1305.12) Bluetooth: Version 6.0.14d13, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB 3.0 Bus USB Device: Apple Internal Keyboard / Trackpad USB Device: Bluetooth USB Host Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1

    bug 
    opened by lukaso 6
  • Add Rust-native implementation matching available dav1d assembly

    Add Rust-native implementation matching available dav1d assembly

    For x86_64 builds of rav1e at the time of opening this issue, there are 212 functions included in assembly that are not referenced by rav1e Rust code. These mostly correspond to features that are yet unimplemented. Some are for existing features with assembly integration friction.

    rav1e_blend_16bpc_avx2
    rav1e_blend_16bpc_ssse3
    rav1e_blend_8bpc_avx2
    rav1e_blend_8bpc_avx512icl
    rav1e_blend_8bpc_ssse3
    rav1e_blend_h_16bpc_avx2
    rav1e_blend_h_16bpc_ssse3
    rav1e_blend_h_8bpc_avx2
    rav1e_blend_h_8bpc_avx512icl
    rav1e_blend_h_8bpc_ssse3
    rav1e_blend_v_16bpc_avx2
    rav1e_blend_v_16bpc_ssse3
    rav1e_blend_v_8bpc_avx2
    rav1e_blend_v_8bpc_avx512icl
    rav1e_blend_v_8bpc_ssse3
    rav1e_cdef_dir_16bpc_sse4
    rav1e_cdef_dir_16bpc_ssse3
    rav1e_cdef_dir_8bpc_sse4
    rav1e_cdef_dir_8bpc_ssse3
    rav1e_cdef_filter_4x4_16bpc_avx2
    rav1e_cdef_filter_4x4_16bpc_ssse3
    rav1e_cdef_filter_4x4_8bpc_sse2
    rav1e_cdef_filter_4x4_8bpc_sse4
    rav1e_cdef_filter_4x4_8bpc_ssse3
    rav1e_cdef_filter_4x8_16bpc_avx2
    rav1e_cdef_filter_4x8_16bpc_ssse3
    rav1e_cdef_filter_4x8_8bpc_sse2
    rav1e_cdef_filter_4x8_8bpc_sse4
    rav1e_cdef_filter_4x8_8bpc_ssse3
    rav1e_cdef_filter_8x8_16bpc_avx2
    rav1e_cdef_filter_8x8_16bpc_ssse3
    rav1e_cdef_filter_8x8_8bpc_sse2
    rav1e_cdef_filter_8x8_8bpc_sse4
    rav1e_cdef_filter_8x8_8bpc_ssse3
    rav1e_emu_edge_16bpc_avx2
    rav1e_emu_edge_16bpc_ssse3
    rav1e_emu_edge_8bpc_avx2
    rav1e_emu_edge_8bpc_ssse3
    rav1e_inv_txfm_add_wht_wht_4x4_16bpc_avx2
    rav1e_inv_txfm_add_wht_wht_4x4_16bpc_sse2
    rav1e_inv_txfm_add_wht_wht_4x4_8bpc_avx2
    rav1e_inv_txfm_add_wht_wht_4x4_8bpc_sse2
    rav1e_ipred_cfl_ac_420_16bpc_avx2
    rav1e_ipred_cfl_ac_420_8bpc_avx2
    rav1e_ipred_cfl_ac_420_8bpc_ssse3
    rav1e_ipred_cfl_ac_422_16bpc_avx2
    rav1e_ipred_cfl_ac_422_8bpc_avx2
    rav1e_ipred_cfl_ac_422_8bpc_ssse3
    rav1e_ipred_cfl_ac_444_16bpc_avx2
    rav1e_ipred_cfl_ac_444_8bpc_avx2
    rav1e_ipred_cfl_ac_444_8bpc_ssse3
    rav1e_ipred_filter_16bpc_avx2
    rav1e_ipred_filter_8bpc_avx2
    rav1e_ipred_filter_8bpc_ssse3
    rav1e_mask_16bpc_avx2
    rav1e_mask_16bpc_ssse3
    rav1e_mask_8bpc_avx2
    rav1e_mask_8bpc_avx512icl
    rav1e_mask_8bpc_ssse3
    rav1e_obmc_masks_avx2
    rav1e_pal_pred_16bpc_avx2
    rav1e_pal_pred_8bpc_avx2
    rav1e_pal_pred_8bpc_ssse3
    rav1e_prep_8tap_16bpc_avx2
    rav1e_prep_8tap_16bpc_ssse3
    rav1e_prep_8tap_8bpc_avx2
    rav1e_prep_8tap_8bpc_avx512icl
    rav1e_prep_8tap_8bpc_sse2
    rav1e_prep_8tap_8bpc_ssse3
    rav1e_prep_8tap_scaled_16bpc_avx2
    rav1e_prep_8tap_scaled_16bpc_ssse3
    rav1e_prep_8tap_scaled_8bpc_avx2
    rav1e_prep_8tap_scaled_8bpc_ssse3
    rav1e_prep_8tap_scaled_regular_16bpc_avx2
    rav1e_prep_8tap_scaled_regular_16bpc_ssse3
    rav1e_prep_8tap_scaled_regular_8bpc_avx2
    rav1e_prep_8tap_scaled_regular_8bpc_ssse3
    rav1e_prep_8tap_scaled_regular_sharp_16bpc_avx2
    rav1e_prep_8tap_scaled_regular_sharp_16bpc_ssse3
    rav1e_prep_8tap_scaled_regular_sharp_8bpc_avx2
    rav1e_prep_8tap_scaled_regular_sharp_8bpc_ssse3
    rav1e_prep_8tap_scaled_regular_smooth_16bpc_avx2
    rav1e_prep_8tap_scaled_regular_smooth_16bpc_ssse3
    rav1e_prep_8tap_scaled_regular_smooth_8bpc_avx2
    rav1e_prep_8tap_scaled_regular_smooth_8bpc_ssse3
    rav1e_prep_8tap_scaled_sharp_16bpc_avx2
    rav1e_prep_8tap_scaled_sharp_16bpc_ssse3
    rav1e_prep_8tap_scaled_sharp_8bpc_avx2
    rav1e_prep_8tap_scaled_sharp_8bpc_ssse3
    rav1e_prep_8tap_scaled_sharp_regular_16bpc_avx2
    rav1e_prep_8tap_scaled_sharp_regular_16bpc_ssse3
    rav1e_prep_8tap_scaled_sharp_regular_8bpc_avx2
    rav1e_prep_8tap_scaled_sharp_regular_8bpc_ssse3
    rav1e_prep_8tap_scaled_sharp_smooth_16bpc_avx2
    rav1e_prep_8tap_scaled_sharp_smooth_16bpc_ssse3
    rav1e_prep_8tap_scaled_sharp_smooth_8bpc_avx2
    rav1e_prep_8tap_scaled_sharp_smooth_8bpc_ssse3
    rav1e_prep_8tap_scaled_smooth_16bpc_avx2
    rav1e_prep_8tap_scaled_smooth_16bpc_ssse3
    rav1e_prep_8tap_scaled_smooth_8bpc_avx2
    rav1e_prep_8tap_scaled_smooth_8bpc_ssse3
    rav1e_prep_8tap_scaled_smooth_regular_16bpc_avx2
    rav1e_prep_8tap_scaled_smooth_regular_16bpc_ssse3
    rav1e_prep_8tap_scaled_smooth_regular_8bpc_avx2
    rav1e_prep_8tap_scaled_smooth_regular_8bpc_ssse3
    rav1e_prep_8tap_scaled_smooth_sharp_16bpc_avx2
    rav1e_prep_8tap_scaled_smooth_sharp_16bpc_ssse3
    rav1e_prep_8tap_scaled_smooth_sharp_8bpc_avx2
    rav1e_prep_8tap_scaled_smooth_sharp_8bpc_ssse3
    rav1e_prep_bilin_scaled_16bpc_avx2
    rav1e_prep_bilin_scaled_16bpc_ssse3
    rav1e_prep_bilin_scaled_8bpc_avx2
    rav1e_prep_bilin_scaled_8bpc_ssse3
    rav1e_put_8tap_16bpc_avx2
    rav1e_put_8tap_16bpc_ssse3
    rav1e_put_8tap_8bpc_avx2
    rav1e_put_8tap_8bpc_avx512icl
    rav1e_put_8tap_8bpc_ssse3
    rav1e_put_8tap_scaled_16bpc_avx2
    rav1e_put_8tap_scaled_16bpc_ssse3
    rav1e_put_8tap_scaled_8bpc_avx2
    rav1e_put_8tap_scaled_8bpc_ssse3
    rav1e_put_8tap_scaled_regular_16bpc_avx2
    rav1e_put_8tap_scaled_regular_16bpc_ssse3
    rav1e_put_8tap_scaled_regular_8bpc_avx2
    rav1e_put_8tap_scaled_regular_8bpc_ssse3
    rav1e_put_8tap_scaled_regular_sharp_16bpc_avx2
    rav1e_put_8tap_scaled_regular_sharp_16bpc_ssse3
    rav1e_put_8tap_scaled_regular_sharp_8bpc_avx2
    rav1e_put_8tap_scaled_regular_sharp_8bpc_ssse3
    rav1e_put_8tap_scaled_regular_smooth_16bpc_avx2
    rav1e_put_8tap_scaled_regular_smooth_16bpc_ssse3
    rav1e_put_8tap_scaled_regular_smooth_8bpc_avx2
    rav1e_put_8tap_scaled_regular_smooth_8bpc_ssse3
    rav1e_put_8tap_scaled_sharp_16bpc_avx2
    rav1e_put_8tap_scaled_sharp_16bpc_ssse3
    rav1e_put_8tap_scaled_sharp_8bpc_avx2
    rav1e_put_8tap_scaled_sharp_8bpc_ssse3
    rav1e_put_8tap_scaled_sharp_regular_16bpc_avx2
    rav1e_put_8tap_scaled_sharp_regular_16bpc_ssse3
    rav1e_put_8tap_scaled_sharp_regular_8bpc_avx2
    rav1e_put_8tap_scaled_sharp_regular_8bpc_ssse3
    rav1e_put_8tap_scaled_sharp_smooth_16bpc_avx2
    rav1e_put_8tap_scaled_sharp_smooth_16bpc_ssse3
    rav1e_put_8tap_scaled_sharp_smooth_8bpc_avx2
    rav1e_put_8tap_scaled_sharp_smooth_8bpc_ssse3
    rav1e_put_8tap_scaled_smooth_16bpc_avx2
    rav1e_put_8tap_scaled_smooth_16bpc_ssse3
    rav1e_put_8tap_scaled_smooth_8bpc_avx2
    rav1e_put_8tap_scaled_smooth_8bpc_ssse3
    rav1e_put_8tap_scaled_smooth_regular_16bpc_avx2
    rav1e_put_8tap_scaled_smooth_regular_16bpc_ssse3
    rav1e_put_8tap_scaled_smooth_regular_8bpc_avx2
    rav1e_put_8tap_scaled_smooth_regular_8bpc_ssse3
    rav1e_put_8tap_scaled_smooth_sharp_16bpc_avx2
    rav1e_put_8tap_scaled_smooth_sharp_16bpc_ssse3
    rav1e_put_8tap_scaled_smooth_sharp_8bpc_avx2
    rav1e_put_8tap_scaled_smooth_sharp_8bpc_ssse3
    rav1e_put_bilin_scaled_16bpc_avx2
    rav1e_put_bilin_scaled_16bpc_ssse3
    rav1e_put_bilin_scaled_8bpc_avx2
    rav1e_put_bilin_scaled_8bpc_ssse3
    rav1e_resize_16bpc_avx2
    rav1e_resize_16bpc_ssse3
    rav1e_resize_8bpc_avx2
    rav1e_resize_8bpc_avx512icl
    rav1e_resize_8bpc_ssse3
    rav1e_sgr_filter_3x3_16bpc_avx2
    rav1e_sgr_filter_3x3_8bpc_avx2
    rav1e_sgr_filter_5x5_16bpc_avx2
    rav1e_sgr_filter_5x5_8bpc_avx2
    rav1e_sgr_filter_mix_16bpc_avx2
    rav1e_sgr_filter_mix_8bpc_avx2
    rav1e_sgr_x_by_x_avx2
    rav1e_warp_affine_8x8_16bpc_avx2
    rav1e_warp_affine_8x8_16bpc_ssse3
    rav1e_warp_affine_8x8_8bpc_avx2
    rav1e_warp_affine_8x8_8bpc_avx512icl
    rav1e_warp_affine_8x8_8bpc_sse2
    rav1e_warp_affine_8x8_8bpc_sse4
    rav1e_warp_affine_8x8_8bpc_ssse3
    rav1e_warp_affine_8x8t_16bpc_avx2
    rav1e_warp_affine_8x8t_16bpc_ssse3
    rav1e_warp_affine_8x8t_8bpc_avx2
    rav1e_warp_affine_8x8t_8bpc_avx512icl
    rav1e_warp_affine_8x8t_8bpc_sse2
    rav1e_warp_affine_8x8t_8bpc_sse4
    rav1e_warp_affine_8x8t_8bpc_ssse3
    rav1e_w_avg_16bpc_avx2
    rav1e_w_avg_16bpc_ssse3
    rav1e_w_avg_8bpc_avx2
    rav1e_w_avg_8bpc_avx512icl
    rav1e_w_avg_8bpc_ssse3
    rav1e_wiener_filter5_16bpc_avx2
    rav1e_wiener_filter5_8bpc_avx2
    rav1e_wiener_filter7_16bpc_avx2
    rav1e_wiener_filter7_8bpc_avx2
    rav1e_w_mask_420_16bpc_avx2
    rav1e_w_mask_420_16bpc_ssse3
    rav1e_w_mask_420_8bpc_avx2
    rav1e_w_mask_420_8bpc_avx512icl
    rav1e_w_mask_420_8bpc_ssse3
    rav1e_w_mask_422_16bpc_avx2
    rav1e_w_mask_422_16bpc_ssse3
    rav1e_w_mask_422_8bpc_avx2
    rav1e_w_mask_422_8bpc_avx512icl
    rav1e_w_mask_422_8bpc_ssse3
    rav1e_w_mask_444_16bpc_avx2
    rav1e_w_mask_444_16bpc_ssse3
    rav1e_w_mask_444_8bpc_avx2
    rav1e_w_mask_444_8bpc_avx512icl
    rav1e_w_mask_444_8bpc_ssse3
    
    enhancement 
    opened by barrbrain 0
  • Add developer CLI flags for tuning encoder internals

    Add developer CLI flags for tuning encoder internals

    Currently adds the following:

    • --deblock-strength
    • --deblock-sharpness
    • --ip-qidx-ratio
    • --temporal-rdo-strength

    These flags will be available only if the devel feature flag is active, as they are intended to be used to ease development and not to be tweaked by end users. rav1e continues to subscribe to the philosophy that end users should not need to be cargo culting their command lines to get optimal results, and we would prefer to tune the encoder internals so that users do not have to. This change helps us do that.

    opened by shssoichiro 5
  • Support for constrained quality

    Support for constrained quality

    Discussed in https://github.com/xiph/rav1e/discussions/3045

    Originally posted by JustSimplyKyle October 24, 2022 Currently, you can use both --quantizer or --bitrate in encoding. In aomenc, there is such thing as "constrained quality mode"(cq), which you can specify both quailty and bitrate. It will ensure that the bitrate is below a specific upper bound and also reaching the set quailty. Is this the same thing in rav1e?

    According to my testing, rav1e doesn't support it, hence I'm posting an issue

    opened by JustSimplyKyle 0
  • [MinGW] Potential build problem with MSYS2

    [MinGW] Potential build problem with MSYS2

    Describe the bug I submitted an issue to https://github.com/msys2/MINGW-packages/issues/13609 which describes the scenario that when using conventional compiler flags in MSYS2 CLANG64 environment to build rav1e the linking would fail due to an issue with winapi-rs and LLD (console output attached at bottom). This problem can be fixed by explicitly defining WINAPI_NO_BUNDLED_LIBRARIES=1 as an environment variable when building. I remember this fix was not necessary several months ago when I build rav1e which succeeded, so it could be a result from a recent clang update (?), but regardless of that I think it would be nice if this can be mentioned in the readme.

    To Reproduce Build rav1e using suggested console commands under MSYS2 Clang64 environment. Detailed steps please refer to the aforementioned issue post.

    Expected behavior Successful build.

    Required Information Toolchain (if is a build problem):

    $ cargo 1.64.0
    $ rustc 1.64.0 (Rev2, Built by MSYS2 project)
    $ NASM version 2.15.05 compiled on Apr 26 2021
    

    Operating system:

    $ MINGW64_NT-10.0-22621 *** 3.3.6-341.x86_64 2022-09-20 22:07 UTC x86_64 Msys
    

    Console Output

       Compiling rav1e v0.6.0 (F:\rav1e)
    error: linking with `x86_64-w64-mingw32-clang` failed: exit code: 1
      |
      = note: "x86_64-w64-mingw32-clang" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "C:\\Users\\***\\AppData\\Local\\Temp\\rustcWVWQ03\\symbols.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.0.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.1.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.10.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.11.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.12.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.13.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.14.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.15.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.2.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.3.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.4.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.5.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.6.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.7.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.8.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.build_script_build.fc1a548b-cgu.9.rcgu.o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.1mk6s9evydj838p7.rcgu.o" "-L" "F:\\rav1e\\target\\release\\deps" "-L" "C:\\Users\\***\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "F:\\rav1e\\target\\release\\build\\libgit2-sys-a19d48734de24fe2\\out\\build" "-L" "D:/MSYS2/clang64/lib" "-L" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "F:\\rav1e\\target\\release\\deps\\libbuilt-80d953aca1ad7afb.rlib" "F:\\rav1e\\target\\release\\deps\\libcargo_lock-3f8f280f36cd7062.rlib" "F:\\rav1e\\target\\release\\deps\\libtoml-37ec2f0fe1d05ef6.rlib" "F:\\rav1e\\target\\release\\deps\\libgit2-5b82a945bf9a733d.rlib" "F:\\rav1e\\target\\release\\deps\\liburl-a08b0d3caa56e34b.rlib" "F:\\rav1e\\target\\release\\deps\\libidna-366410cd103a5dfb.rlib" "F:\\rav1e\\target\\release\\deps\\libunicode_normalization-2f6bfb7b3a086b80.rlib" "F:\\rav1e\\target\\release\\deps\\libtinyvec-9d9a96af3b9c5161.rlib" "F:\\rav1e\\target\\release\\deps\\libtinyvec_macros-dfae013329c00f8d.rlib" "F:\\rav1e\\target\\release\\deps\\libunicode_bidi-928457dbc4690836.rlib" "F:\\rav1e\\target\\release\\deps\\libform_urlencoded-7444179a8e06b888.rlib" "F:\\rav1e\\target\\release\\deps\\libpercent_encoding-88eaaa11e219460f.rlib" "F:\\rav1e\\target\\release\\deps\\liblog-45f6d0ad8a668379.rlib" "F:\\rav1e\\target\\release\\deps\\liblibgit2_sys-4475fc3ab89d8340.rlib" "F:\\rav1e\\target\\release\\deps\\liblibz_sys-4d29617796b0494c.rlib" "F:\\rav1e\\target\\release\\deps\\liblibc-3bd09e13fc6adee8.rlib" "F:\\rav1e\\target\\release\\deps\\libbitflags-8d2a392b65a2d45e.rlib" "F:\\rav1e\\target\\release\\deps\\libchrono-447bd8395c2b0364.rlib" "F:\\rav1e\\target\\release\\deps\\libnum_integer-f2cf17cab2d0a6c7.rlib" "F:\\rav1e\\target\\release\\deps\\libnum_traits-5496f7d6f37ce963.rlib" "F:\\rav1e\\target\\release\\deps\\libtime-f62bdaa33ae6dc52.rlib" "F:\\rav1e\\target\\release\\deps\\libwinapi-3a2632e81f8412a1.rlib" "F:\\rav1e\\target\\release\\deps\\libcc-3a985506337f3247.rlib" "F:\\rav1e\\target\\release\\deps\\libjobserver-c2b5d9ab05f4965c.rlib" "F:\\rav1e\\target\\release\\deps\\libnasm_rs-6e436f20906be1f4.rlib" "F:\\rav1e\\target\\release\\deps\\librayon-3daecff996a205ed.rlib" "F:\\rav1e\\target\\release\\deps\\librayon_core-a0a94d2e6f10b0d4.rlib" "F:\\rav1e\\target\\release\\deps\\libnum_cpus-9308f2630bb92797.rlib" "F:\\rav1e\\target\\release\\deps\\libcrossbeam_deque-00e70379a97e563f.rlib" "F:\\rav1e\\target\\release\\deps\\libcrossbeam_epoch-4d7fc600624e36a8.rlib" "F:\\rav1e\\target\\release\\deps\\libmemoffset-2f984550c4ab8123.rlib" "F:\\rav1e\\target\\release\\deps\\libscopeguard-8240fbbaca4bb41d.rlib" "F:\\rav1e\\target\\release\\deps\\libcrossbeam_channel-c2eda85fa2ee1c88.rlib" "F:\\rav1e\\target\\release\\deps\\libcrossbeam_utils-01730e04256929d4.rlib" "F:\\rav1e\\target\\release\\deps\\libcfg_if-68a1c858674e6dca.rlib" "F:\\rav1e\\target\\release\\deps\\libeither-b024025ee9e9f6ff.rlib" "F:\\rav1e\\target\\release\\deps\\librustc_version-2468e9861ec09d75.rlib" "F:\\rav1e\\target\\release\\deps\\libsemver-9738c0180364c340.rlib" "F:\\rav1e\\target\\release\\deps\\libserde-993e2a0295e61473.rlib" "-Wl,--start-group" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-894835858dd80803.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-52f0a2fdd1810d87.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libobject-33084c7d87198494.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libmemchr-84f0193becb20c5b.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libaddr2line-a2ddf2fdbe5500d2.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libgimli-c8abbcda29563214.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_demangle-00528c39ecffd37d.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd_detect-105c5285b801cf8d.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libhashbrown-a57615a46f0d1313.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libminiz_oxide-b4bd85be66312c64.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libadler-01e5ae87c73b75b4.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_alloc-e5eb7228c4906b52.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-8400aba1d618f14e.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcfg_if-14a619e20200a041.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-12bffb4eb9f7ab86.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-05af6ed936a7f82f.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_core-a71d71a63ac4a02b.rlib" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-5657b292e655b34c.rlib" "-Wl,--end-group" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-172bd7491b525268.rlib" "-Wl,-Bdynamic" "-lwinhttp" "-lrpcrt4" "-lole32" "-lcrypt32" "-lz" "-lwinapi_advapi32" "-lwinapi_gdi32" "-lwinapi_kernel32" "-lwinapi_msimg32" "-lwinapi_ole32" "-lwinapi_opengl32" "-lwinapi_runtimeobject" "-lwinapi_winspool" "-ladvapi32" "-lole32" "-loleaut32" "-ladvapi32" "-luserenv" "-lkernel32" "-lws2_32" "-lbcrypt" "-l:libunwind.a" "-Wl,--nxcompat" "-L" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-o" "F:\\rav1e\\target\\release\\build\\rav1e-d2901c9842218cf2\\build_script_build-d2901c9842218cf2.exe" "-Wl,--gc-sections" "-no-pie" "-Wl,--strip-all" "D:\\MSYS2\\clang64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
      = note: x86_64-w64-mingw32-clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
              ld.lld: error: C:\Users\***\.cargo\registry\src\github.com-1ecc6299db9ec823\winapi-x86_64-pc-windows-gnu-0.4.0\lib/libwinapi_runtimeobject.a: unknown file type
              x86_64-w64-mingw32-clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    bug 
    opened by zhguyu 0
  • rav1e_config_set_sample_aspect_ratio() from the C api silently accepts unsupported values

    rav1e_config_set_sample_aspect_ratio() from the C api silently accepts unsupported values

    The function returns void, meaning no failure is expected, yet it accept values that will be rejected when calling rav1e_context_new() with the provided RaConfig. An example is 0:1 or 0:0. Since rav1e_context_new() returns a pointer on success or NULL on failure, the user has no way to know what was set wrong in the RaConfig, so a function like rav1e_config_set_sample_aspect_ratio() should have been defined to return an error value.

    I suggest deprecating rav1e_config_set_sample_aspect_ratio() and introducing a new rav1e_config_set_sar() function or similar that returns an int as replacement. And while at it, the same should probably be done with rav1e_config_set_time_base(). I haven't checked this one, but you can pass values to it that are surely going to be rejected too.

    bug 
    opened by jamrial 1
Releases(v0.6.2)
Owner
Xiph.Org Foundation
We develop free and open media codecs
Xiph.Org Foundation
Plays back videos in your terminal in an insanely slow and inefficient way.

term-video I guess this is usable now... Compilation Since this project is built using Rust, install its toolchain first, for example using rustup. gi

Pascal Puffke 7 Feb 23, 2022
Pure-rust implementation of legacy H.263 video codec and associated color transforms

website | demo | nightly builds | wiki h263-rs h263-rs is a pure-Rust implementation of ITU-T Recommendation H.263 (2005/08), a video codec commonly u

Ruffle 7 Dec 18, 2022
A CLI tool that converts videos to ASCII and displays them to the terminal on the fly

A CLI tool that converts videos to ASCII and displays them to the terminal on the fly

Luke T 19 Nov 15, 2022
Gyroflow is an application that can stabilize your video by using motion data from a gyroscope and optionally an accelerometer

Gyroflow is an application that can stabilize your video by using motion data from a gyroscope and optionally an accelerometer. Modern cameras record that data internally (GoPro, Sony, Insta360 etc), and this application stabilizes the captured footage precisely by using them. It can also use gyro data from an external source (eg. from Betaflight blackbox).

Gyroflow 3.9k Jan 5, 2023
Lumiere is a proof-of-concept/example video player built with the Slint UI framework and libmpv

Lumiere is a proof-of-concept/example video player built with the Slint UI framework and libmpv. This was built quickly to try out Slint and it's new OpenGL underlay feature.

Valerian G. 25 Nov 21, 2022
Xiu - A simple and secure live media server in pure Rust (RTMP/HTTP-FLV/HLS/Relay).🦀

Xiu is a simple and secure live media server written by pure Rust, it now supports popular live protocols like RTMP/HLS/HTTP-FLV (and maybe other protocols in the future), you can deploy it as a stand-alone server or a cluster using the relay feature.

HarlanC 602 Jan 2, 2023
Media Cleaner is a simple CLI tool to clean up your media library based on your Overseerr requests and Tautulli history, written in Rust.

Media Cleaner Media Cleaner is a simple CLI tool to clean up your media library based on your Overseerr requests and Tautulli history, written in Rust

Felix Bjerhem Aronsson 21 Mar 22, 2023
AV1 encoding tool with fast VMAF sampling. Uses svt-av1, ffmpeg & vmaf

ab-av1 AV1 encoding tool with fast VMAF sampling. Uses svt-av1, ffmpeg & vmaf. Command: auto-encode Automatically determine the best crf to deliver th

Alex Butler 92 Jan 1, 2023
Fastest and safest Rust implementation of parquet. `unsafe` free. Integration-tested against pyarrow

Parquet2 This is a re-write of the official parquet crate with performance, parallelism and safety in mind. The five main differentiators in compariso

Jorge Leitao 237 Jan 1, 2023
Aptos-core strives towards being the safest and most scalable layer one blockchain solution.

Aptos-core strives towards being the safest and most scalable layer one blockchain solution. Today, this powers the Aptos Devnet, tomorrow Mainnet in order to create universal and fair access to decentralized assets for billions of people.

Aptos Labs 4.7k Jan 6, 2023
A AV1 video decoder implemented in pure rust.

Rust AV1 Decoder A AV1 decoder implemented in pure rust. This is an experimental project currently in progress. Unlike existing projects, this is an A

Mr.Panda 5 Dec 8, 2023
A DHCP parser and encoder for DHCPv4/DHCPv6

dhcproto A DHCP parser and encoder for DHCPv4/DHCPv6. dhcproto aims to be a functionally complete DHCP implementation. Many common option types are im

BlueCat Engineering 80 Dec 11, 2022
mico (minimalistic config file format) encoder and decoder

mico This library implements a parser and emitter for mico (minimalistic config file format). Format example: Name: mico Description: minimalistic con

null 1 Jan 30, 2022
Free Rust-only Xbox ADPCM encoder and decoder

XbadPCM Safe (and optionally no-std) Rust crate for encoding and decoding Xbox ADPCM blocks. Decoding example Here is example code for decoding stereo

Snowy 5 Nov 20, 2022
decoder (and encoder) for quaternions sent from a joycon. Based heavily on reverse engineering done by hexkyz.

joycon-quat decoder (and encoder) for quaternions sent from a joycon. Based heavily on reverse engineering done by hexkyz. for those who want to use i

Kitlith 3 Feb 28, 2024
A binary encoder / decoder implementation in Rust.

Bincode A compact encoder / decoder pair that uses a binary zero-fluff encoding scheme. The size of the encoded object will be the same or smaller tha

Bincode 1.9k Jan 2, 2023
A Rust encoder/decoder for Dominic Szablewski's QOI format for fast, lossless image compression.

QOI - The “Quite OK Image” format This is a Rust encoder and decoder for Dominic Szablewski's QOI format for fast, lossless image compression. See the

Chevy Ray Johnston 62 Nov 29, 2022
An experimental gif encoder for Windows 10.

giffun An experimental gif encoder for Windows 10. Resources Based on "Techniques for GPU-based Color Quantization" (2019) by Matthias Trapp, Sebastia

Robert Mikhayelyan 3 Dec 22, 2021
A binary encoder / decoder implementation in Rust.

Bincode A compact encoder / decoder pair that uses a binary zero-fluff encoding scheme. The size of the encoded object will be the same or smaller tha

Bincode 1.9k Dec 29, 2022
A basic rust QOI decoder/encoder

libqoi A basic rust QOI decoder/encoder. Why QOI QOI is a lossless image format with a one page specification. It can achieve better compression than

null 2 May 21, 2022