forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

cmp_all.sh21 lines, 921 bytesHistoryRawDownload
1#!/usr/bin/env bash
2# Decode each FATE sample with ec-dts and ffmpeg (-flags +bitexact, integer
3# path) and compare. Needs the dec example built (release).
4set -u
5d=${1:-$HOME/dts-fate}
6dec=${CARGO_TARGET_DIR:-target}/release/examples/dec
7here=$(cd "$(dirname "$0")" && pwd)
8out=${TMPDIR:-/tmp}/dtscmp
9mkdir -p "$out"
10for f in "$d"/*; do
11 b=$(basename "$f")
12 case "$b" in *.f32|*.pcm) continue;; esac
13 echo "== $b"
14 "$dec" "$f" "$out/$b.ours" 2>&1 | tail -3
15 co="-core_only 1"; case "$b" in xch*|dts_es*|x96*) co="";; esac
16 ffmpeg -v error -y -flags +bitexact $co -i "$f" -f s32le "$out/$b.ref" 2>&1 | tail -2
17 nch=$(ffprobe -v error -show_entries stream=channels -of csv=p=0 "$f")
18 perm=""; [ "$nch" = 7 ] && perm="0,1,2,3,6,4,5"
19 skip=0; case "$b" in x96*) skip=2048;; *.dtshd) skip=1024;; esac
20 python3 "$here/compare.py" "$out/$b.ours" "$out/$b.ref" "$nch" s32 "$perm" "$skip" | head -${LINES_MAX:-12}
21done