From e515ec88ce160ba0bd7594ede0c26ee49c4aec0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=9Aled=C5=BA?= Date: Mon, 30 Dec 2024 13:52:58 +0100 Subject: [PATCH] Document dimension names of the Nx tensor. Bump version to 0.8.1 --- README.md | 2 +- lib/frame.ex | 2 ++ mix.exs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e2d3b64..2f89f48 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Make sure you have installed FFMpeg (ver. 4.x - 7.x) development packages on you ```elixir def deps do [ - {:xav, "~> 0.8.0"}, + {:xav, "~> 0.8.1"}, # Add Nx if you want to have Xav.Frame.to_nx/1 {:nx, ">= 0.0.0"} ] diff --git a/lib/frame.ex b/lib/frame.ex index 7d85183..4486015 100644 --- a/lib/frame.ex +++ b/lib/frame.ex @@ -66,6 +66,8 @@ defmodule Xav.Frame do if Code.ensure_loaded?(Nx) do @doc """ Converts a frame to an Nx tensor. + + In case of a video frame, dimension names of the newly created tensor are `[:height, :width, :channels]`. """ @spec to_nx(t()) :: Nx.Tensor.t() def to_nx(%__MODULE__{type: :video} = frame) do diff --git a/mix.exs b/mix.exs index dfec97c..58d0aaa 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Xav.MixProject do use Mix.Project - @version "0.8.0" + @version "0.8.1" @source_url "https://github.com/elixir-webrtc/xav" def project do