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 | # hevc10-roundtrip.sh: Main 10 round trip of ec-h265. Encodes testsrc2 clips as 10-bit |
| 3 | # 4:2:0 (yuv420p10le), decodes the stream with ec-h265 and with ffmpeg, and compares |
| 4 | # each against the encoder's reconstruction byte for byte. Also reports the size, the |
| 5 | # 10-bit PSNR of the reconstruction against the source, and for bitrate mode the rate |
| 6 | # achieved against the target. |
| 7 | # |
| 8 | # Usage: scripts/hevc10-roundtrip.sh (run it where the cargo build happens: |
| 9 | # scripts/remote-run.sh h265m10enc -- scripts/hevc10-roundtrip.sh) |
| 10 | # |
| 11 | # Environment: DATA (default $HOME/.cache/hevc10-data), GOP (keyframe interval for the |
| 12 | # GOP rows, default 8), QP (constant QP, default 30), RC (bitrate mode as kbps@fps, e.g. |
| 13 | # 2500@30; when set, the constant-QP rows are skipped), FRAMES (default 64), CLIPS |
| 14 | # (default "416x240 1280x720"), EXTRA (encoder flags, e.g. "sh"). |
| 15 | |
| 16 | |
| 17 | here= |
| 18 | data= |
| 19 | gop= |
| 20 | qp= |
| 21 | rc= |
| 22 | frames= |
| 23 | clips= |
| 24 | |
| 25 | |
| 26 | |
| 27 | target= |
| 28 | |
| 29 | gopbin="/release/examples/hevc_gop" |
| 30 | |
| 31 | status=0 |
| 32 | |
| 33 | if [; then modes="rc"; else modes="qp"; fi |
| 34 | |
| 35 | for; do |
| 36 | w= |
| 37 | h= |
| 38 | src="/src10-.yuv" |
| 39 | if [; then |
| 40 | |
| 41 | |
| 42 | fi |
| 43 | for; do |
| 44 | for; do |
| 45 | tag="-k-" |
| 46 | stream="/.hevc" |
| 47 | recon="/.recon.yuv" |
| 48 | dec="/.ec.yuv" |
| 49 | ff="/.ff.yuv" |
| 50 | if [; then |
| 51 | EC_H265_RC= |
| 52 | else |
| 53 | |
| 54 | fi |
| 55 | |
| 56 | |
| 57 | if ; then ec=exact; else ec=MISMATCH; status=1; fi |
| 58 | if ; then fv=exact; else fv=MISMATCH; status=1; fi |
| 59 | bytes= |
| 60 | kbps= |
| 61 | metrics= |
| 62 | py= |
| 63 | pyuv= |
| 64 | |
| 65 | |
| 66 | done |
| 67 | done |
| 68 | done |
| 69 |