edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | #!/usr/bin/env bash |
| 2 | # hevc-gop-roundtrip.sh: encode lavfi clips with ec-h265's IDR+P encoder, decode the |
| 3 | # stream with ec-h265 and with ffmpeg, and compare each against the encoder's |
| 4 | # reconstruction. Also reports the size and PSNR of the GOP against an intra-only |
| 5 | # stream at the same QP. |
| 6 | # |
| 7 | # Usage: scripts/hevc-gop-roundtrip.sh (run it where the cargo build happens; |
| 8 | # scripts/remote-run.sh hevcencp -- scripts/hevc-gop-roundtrip.sh) |
| 9 | # |
| 10 | # Environment: DATA (default $HOME/.cache/hevcencp-data), GOP (keyframe interval, |
| 11 | # default 8), QP (default 30), FRAMES (default 30), CLIPS (default "352x288 1280x720 350x286"), |
| 12 | # EXTRA (encoder flags, e.g. "sh" for sign data hiding). |
| 13 | |
| 14 | |
| 15 | here= |
| 16 | data= |
| 17 | gop= |
| 18 | qp= |
| 19 | frames= |
| 20 | clips= |
| 21 | |
| 22 | |
| 23 | |
| 24 | target= |
| 25 | |
| 26 | gopbin="/release/examples/hevc_gop" |
| 27 | |
| 28 | status=0 |
| 29 | |
| 30 | for; do |
| 31 | w= |
| 32 | h= |
| 33 | src="/src-.yuv" |
| 34 | if [; then |
| 35 | # testsrc2 with a slow vertical scroll: real motion, not a static chart. |
| 36 | |
| 37 | |
| 38 | fi |
| 39 | for; do |
| 40 | tag="-k" |
| 41 | stream="/.hevc" |
| 42 | recon="/.recon.yuv" |
| 43 | dec="/.ec.yuv" |
| 44 | ff="/.ff.yuv" |
| 45 | |
| 46 | |
| 47 | |
| 48 | if ; then ec=exact; else ec=MISMATCH; status=1; fi |
| 49 | if ; then fv=exact; else fv=MISMATCH; status=1; fi |
| 50 | bytes= |
| 51 | if [; then intra_bytes=; fi |
| 52 | ratio= |
| 53 | metrics= |
| 54 | py= |
| 55 | pyuv= |
| 56 | |
| 57 | |
| 58 | done |
| 59 | done |
| 60 |