edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB6f8f2a3Tahinli6 days ago3950 commits
| 1 | #!/usr/bin/env bash |
| 2 | # hevc-thread-bench.sh: encode lavfi clips with ec-h265 at 1, 2, 4 and 6 worker threads, |
| 3 | # report fps per thread count, and check that every thread count writes the same bytes. |
| 4 | # |
| 5 | # Usage: scripts/remote-run.sh hevcencthreads --host b -- scripts/hevc-thread-bench.sh |
| 6 | # |
| 7 | # Environment: DATA (default $HOME/.cache/hevcencthreads-data), GOP (keyframe interval, |
| 8 | # default 8), QP (default 30), FRAMES (default 12), CLIPS (default "1280x720 1920x1080"), |
| 9 | # THREADS (default "1 2 4 6"), RUNS (timed runs per point, default 1, best time kept). |
| 10 | # RC_KBPS: when set (e.g. 4000), encode with bitrate control at that rate and FPS (default 30) |
| 11 | # through the hevc_rc example instead of constant QP through hevc_gop. |
| 12 | |
| 13 | |
| 14 | here= |
| 15 | data= |
| 16 | gop= |
| 17 | qp= |
| 18 | frames= |
| 19 | clips= |
| 20 | threads_list= |
| 21 | runs= |
| 22 | |
| 23 | |
| 24 | rc_kbps= |
| 25 | rc_fps= |
| 26 | if [; then |
| 27 | |
| 28 | else |
| 29 | |
| 30 | fi |
| 31 | target= |
| 32 | |
| 33 | gopbin="/release/examples/hevc_gop" |
| 34 | [ && gopbin="/release/examples/hevc_rc" |
| 35 | |
| 36 | |
| 37 | for; do |
| 38 | w= |
| 39 | h= |
| 40 | src="/src--.yuv" |
| 41 | if [; then |
| 42 | |
| 43 | |
| 44 | fi |
| 45 | ref_md5="" |
| 46 | for; do |
| 47 | out="/out--t.hevc" |
| 48 | recon="/recon--t.yuv" |
| 49 | best="" |
| 50 | for; do |
| 51 | start= |
| 52 | if [; then |
| 53 | EC_H265_THREADS="" |
| 54 | else |
| 55 | EC_H265_THREADS="" |
| 56 | fi |
| 57 | end= |
| 58 | secs= |
| 59 | if [ || ; then |
| 60 | best= |
| 61 | fi |
| 62 | done |
| 63 | bytes= |
| 64 | md5= |
| 65 | if [; then ref_md5=; fi |
| 66 | same=yes |
| 67 | [ || same=NO |
| 68 | [ || { ; ; } |
| 69 | fps= |
| 70 | |
| 71 | done |
| 72 | done |