edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB58b009bTahinli2 months ago2045 commits
| 1 | #!/usr/bin/env bash |
| 2 | # fetch-vectors.sh — download third-party conformance vectors into fixtures/vectors/. |
| 3 | # |
| 4 | # Vectors are NOT redistributed from this repo (fixtures/ is gitignored); only this |
| 5 | # script and scripts/vectors.sha256 are committed. Idempotent, checksum-verified, |
| 6 | # and graceful: a dead URL or offline network reports the set as FAILED and the |
| 7 | # script continues with the remaining sets. |
| 8 | # |
| 9 | # Usage: scripts/fetch-vectors.sh [set ...] (default: all sets) |
| 10 | # sets: h264-jvt hevc-jctvc opus-rfc6716 flac-xiph vorbis-xiph |
| 11 | # Env: EC_FIXTURES=<dir> (default <repo>/fixtures) |
| 12 | |
| 13 | |
| 14 | |
| 15 | ROOT= |
| 16 | VEC=/vectors |
| 17 | SUMS=/scripts/vectors.sha256 |
| 18 | CURL=(curl -fsSL --retry 2 --retry-delay 2 --connect-timeout 20 --max-time 900) |
| 19 | |
| 20 | || { ; ; } |
| 21 | |
| 22 | |
| 23 | |
| 24 | ok_sets=() |
| 25 | fail_sets=() |
| 26 | n_new=0 |
| 27 | n_have=0 |
| 28 | n_bad=0 |
| 29 | |
| 30 | # verify_or_record <abs-file> — checksum against scripts/vectors.sha256, or record it. |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | # fetch_list <destdir> <baseurl> <name...> — parallel download of missing names. |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | # fetch_archive <destdir> <url> <archive-name> — download + extract once. |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | # extract_zips <dir> — unpack each <name>.zip into <name>/ once (bitstream + ref yuv). |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | # ------------------------------------------------------------- h264-jvt ----- |
| 120 | # JVT/ITU-T H.264.1 conformance bitstreams (the set openh264 & ffmpeg are checked |
| 121 | # against). 35-stream feature-covering subset: CAVLC/CABAC, MBAFF/PAFF, I_PCM, |
| 122 | # weighted pred, long-term refs, multiple slice groups, redundant slices. |
| 123 | JVT_BASE=https://www.itu.int/wftp3/av-arch/jvt-site/draft_conformance/AVCv1 |
| 124 | JVT_STREAMS=( |
| 125 | AUD_MW_E.zip BA1_Sony_D.zip BA3_SVA_C.zip BA_MW_D.zip BANM_MW_D.zip |
| 126 | BASQP1_Sony_C.zip CABA1_SVA_B.zip CABA2_SVA_B.zip CABA3_SVA_B.zip |
| 127 | CACQP3_Sony_D.zip CAMACI3_Sony_C.zip CAMASL3_Sony_B.zip CANL1_SVA_B.zip |
| 128 | CANL2_SVA_B.zip CANL3_SVA_B.zip CANL4_SVA_B.zip CI_MW_D.zip CVFI1_SVA_C.zip |
| 129 | CVFI2_SVA_C.zip CVMAQP2_Sony_G.zip CVMAQP3_Sony_D.zip CVPCMNL2_SVA_C.zip |
| 130 | FI1_Sony_E.zip FM2_SVA_C.zip MIDR_MW_D.zip MR1_BT_A.zip MR9_BT_B.zip |
| 131 | NL1_Sony_D.zip NL3_SVA_E.zip NRF_MW_E.zip SL1_SVA_B.zip SVA_BA2_D.zip |
| 132 | SVA_CL1_E.zip SVA_FM1_E.zip SVA_NL2_E.zip |
| 133 | ) |
| 134 | |
| 135 | # ----------------------------------------------------------- hevc-jctvc ----- |
| 136 | # JCT-VC HEVC_v1 conformance suite. NOTE: "class A/B" names the CTC *test |
| 137 | # sequences* (Traffic/Kimono/...), not conformance bitstreams — the redistributable |
| 138 | # conformance set is feature-named, so this is a feature-covering subset incl. the |
| 139 | # Main10 streams needed for the 10-bit/P010 HW path. |
| 140 | HEVC_BASE=https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/HEVC_v1 |
| 141 | HEVC_STREAMS=( |
| 142 | AMP_A_Samsung_7.zip AMVP_A_MTK_4.zip BUMPING_A_ericsson_1.zip |
| 143 | CAINIT_A_SHARP_4.zip CIP_A_Panasonic_3.zip CONFWIN_A_Sony_1.zip |
| 144 | DBLK_A_SONY_3.zip DBLK_A_MAIN10_VIXS_4.zip DELTAQP_A_BRCM_4.zip |
| 145 | DSLICE_A_HHI_5.zip ENTP_A_QUALCOMM_1.zip FILLER_A_Sony_1.zip |
| 146 | INITQP_A_Sony_1.zip INITQP_B_Main10_Sony_1.zip ipcm_A_NEC_3.zip |
| 147 | IPRED_A_docomo_2.zip MAXBINS_A_TI_5.zip MERGE_A_TI_3.zip |
| 148 | PICSIZE_A_Bossen_1.zip POC_A_Bossen_3.zip RAP_A_docomo_6.zip |
| 149 | RPS_A_docomo_5.zip RQT_A_HHI_4.zip SAO_A_MediaTek_4.zip SDH_A_Orange_4.zip |
| 150 | SLICES_A_Rovi_3.zip TILES_A_Cisco_2.zip TSKIP_A_MS_3.zip |
| 151 | TSUNEQBD_A_MAIN10_Technicolor_2.zip WPP_A_ericsson_MAIN_2.zip |
| 152 | WPP_A_ericsson_MAIN10_2.zip WP_A_MAIN10_Toshiba_3.zip |
| 153 | ) |
| 154 | |
| 155 | # ---------------------------------------------------------- vorbis-xiph ----- |
| 156 | # Xiph's own Vorbis I decoder test vectors (chained streams, LSP edge cases, |
| 157 | # 48k mono, sample-rate oddities). |
| 158 | VORBIS_BASE=https://people.xiph.org/xiphmont/test-vectors/vorbis |
| 159 | VORBIS_FILES=( |
| 160 | 1.0-test.ogg 1.0.1-test.ogg 48k-mono.ogg beta3-test.ogg beta4-test.ogg |
| 161 | bimS-silence.ogg chain-test1.ogg chain-test2.ogg chain-test3.ogg |
| 162 | highrate-test.ogg lsp-test.ogg lsp-test2.ogg lsp-test3.ogg lsp-test4.ogg |
| 163 | moog.ogg one-entry-codebook-test.ogg out-of-spec-blocksize.ogg |
| 164 | rc1-test.ogg rc2-test.ogg rc3-test.ogg singlemap-test.ogg sleepzor.ogg |
| 165 | test-short.ogg test-short2.ogg unused-mode-test.ogg |
| 166 | ) |
| 167 | |
| 168 | SETS=("") |
| 169 | [ && SETS=(h264-jvt hevc-jctvc opus-rfc6716 flac-xiph vorbis-xiph) |
| 170 | |
| 171 | for; do |
| 172 | case in |
| 173 | h264-jvt) |
| 174 | |
| 175 | |
| 176 | ;; |
| 177 | hevc-jctvc) |
| 178 | |
| 179 | |
| 180 | ;; |
| 181 | opus-rfc6716) |
| 182 | # RFC 6716 / 8251 decoder test vectors (opus_compare reference set). |
| 183 | |
| 184 | |
| 185 | |
| 186 | ;; |
| 187 | flac-xiph) |
| 188 | # IETF cellar WG FLAC test files (supersedes the old svn.xiph.org set; |
| 189 | # carries the RFC 9639 subset + uncommon-but-legal stream shapes). |
| 190 | |
| 191 | |
| 192 | |
| 193 | ;; |
| 194 | vorbis-xiph) |
| 195 | |
| 196 | ;; |
| 197 | *) |
| 198 | |
| 199 | fail_sets+=("") |
| 200 | ;; |
| 201 | esac |
| 202 | done |
| 203 | |
| 204 | |
| 205 | for; do |
| 206 | [ || continue |
| 207 | |
| 208 | |
| 209 | |
| 210 | done |
| 211 | for; do |
| 212 | [ && |
| 213 | done |
| 214 | |
| 215 | |
| 216 | [ && [ |