forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust376.0 MiBa69dfabTahinli4 hours ago4073 commits

cmp_all.sh23 lines, 1.0 KiBHistoryRawDownload
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:-${EC_FIXTURES:-$HOME/fixtures}/open/fate/dts}
6FF=${EC_FFMPEG:-$HOME/.cache/ec-ffmpeg/ffmpeg}
7FP=$(dirname "$FF")/ffprobe
8dec=${CARGO_TARGET_DIR:-target}/release/examples/dec
9here=$(cd "$(dirname "$0")" && pwd)
10out=${TMPDIR:-/tmp}/dtscmp
11mkdir -p "$out"
12for f in "$d"/*; do
13 b=$(basename "$f")
14 case "$b" in *.f32|*.pcm) continue;; esac
15 echo "== $b"
16 "$dec" "$f" "$out/$b.ours" 2>&1 | tail -3
17 co="-core_only 1"; case "$b" in xch*|dts_es*|x96*) co="";; esac
18 "$FF" -v error -y -flags +bitexact $co -i "$f" -f s32le "$out/$b.ref" 2>&1 | tail -2
19 nch=$(ffprobe -v error -show_entries stream=channels -of csv=p=0 "$f")
20 perm=""; [ "$nch" = 7 ] && perm="0,1,2,3,6,4,5"
21 skip=0; case "$b" in x96*) skip=2048;; *.dtshd) skip=1024;; esac
22 python3 "$here/compare.py" "$out/$b.ours" "$out/$b.ref" "$nch" s32 "$perm" "$skip" | head -${LINES_MAX:-12}
23done