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 | # h264-lane-check.sh: recon-match, rate-control and thread-speed checks for the |
| 3 | # ec-h264 encoder, driven through the h264_clip_encode example. |
| 4 | # |
| 5 | # Usage (from the repo root, normally via scripts/remote-run.sh): |
| 6 | # scripts/h264-lane-check.sh recon md5 of ffmpeg's decode vs the encoder's reconstruction |
| 7 | # scripts/h264-lane-check.sh rate [size:bitrate:kind ...] |
| 8 | # 60 s rate-control runs, achieved vs target bitrate |
| 9 | # scripts/h264-lane-check.sh fps 1080p30 encode fps at 1, 2, 4 and 6 threads |
| 10 | # |
| 11 | # Sources are ffmpeg testsrc2 with temporal noise. No real camera clip exists in |
| 12 | # fixtures/video (every one is generated from testsrc2), so that is the input. |
| 13 | # Work files go to ${H264_WORK:-$TMPDIR/h264-lane-check} and nothing is left in /tmp. |
| 14 | |
| 15 | |
| 16 | mode= |
| 17 | root= |
| 18 | work= |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | enc="/target/release/examples/h264_clip_encode" |
| 24 | [ && enc="/release/examples/h264_clip_encode" |
| 25 | |
| 26 | # $1 size, $2 rate, $3 duration seconds, $4 source kind (testsrc2 | noisy) |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 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 | |
| 74 | |
| 75 | |
| 76 | case "" in |
| 77 | recon) |
| 78 | # Even sizes only: the encoder refuses odd dimensions. Covers sizes that are |
| 79 | # not macroblock multiples, odd macroblock counts, and 1080p. |
| 80 | fail=0 |
| 81 | for; do |
| 82 | for; do |
| 83 | || fail=1 |
| 84 | || fail=1 |
| 85 | done |
| 86 | done |
| 87 | |
| 88 | ;; |
| 89 | rate) |
| 90 | # Cases are size:bitrate:kind arguments, or all six noisy cases by default. |
| 91 | cases=("") |
| 92 | [ || cases=(1280x720:1000000:noisy 1280x720:2000000:noisy |
| 93 | 1280x720:4000000:noisy 1920x1080:1000000:noisy 1920x1080:4000000:noisy |
| 94 | 1920x1080:8000000:noisy) |
| 95 | for; do |
| 96 | IFS=: |
| 97 | |
| 98 | done |
| 99 | ;; |
| 100 | fps) |
| 101 | for; do |
| 102 | |
| 103 | |
| 104 | done |
| 105 | ;; |
| 106 | *) |
| 107 | |
| 108 | |
| 109 | ;; |
| 110 | esac |