├── .gitignore ├── LICENSE ├── README.md ├── index.md ├── player_validation_sequences ├── test_gbrp10le_x265.mp4 ├── test_yuv420p10le_x265.mp4 └── test_yuv444p10le_x265.mp4 ├── prepareraw.sh └── test_sequences ├── 1920x1080 ├── gradient_1920-1080_0-25.png ├── gradient_1920-1080_0-25_gbrp10le_x265.mp4 ├── gradient_1920-1080_0-25_yuv420p10_x265.mp4 ├── gradient_1920-1080_0-25_yuv444p10_x265.mp4 ├── gradient_1920-1080_25-50.png ├── gradient_1920-1080_25-50_gbrp10le_x265.mp4 ├── gradient_1920-1080_25-50_yuv420p10_x265.mp4 ├── gradient_1920-1080_25-50_yuv444p10_x265.mp4 ├── gradient_1920-1080_50-75.png ├── gradient_1920-1080_50-75_gbrp10le_x265.mp4 ├── gradient_1920-1080_50-75_yuv420p10_x265.mp4 ├── gradient_1920-1080_50-75_yuv444p10_x265.mp4 ├── gradient_1920-1080_75-100.png ├── gradient_1920-1080_75-100_gbrp10le_x265.mp4 ├── gradient_1920-1080_75-100_yuv420p10_x265.mp4 └── gradient_1920-1080_75-100_yuv444p10_x265.mp4 ├── 3120x1440 ├── gradient_3120-1440_0-50.png ├── gradient_3120-1440_0-50_gbrp10le_x265.mp4 ├── gradient_3120-1440_0-50_yuv420p10_x265.mp4 ├── gradient_3120-1440_0-50_yuv444p10_x265.mp4 ├── gradient_3120-1440_50-100.png ├── gradient_3120-1440_50-100_gbrp10le_x265.mp4 ├── gradient_3120-1440_50-100_yuv420p10_x265.mp4 └── gradient_3120-1440_50-100_yuv444p10_x265.mp4 ├── 3840x2160 ├── gradient_3840-2160_0-100.png ├── gradient_3840-2160_0-100_gbrp10le_x265.mp4 ├── gradient_3840-2160_0-100_yuv420p10_x265.mp4 ├── gradient_3840-2160_0-100_yuv444p10_x265.mp4 ├── gradient_3840-2160_0-50.png ├── gradient_3840-2160_0-50_gbrp10le_x265.mp4 ├── gradient_3840-2160_0-50_yuv420p10_x265.mp4 ├── gradient_3840-2160_0-50_yuv444p10_x265.mp4 ├── gradient_3840-2160_50-100.png ├── gradient_3840-2160_50-100_gbrp10le_x265.mp4 ├── gradient_3840-2160_50-100_yuv420p10_x265.mp4 └── gradient_3840-2160_50-100_yuv444p10_x265.mp4 └── runme.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.h265 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gradient 2 | 10-BIT DISPLAY TEST SEQUENCE 3 | 4 | I had always trouble finding good test sequences for verifying the 10-bit color depth support of new UHD TV sets (and new smartphones), so I just created some. Feel free to use it under cc. 5 | 6 | **Simply navigate to the [github pages](http://jursonovicst.github.io/gradient/) of this repository, open the linked video files or download the content of the [test sequences](https://github.com/jursonovicst/gradient/tree/master/test_sequences) folder to a pendrive, plug it into your device, and play the video files.** 7 | 8 | Check, how many vertical bars you see. If your display supports 10-bit color depth, you should see 4 times more stripes in 10 bit gradients, than on the 8 bit gradients. Look closely, they may be only 3 pixel wide (the stripe borders are marked with white lines). 9 | 10 | 11 | # How I made these sequences? 12 | 13 | Check the [prepareraw.sh](prepareraw.sh) script. 14 | 15 | I used ImageMagick to create a 16-bit png image with four gradients according to 8 bit colors values, and four gradients according to 10 bit color values. 16 | 17 | ![gradient](https://raw.githubusercontent.com/jursonovicst/gradient/master/test_sequences/1920x1080/gradient_1920-1080_25-50.png) 18 | 19 | (if you view this image on your computer, your display may not show a difference due to the lack of 10-bit color depth support...) 20 | 21 | Looping and encoding this png file with ffmpeg, using the x265 encoder with resulted mp4 video files, which you can play on the target device. 22 | 23 | During encoding, I used the following settings: 24 | 25 | - 5 fps to limit the size of the video files, 26 | - lossless encoding to allow exact color comparison, 27 | - full color range to have proper color steps at both ends of the gradient, 28 | - gbrp10le color space for native RGB color encoding, but yuv444p10 and yuv420p10 are also provided for better compatibility. 29 | 30 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | # 10 bit test sequences 2 | 3 | For the best quality, try first the video files with **gbrp10le** color space (which encodes the gradient with native RGB colors). Unfortunately, not all device supports this, you can try **yuv444p10**, or to **yuv420p10** (which may reduces the horizontal spatial resolution). 4 | 5 | For smaller resoutions, the gradients are splitted into multiple parts to allow wider stripes and easier indentification. 6 | 7 | | Target | Resolution | Gradient split | Color spaces | 8 | |----------------|------------|----------------|--------------| 9 | | UHD TV | 3840x2160 | 0%-100% | [gbrp10le](test_sequences/3840x2160/gradient_3840-2160_0-100_gbrp10le_x265.mp4), [yuv444p10](test_sequences/3840x2160/gradient_3840-2160_0-100_yuv444p10_x265.mp4), [yuv420p10](test_sequences/3840x2160/gradient_3840-2160_0-100_yuv420p10_x265.mp4) | 10 | | | | 0%-50% | [gbrp10le](test_sequences/3840x2160/gradient_3840-2160_0-50_gbrp10le_x265.mp4), [yuv444p10](test_sequences/3840x2160/gradient_3840-2160_0-50_yuv444p10_x265.mp4), [yuv420p10](test_sequences/3840x2160/gradient_3840-2160_0-50_yuv420p10_x265.mp4) | 11 | | | | 50%-100% | [gbrp10le](test_sequences/3840x2160/gradient_3840-2160_50-100_gbrp10le_x265.mp4), [yuv444p10](test_sequences/3840x2160/gradient_3840-2160_50-100_yuv444p10_x265.mp4), [yuv420p10](test_sequences/3840x2160/gradient_3840-2160_50-100_yuv420p10_x265.mp4) | 12 | ||||| 13 | | HD TV, monitor | 1920x1080 | 0%-25% | [gbrp10le](test_sequences/1920x1080/gradient_1920-1080_0-25_gbrp10le_x265.mp4), [yuv444p10](test_sequences/1920x1080/gradient_1920-1080_0-25_yuv444p10_x265.mp4), [yuv420p1](test_sequences/1920x1080/gradient_1920-1080_0-25_yuv420p10_x265.mp4) | 14 | | | | 25%-50% | [gbrp10le](test_sequences/1920x1080/gradient_1920-1080_25-50_gbrp10le_x265.mp4), [yuv444p10](test_sequences/1920x1080/gradient_1920-1080_25-50_yuv444p10_x265.mp4), [yuv420p1](test_sequences/1920x1080/gradient_1920-1080_25-50_yuv420p10_x265.mp4) | 15 | | | | 50%-75% | [gbrp10le](test_sequences/1920x1080/gradient_1920-1080_50-75_gbrp10le_x265.mp4), [yuv444p10](test_sequences/1920x1080/gradient_1920-1080_50-75_yuv444p10_x265.mp4), [yuv420p1](test_sequences/1920x1080/gradient_1920-1080_50-75_yuv420p10_x265.mp4) | 16 | | | | 75%-100% | [gbrp10le](test_sequences/1920x1080/gradient_1920-1080_75-100_gbrp10le_x265.mp4), [yuv444p10](test_sequences/1920x1080/gradient_1920-1080_75-100_yuv444p10_x265.mp4), [yuv420p1](test_sequences/1920x1080/gradient_1920-1080_75-100_yuv420p10_x265.mp4) | 17 | ||||| 18 | | Smartphone | 3120x1440 | 0%-50% | [gbrp10le](test_sequences/3120x1440/gradient_3120-1440_0-50_gbrp10le_x265.mp4), [yuv444p10](test_sequences/3120x1440/gradient_3120-1440_0-50_yuv444p10_x265.mp4), [yuv420p10](test_sequences/3120x1440/gradient_3120-1440_0-50_yuv420p10_x265.mp4) | 19 | | | | 50%-100% | [gbrp10le](test_sequences/3120x1440/gradient_3120-1440_50-100_gbrp10le_x265.mp4), [yuv444p10](test_sequences/3120x1440/gradient_3120-1440_50-100_yuv444p10_x265.mp4), [yuv420p10](test_sequences/3120x1440/gradient_3120-1440_50-100_yuv420p10_x265.mp4) | 20 | 21 | -------------------------------------------------------------------------------- /player_validation_sequences/test_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/player_validation_sequences/test_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /player_validation_sequences/test_yuv420p10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/player_validation_sequences/test_yuv420p10le_x265.mp4 -------------------------------------------------------------------------------- /player_validation_sequences/test_yuv444p10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/player_validation_sequences/test_yuv444p10le_x265.mp4 -------------------------------------------------------------------------------- /prepareraw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | usage () { 4 | echo "usage: $0 WIDTH HEIGHT GRADFROM GRADTO 5 | Creates a WIDTH x HEIGHT 16bit png test image with red-green-blue-gray gradients from GRADFROM % to GRADTO %, then converts it to a 10 seconds long, 10bit test video sequences with yuv420p10, yuv444p10, gbrp10le color spaces." 6 | } 7 | 8 | ############################################## 9 | # 10 | # This script creates a 16bit png test image, 11 | # and converts it to a 10bit test video to 12 | # test the color depth support of displays. 13 | # 14 | # command specifications 15 | ffmpeg="ffmpeg" 16 | # 17 | if [ $# -ne 4 ]; then 18 | usage 19 | exit -1 20 | fi 21 | # 22 | # video size in pixel 23 | if [ "$1" -le 0 ]; then 24 | usage 25 | exit -1 26 | fi 27 | if [ "$2" -le 0 ]; then 28 | usage 29 | exit -1 30 | fi 31 | width=$1 32 | height=$2 33 | # 34 | # gradient range in procent (0 to 100) 35 | if [ "$3" -lt 0 ]; then 36 | usage 37 | exit -1 38 | fi 39 | if [ "$4" -lt 0 ]; then 40 | usage 41 | exit -1 42 | fi 43 | if [ "$3" -gt 100 ]; then 44 | usage 45 | exit -1 46 | fi 47 | if [ "$4" -gt 100 ]; then 48 | usage 49 | exit -1 50 | fi 51 | 52 | gradfrom=$3 53 | gradto=$4 54 | # 55 | ############################################## 56 | 57 | 58 | # check dependencies 59 | hash convert 2>/dev/null || { echo >&2 "This script requires ImageMagic but it's not installed. Aborting."; exit 1; } 60 | 61 | hash $ffmpeg 2>/dev/null || { echo >&2 "This script requires ffmpeg but it's not installed. Aborting."; exit 1; } 62 | $ffmpeg -pix_fmts 2>&1 |grep yuv444p10 >/dev/null || { echo >&2 "It seems to me, that ffmpeg was not built with 10bit support. Aborting."; exit 1; } 63 | 64 | 65 | # check TMPDIR 66 | if [ ! -d "$TMPDIR" ]; then 67 | TMPDIR="./" 68 | fi 69 | 70 | 71 | # calculate parameters 72 | filename=gradient_$width-${height}_$gradfrom-$gradto 73 | 74 | gradheight=$(($height / 8)) #round down 75 | 76 | gradbarnum8=$((256 * ($gradto - $gradfrom) / 100)) #to avoid 77 | gradbarnum10=$(($gradbarnum8 * 4)) 78 | 79 | gradbarwidth10=$(($width / $gradbarnum10)) 80 | gradbarwidth8=$(($gradbarwidth10 * 4)) 81 | 82 | gradfrom8=$(($gradfrom * 256 / 100)) 83 | gradto8=$(($gradto * 256 / 100)) 84 | 85 | gradfrom10=$(($gradfrom * 1024 / 100)) 86 | gradto10=$(($gradto * 1024 / 100)) 87 | 88 | 89 | # check if gradient.png exists, if not, create it 90 | if [ -f $filename.png ]; then 91 | echo "skip gradient creation, $filename.png file does exist" 92 | 93 | else 94 | echo "creating empty canvas with size of ${width}x${height} pixel" 95 | convert -depth 16 -size ${width}x${height} xc:white $filename.png 96 | 97 | echo "8 bit $gradfrom% to $gradto% gradient: 98 | number of color bars: $gradbarnum8 99 | bar width: $gradbarwidth8 pixel 100 | $((1106 / $gradbarnum8)) mm on a 50\" TV 101 | $((140 / $gradbarnum8)) mm on a 6\" phone 102 | 103 | 10 bit $gradfrom% to $gradto% gradient: 104 | bar width: $gradbarwidth10 pixel 105 | $((1106 / $gradbarnum10)) mm on a 50\" TV 106 | $((140 / $gradbarnum10)) mm on a 6\" phone 107 | " 108 | 109 | COLORMASK=("#%04x00000000" "-" "#0000%04x0000" "-" "#00000000%04x" "-" "#%04x%04x%04x") 110 | COLORNAME=("red" "-" "green" "-" "blue" "-" "gray") 111 | 112 | for gradnum in $(seq 0 2 5); do 113 | 114 | echo "creating ${COLORNAME[$gradnum]} 8 bit gradient" 115 | command="convert -depth 16 $filename.png " 116 | for i in $(seq 0 $(($gradbarnum8 - 1))); do 117 | color1ch=$((256 * $gradfrom / 100 * 256 + 256 * $i)) 118 | color=$(printf ${COLORMASK[$gradnum]} $color1ch) 119 | x1=$(($i * gradbarwidth8)) 120 | y1=$(($gradheight * $gradnum + 3)) 121 | x2=$(($x1 + gradbarwidth8 - 1)) 122 | y2=$(($gradheight * ( $gradnum + 1 ) - 1)) 123 | #echo $color $x1 $y1 $x2 $y2 124 | command=$command"-fill \"$color\" -draw \"rectangle $x1,$y1 $x2,$y2\" -fill \"#ffffff\" -draw \"line $x2,$y1 $x2,$(($y1 + 10))\" " 125 | colorname=$(printf %04x $color1ch) 126 | command=$command"-fill \"#ffffffffffff\" -pointsize 10 -annotate +$x1+$(($y1 + 9)) '$colorname' " 127 | done 128 | command=$command"-fill \"#ffffffffffff\" -pointsize 36 -annotate +50+$(($y1 + 110)) '8bit ${COLORNAME[$gradnum]} $gradfrom% to $gradto% gradient (you should see $gradbarnum8 vertical bars)' " 129 | command=$command"$filename.png" 130 | eval $command 131 | 132 | echo "creating ${COLORNAME[$gradnum]} 10 bit gradient" 133 | command="convert -depth 16 $filename.png " 134 | for i in $(seq 0 $(($gradbarnum10 - 1))); do 135 | color1ch=$((256 * $gradfrom / 100 * 256 + 64 * $i)) 136 | color=$(printf ${COLORMASK[$gradnum]} $color1ch) 137 | x1=$(($i * gradbarwidth10)) 138 | y1=$(($gradheight * ( $gradnum + 1 ) + 1)) 139 | x2=$(($x1 + gradbarwidth10 - 1)) 140 | y2=$(($gradheight * ( $gradnum + 2 ) - 3)) 141 | #echo $color $x1 $y1 $x2 $y2 142 | command=$command"-fill \"$color\" -draw \"rectangle $x1,$y1 $x2,$y2\" -fill \"#ffffff\" -draw \"line $x2,$(($y2 - 10)) $x2,$y2 \" " 143 | colorname=$(printf %04x $color1ch) 144 | command=$command"-fill \"#ffffffffffff\" -pointsize 10 -annotate +$x1+$y2 '$colorname' " 145 | done 146 | command=$command"-fill \"#ffffffffffff\" -pointsize 36 -annotate +50+$(($y1 + 110)) '10bit ${COLORNAME[$gradnum]} gradient (you should see $gradbarnum10 vertical bars, if your display supports 10-bit color depth)' " 147 | command=$command"$filename.png" 148 | eval $command 149 | 150 | done 151 | 152 | gradnum=6 153 | 154 | echo "creating ${COLORNAME[$gradnum]} 8 bit gradient" 155 | command="convert -depth 16 $filename.png " 156 | for i in $(seq 0 $(($gradbarnum8 - 1))); do 157 | color1ch=$((256 * $gradfrom / 100 * 256 + 256 * $i)) 158 | color=$(printf ${COLORMASK[$gradnum]} $color1ch $color1ch $color1ch) 159 | x1=$(($i * gradbarwidth8)) 160 | y1=$(($gradheight * $gradnum + 3)) 161 | x2=$(($x1 + gradbarwidth8 - 1)) 162 | y2=$(($gradheight * ( $gradnum + 1 ) - 1)) 163 | #echo $color $x1 $y1 $x2 $y2 164 | command=$command"-fill \"$color\" -draw \"rectangle $x1,$y1 $x2,$y2\" -fill \"#ffffff\" -draw \"line $x2,$y1 $x2,$(($y1 + 10))\" " 165 | colorname=$(printf %04x $color1ch) 166 | command=$command"-fill \"#000000000000\" -pointsize 10 -annotate +$x1+$(($y1 + 9)) '$colorname' " 167 | done 168 | command=$command"-fill \"#000000000000\" -pointsize 36 -annotate +50+$(($y1 + 110)) '8bit ${COLORNAME[$gradnum]} $gradfrom% to $gradto% gradient (you should see $gradbarnum8 vertical bars)' " 169 | command=$command"$filename.png" 170 | eval $command 171 | 172 | echo "creating ${COLORNAME[$gradnum]} 10 bit gradient" 173 | command="convert -depth 16 $filename.png " 174 | for i in $(seq 0 $(($gradbarnum10 - 1))); do 175 | color1ch=$((256 * $gradfrom / 100 * 256 + 64 * $i)) 176 | color=$(printf ${COLORMASK[$gradnum]} $color1ch $color1ch $color1ch) 177 | x1=$(($i * gradbarwidth10)) 178 | y1=$(($gradheight * ( $gradnum + 1 ) + 1)) 179 | x2=$(($x1 + gradbarwidth10 - 1)) 180 | y2=$(($gradheight * ( $gradnum + 2 ) - 3)) 181 | #echo $color $x1 $y1 $x2 $y2 182 | command=$command"-fill \"$color\" -draw \"rectangle $x1,$y1 $x2,$y2\" -fill \"#ffffff\" -draw \"line $x2,$(($y2 - 10)) $x2,$y2 \" " 183 | colorname=$(printf %04x $color1ch) 184 | command=$command"-fill \"#000000000000\" -pointsize 10 -annotate +$x1+$y2 '$colorname' " 185 | done 186 | command=$command"-fill \"#000000000000\" -pointsize 36 -annotate +50+$(($y1 + 110)) '10bit ${COLORNAME[$gradnum]} gradient (you should see $gradbarnum10 vertical bars, if your display supports 10-bit color depth)' " 187 | command=$command"$filename.png" 188 | eval $command 189 | 190 | convert -depth 16 $filename.png -fill "#ffffffffffff" -pointsize 16 -gravity SouthEast -annotate +0+30 'gradient v1.2 - http://jursonovics.com - This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.' $filename.png 191 | 192 | fi 193 | 194 | 195 | # encode and package video with x265 10-bit support... 196 | if [ ! -f ${filename}_yuv420p10_x265.mp4 ]; then 197 | $ffmpeg -y -loop 1 -t 10 -framerate 5 -i $filename.png -f mp4 -c:v libx265 -x265-params lossless=1:range=full -pix_fmt yuv420p10 -preset veryslow -tag:v hvc1 -movflags faststart ${filename}_yuv420p10_x265.mp4 198 | fi 199 | 200 | if [ ! -f ${filename}_yuv444p10_x265.mp4 ]; then 201 | $ffmpeg -y -loop 1 -t 10 -framerate 5 -i $filename.png -f mp4 -c:v libx265 -x265-params lossless=1:range=full -pix_fmt yuv444p10 -preset veryslow -tag:v hvc1 -movflags faststart ${filename}_yuv444p10_x265.mp4 202 | fi 203 | 204 | if [ ! -f ${filename}_gbrp10le_x265.mp4 ]; then 205 | $ffmpeg -y -loop 1 -t 10 -framerate 5 -i $filename.png -f mp4 -c:v libx265 -x265-params lossless=1:range=full -pix_fmt gbrp10le -preset veryslow -tag:v hvc1 -movflags faststart ${filename}_gbrp10le_x265.mp4 206 | fi 207 | 208 | # encode and package video with x264 10-bit support... 209 | #if [ -f ${filename}_x264.mp4 ]; then 210 | # 211 | # echo "skip x264 encoding, ${filename}_x264.mp4 file does exist" 212 | # 213 | #else 214 | # 215 | # echo "converting png to h264 and packaging video file" 216 | # $ffmpeg -y -loop 1 -t 10 -framerate 5 -i $filename.png -f mp4 -c:v libx264 -crf 0 -pix_fmt yuv420p10 -preset veryslow -movflags faststart ${filename}_yuv420p10_x264.mp4 217 | # $ffmpeg -y -loop 1 -t 10 -framerate 5 -i $filename.png -f mp4 -c:v libx264 -crf 0 -pix_fmt yuv444p10 -preset veryslow -movflags faststart ${filename}_yuv444p10_x264.mp4 218 | #fi 219 | 220 | 221 | 222 | -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_0-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_0-25.png -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_0-25_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_0-25_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_0-25_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_0-25_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_0-25_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_0-25_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_25-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_25-50.png -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_25-50_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_25-50_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_25-50_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_25-50_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_25-50_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_25-50_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_50-75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_50-75.png -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_50-75_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_50-75_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_50-75_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_50-75_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_50-75_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_50-75_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_75-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_75-100.png -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_75-100_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_75-100_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_75-100_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_75-100_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/1920x1080/gradient_1920-1080_75-100_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/1920x1080/gradient_1920-1080_75-100_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_0-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_0-50.png -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_0-50_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_0-50_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_0-50_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_0-50_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_0-50_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_0-50_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_50-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_50-100.png -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_50-100_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_50-100_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_50-100_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_50-100_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3120x1440/gradient_3120-1440_50-100_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3120x1440/gradient_3120-1440_50-100_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-100.png -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-100_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-100_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-100_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-100_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-100_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-100_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-50.png -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-50_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-50_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-50_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-50_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_0-50_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_0-50_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_50-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_50-100.png -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_50-100_gbrp10le_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_50-100_gbrp10le_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_50-100_yuv420p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_50-100_yuv420p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/3840x2160/gradient_3840-2160_50-100_yuv444p10_x265.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jursonovicst/gradient/3a111580d699c7902d25bf49d52818c6ef4efbdc/test_sequences/3840x2160/gradient_3840-2160_50-100_yuv444p10_x265.mp4 -------------------------------------------------------------------------------- /test_sequences/runme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd 3840x2160 4 | rm -f * 5 | ../../prepareraw.sh 3840 2160 0 100 6 | ../../prepareraw.sh 3840 2160 0 50 7 | ../../prepareraw.sh 3840 2160 50 100 8 | cd .. 9 | 10 | cd 3120x1440 11 | rm -f * 12 | ../../prepareraw.sh 3120 1440 0 50 13 | ../../prepareraw.sh 3120 1440 50 100 14 | cd .. 15 | 16 | cd 1920x1080 17 | rm -f * 18 | ../../prepareraw.sh 1920 1080 0 25 19 | ../../prepareraw.sh 1920 1080 25 50 20 | ../../prepareraw.sh 1920 1080 50 75 21 | ../../prepareraw.sh 1920 1080 75 100 22 | cd .. 23 | --------------------------------------------------------------------------------