Skip to content

Commit

Permalink
A number of updates to the main documentation. (#80)
Browse files Browse the repository at this point in the history
* Sws flags2 (#75)

* Minor cleanup.

Signed-off-by: [email protected] <[email protected]>

* Image sequence when doing a seq.head() will include the period, this will strip it off.

Signed-off-by: [email protected] <[email protected]>

* Document why I'm truncating the basepath, but also only truncate if necessary.

Signed-off-by: [email protected] <[email protected]>

* Cleanup of class variables.

Signed-off-by: [email protected] <[email protected]>

* Better handling of path variable, making sure that path() is returning a pathlib class.

Signed-off-by: [email protected] <[email protected]>

* For some reason I was truncating the basepath, when creating the image-sequence-reference, which was wrong.

Signed-off-by: Sam Richards <[email protected]>
Signed-off-by: [email protected] <[email protected]>

* Fixing report labels.

Signed-off-by: [email protected] <[email protected]>

* For 444 the sws_flags are not needed.

Signed-off-by: [email protected] <[email protected]>

* Lanczos for downsampling.

Signed-off-by: [email protected] <[email protected]>

* Adding zoneplate documentation.

Signed-off-by: [email protected] <[email protected]>

* Changing the title on the doc testing.

Signed-off-by: [email protected] <[email protected]>

* Add the creation of the zoneplate.

Signed-off-by: [email protected] <[email protected]>

* If we are extracting from YUV files, its good to have full_chroma_int enabled.

Signed-off-by: [email protected] <[email protected]>

* If we are using one of the generated images as the reference image, we dont need to do further processing.

Signed-off-by: [email protected] <[email protected]>

* Baseline sws_flags tests for RGB to YUV tests.

Signed-off-by: [email protected] <[email protected]>

* Added checks for exit code, and added a config file that forces that test.

Signed-off-by: [email protected] <[email protected]>

* Fix the broken link.

Signed-off-by: [email protected] <[email protected]>

* Incorrectly were using area and other sws_flags when they either had no input, or gave a poor result. 
We are now defaulting to the defaults for most RGB to YCrCb cases, and only using lanczos for YCrCb conversion rather than area or spline.

Signed-off-by: [email protected] <[email protected]>

* Adding in some of the other sws_flag tests.

Signed-off-by: [email protected] <[email protected]>

---------

Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Sam Richards <[email protected]>
Co-authored-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>

* Some missing images needed for the test suite.

Signed-off-by: [email protected] <[email protected]>

* Make it clear where the animation chart came from.

Signed-off-by: [email protected] <[email protected]>

* Make paths relative.

Signed-off-by: [email protected] <[email protected]>

* Reworking script, since we now have the yml files in the folder already, we cant use the check that the directory exists.
Separately, the colorspace needed some love for OCIO2.2

Signed-off-by: [email protected] <[email protected]>

* Make sure the shell scripts end up with unix line endings.

Signed-off-by: [email protected] <[email protected]>

* More tests for sws tests.

Signed-off-by: [email protected] <[email protected]>

* Templates used for scaling image tests.

Signed-off-by: [email protected] <[email protected]>

* Adding missing zoneimage test charts, these are generated by ffmpeg, but its handy to have them pre-built.

Signed-off-by: [email protected] <[email protected]>

* VMAF Environment variables (#77)

* On the different platforms, its easier to just assume the VMAF model directory exists somewhere
rather than the whole lib directory. So we have changed the environment variable to be VMAF_MODEL_DIR

Signed-off-by: richardssam <[email protected]>

Signed-off-by: [email protected] <[email protected]>

* Comparing different av1 codecs.

Signed-off-by: [email protected] <[email protected]>

* Adding a scale test.

Signed-off-by: [email protected] <[email protected]>

* Merge to main

Signed-off-by: [email protected] <[email protected]>

* Adding in -vf scale filters to fix color issues with HDR conversion.

Signed-off-by: [email protected] <[email protected]>

* A little cleanup of the AOM section.

Signed-off-by: [email protected] <[email protected]>

---------

Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Sam Richards <[email protected]>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: richardssam <[email protected]>
  • Loading branch information
3 people authored Feb 5, 2024
1 parent e46adb5 commit a63f008
Show file tree
Hide file tree
Showing 25 changed files with 676 additions and 79 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.py text=lf
*.sh text eol=lf
21 changes: 15 additions & 6 deletions EncodeAv1.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,25 @@ This is the reference encoder
Supported pixel formats:
yuv420p yuv422p yuv444p gbrp yuv420p10le yuv422p10le yuv444p10le yuv420p12le yuv422p12le yuv444p12le gbrp10le gbrp12le gray gray10le gray12le

it is however, unusably slow, and not really good for production work.

{: .warning }
All our initial testing is showing libaom being more than 10x slower at encoding than svt-av1. It needs further exploration to determine if there are ways of getting better encoding times. Unfortunately for many pixel formats, libaom is the only option for av1 encoding (e.g. 422, or 444 encoding).

### CRF Comparison for libaom-av1
Example encoding:

To help pick appropriate values with the CRF flag, we have run the [Test Framework](enctests/README.html) through some of the [reference media](enctests/sources/enc_sources/README.html).
```
ffmpeg -r 24 -start_number 1 -i inputfile.%04d.png -frames:v 200 -c:v libaom-av1 \
-pix_fmt yuv420p10le -cpu-used 2 -crf 20 -row-mt 1 -sws_flags lanczos \
-vf "scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709" \
-color_range tv -colorspace bt709 -color_primaries bt709 -color_trc iec61966-2-1\
-y outputfile.mp4
```


| --- | --- |
| -cpu-used 2 | This sets how efficient the compression will be. The default is 0, changing this will increase encoding speed at the expense of having some impact on quality and rate control accuracy. |
| -row-mt 1 | This enables row based multi-threading (see [here](https://trac.ffmpeg.org/wiki/Encode/VP9#rowmt)) which is not enabled by default. |

| ![](enctests/reference-results/aom-crf-test-encode_time.png) This is showing CRF values against encoding time. |
| ![](enctests/reference-results/aom-crf-test-filesize.png) This is showing CRF values against file size. |
| ![](enctests/reference-results/aom-crf-test-vmaf_harmonic_mean.png) This is showing CRF values against VMAF harmonic mean |


## librav1e
Expand Down
134 changes: 83 additions & 51 deletions enctests/HDR_Encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,59 @@ Is the HDR format which is the HDR10 without the metadata. It uses the [PQ EOTF]

We take advantage of ACES to do the initial conversion to an intermediate format, which we are using png as the container.

Converting to PQ-1000 Nits.

```console
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --resize 1920x1014 \
--colorconvert acescg out_rec2020st20842000nits -d uint16 -o sparks2_pq2000/sparks2_pq2000.#.png
# Assuming we are using OCIO 2.1 or higher
export OCIO=ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --iscolorspace "ACEScg" --resize 1920x1014 \
--ociodisplay "Rec.2100-PQ - Display" "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" \
-d uint16 -o sparks2_pq2000/sparks2_pq2000.#.png
```

| --- | --- |
|--colorconvert acescg out_rec2020st20842000nits | This is the core colorspace conversion, out_rec2020st20842000nits is an output colorspace conversion for rec2020 PQ at 2000 nit display |
|--iscolorspace "ACEScg" | Set the input colorspace to ACEScg (or whatever your source imagery is using) |
|--ociodisplay "Rec.2100-PQ - Display" "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" | This is the core colorspace conversion, This is using a 2100-PQ display, at 100 nits and rec2020 |
| -d uint16 | Output as 16-bit file format |

The other option built in for PQ is a config with 2000 nits -
``--ociodisplay "Rec.2100-PQ - Display" "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)" `|`
| HLG | |


### PQ 444 FFMPEG encoding

<!---
name: test_pq2000
sources:
- sourceimages/smptehdbars_10.dpx.yml
comparisontest:
- testtype: idiff
extracttemplate: "ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v 1 {newpngfile}"
- testtype: assertresults
tests:
- assert: less
value: max_error
less: 0.00195
-->
```console
ffmpeg -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-color_range pc -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt rgb48be -r 30 -start_number 6700 -i sparks2_pq2000/sparks2_pq2000.%05d.png \
ffmpeg \
-r 30 -start_number 6700 -i sparks2_pq2000/sparks2_pq2000.%05d.png \
-c:v libx265 \
-vf "scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020" \
-tag:v hvc1 \
-color_range tv -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt yuv444p10le -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-pix_fmt yuv444p10le
-x265-params 'colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=2000,400' \
sparks2_pq2000_444.mov
```

NOTE, this is a little different to other conversions (is this better?). We are defining up front what the source media is defined (e.g. `-color_range pc -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc` ).

#### Source media definition.

| --- | --- |
| -color_range pc | Set the source range to be full-range |
| -color_trc smpte2084 | smpte2084 is the PQ reference EOTF |
| -color_primaries bt2020 | Use the bt2020 color primaries |
| -colorspace bt2020nc | Tagging the YcBCr as being encoded using the BT-2020 non-constant luminance. |
| -pix_fmt rgb48be | We are assuming 16-bit RGB imagery as input |


#### Overall encode params

| --- | --- |
| -c:v libx265 | Use the h265 encoder |
| -tag:v hvc1 | Tag the file for playback on mac |
| -vf "scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020" | Make sure we treat the input and output color primaries to be bt2020. Without this, ffmpeg can assume the source is different, and apply a primary that shouldnt be there. |

#### Encode media definition

Expand Down Expand Up @@ -109,42 +120,43 @@ It is also designed to adapt to the surrounding room light levels, unlike PQ whi
We take advantage of ACES to do the initial conversion to an intermediate format, which we are using png as the container.

```console
# Assuming we are using OCIO 2.1 or higher
export OCIO=ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --resize 1920x1014 \
--colorconvert acescg out_rec2020hlg1000nits -d uint16 -o sparks2_hlg/sparks2_hlg.#.png
---ociodisplay "Rec.2100-HLG - Display" "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" -d uint16 -o sparks2_hlg/sparks2_hlg.#.png
```

| --- | --- |
|--colorconvert acescg out_rec2020hlg1000nits | This is the core colorspace conversion, out_rec2020hlg1000nits is an output colorspace conversion for rec2020 HLG at 1000 nit display |
|--ociodisplay "Rec.2100-HLG - Display" "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" | This is the core colorspace conversion, out_rec2020hlg1000nits is an output colorspace conversion for rec2020 HLG at 1000 nit display |
| -d uint16 | Output as 16-bit file format |



### HLG 444 FFMPEG encoding

<!---
name: test_hlg
sources:
- sourceimages/smptehdbars_10.dpx.yml
comparisontest:
- testtype: idiff
extracttemplate: "ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v 1 {newpngfile}"
- testtype: assertresults
tests:
- assert: less
value: max_error
less: 0.00195
-->
```console
ffmpeg -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-color_range pc -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt rgb48be -r 30 -start_number 6700 -i sparks2_hlg/sparks2_hlg.%05d.png \
-c:v libx265 \
-tag:v hvc1 \
ffmpeg -r 30 -start_number 6700 -i sparks2_hlg/sparks2_hlg.%05d.png \
-c:v libx265 -tag:v hvc1 \
-vf "scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020" \
-color_range tv -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt yuv444p10le -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-pix_fmt yuv444p10le \
-x265-params 'colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=1000,400' \
sparks2_hlg_444.mov
```

NOTE, this is a little different to other conversions (is this better?). We are defining up front what the source media is defined (e.g. `-color_range pc -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc` ).

#### Source media definition.

| --- | --- |
| -color_range pc | Set the source range to be full-range |
| -color_trc arib-std-b67 | ARIB STD-B67 is the HLG reference EOTF |
| -color_primaries bt2020 | Use the bt2020 color primaries |
| -colorspace bt2020nc | Tagging the YcBCr as being encoded using the BT-2020 non-constant luminance. |
| -pix_fmt rgb48be | We are assuming 16-bit RGB imagery as input |


#### Overall encode params

| --- | --- |
Expand Down Expand Up @@ -177,15 +189,25 @@ TODO - We do need to understand if the max-cll and master-display parameters are

### HLG 420 FFMPEG encoding

<!---
name: test_hlg420
sources:
- sourceimages/smptehdbars_10.dpx.yml
comparisontest:
- testtype: idiff
extracttemplate: "ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v 1 {newpngfile}"
- testtype: assertresults
tests:
- assert: less
value: max_error
less: 0.00195
-->
```console
ffmpeg -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-color_range pc -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt rgb48be -r 30 -start_number 6700 -i sparks2_hlg/sparks2_hlg.%05d.png \
-c:v libx265 \
-tag:v hvc1 \
ffmpeg -r 30 -start_number 6700 -i sparks2_hlg/sparks2_hlg.%05d.png \
-c:v libx265 -tag:v hvc1 \
-vf "scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020" \
-color_range tv -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt yuv420p10le \
-sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-x265-params 'colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=1000,400' \
sparks2_hlg_420.mov

Expand All @@ -194,14 +216,24 @@ ffmpeg -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \

### HLG 422 FFMPEG Encoding

<!---
name: test_hlg422
sources:
- sourceimages/smptehdbars_10.dpx.yml
comparisontest:
- testtype: idiff
extracttemplate: "ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v 1 {newpngfile}"
- testtype: assertresults
tests:
- assert: less
value: max_error
less: 0.00195
-->
```console
ffmpeg -sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-color_range pc -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt rgb48be -r 30 -start_number 6700 -i sparks2_hlg/sparks2_hlg.%05d.png \
ffmpeg -r 30 -start_number 6700 -i sparks2_hlg/sparks2_hlg.%05d.png \
-c:v libx265 -color_range tv -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc \
-pix_fmt yuv420p10le \
-tag:v hvc1 \
-sws_flags print_info+accurate_rnd+bitexact+full_chroma_int \
-pix_fmt yuv420p10le -tag:v hvc1 \
-vf "scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020" \
-x265-params 'colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=1000,400' \
sparks2_hlg_420_v2.mov
```
Expand Down
24 changes: 12 additions & 12 deletions enctests/sources/enc_sources/download_media.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@

# https://opencontent.netflix.com/
# This first bit of media is really just for sparks, which hopefully should stress encoders.
if [ ! -d chimera_wind_srgb ]
if [[ ! -d chimera_wind && ! -f chimera_wind_srgb/chimera_wind_srgb.66600.png ]]
then
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k5994p/ chimera_wind --recursive --exclude '*' --include '*_0666*.tif'
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k5994p/ chimera_wind --recursive --exclude "*" --include "*_0667*.tif"
fi

if [[ ! -d chimera_coaster_srgb && ! -d chimera_coaster ]]
if [[ ! -f chimera_coaster_srgb/chimera_coaster_srgb.44200.png && ! -d chimera_coaster ]]
then
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k5994p/ chimera_coaster --recursive --exclude "*" --include "*_0442*.tif"
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k5994p/ chimera_coaster --recursive --exclude "*" --include "*_0443*.tif"
fi


if [[ ! -d chimera_cars_srgb && ! -d chimera_cars ]]
if [[ ! -f chimera_cars_srgb/chimera_cars_srgb.02500.png && ! -d chimera_cars ]]
then
echo Downloading netflix cars.
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k2398p/ chimera_cars --recursive --exclude "*" --include "*_025*.tif"
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k2398p/ chimera_cars --recursive --exclude "*" --include "*_026*.tif"
fi

if [[ ! -d chimera_fountains_srgb && ! -d chimera_fountains ]]
if [[ ! -f chimera_fountains_srgb/chimera_fountains_srgb.05400.png && ! -d chimera_fountains ]]
then
echo Downloading netflix fountains
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/Chimera/tif_DCI4k2398p/ chimera_fountains --recursive --exclude "*" --include "*_054*.tif"
Expand All @@ -43,36 +43,36 @@ fi
# I think the file labeling is actually incorrect, this media is actually pretty close to gamma2.2 or 2.4 its not HDR at all.
# The associated mov file has no HDR metadata associated with it. So I'm going to assume no color space conversion is necessary.

if [ ! -d chimera_wind_srgb ]
if [ ! -f chimera_wind_srgb/chimera_wind_srgb.66600.png ]
then
mkdir chimera_wind_srgb
echo Building chimera_wind png
oiiotool -v --framepadding 6 --frames 66600-667199 -i chimera_wind/Chimera_DCI4k5994p_HDR_P3PQ_@@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_wind_srgb/chimera_wind_srgb.#.png
rm -rf chimera_wind
# rm -rf chimera_wind
fi

if [ ! -d chimera_coaster_srgb ]
if [ ! -f chimera_coaster_srgb/chimera_coaster_srgb.44200.png ]
then
mkdir chimera_coaster_srgb
echo Building chimera_coaster_srgb png
oiiotool -v --framepadding 6 --frames 44200-44399 -i chimera_coaster/Chimera_DCI4k5994p_HDR_P3PQ_@@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_coaster_srgb/chimera_coaster_srgb.#.png
echo oiiotool -v --framepadding 6 --frames 44200-44399 -i chimera_coaster/Chimera_DCI4k5994p_HDR_P3PQ_@@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_coaster_srgb/chimera_coaster_srgb.#.png
#rm -rf chimera_coaster
fi


if [ ! -d chimera_cars_srgb ]
if [ ! -f chimera_cars_srgb/chimera_cars_srgb.02500.png ]
then
mkdir chimera_cars_srgb
echo Building chimera_cars png
oiiotool -v --framepadding 5 --frames 2500-2699 -i chimera_cars/Chimera_DCI4k2398p_HDR_P3PQ_@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_cars_srgb/chimera_cars_srgb.#.png
echo oiiotool -v --framepadding 5 --frames 2500-2699 -i chimera_cars/Chimera_DCI4k2398p_HDR_P3PQ_@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_cars_srgb/chimera_cars_srgb.#.png
#rm -rf chimera_cars
fi


if [ ! -d chimera_fountains_srgb ]
if [ ! -f chimera_fountains_srgb/chimera_fountains_srgb.05400.png ]
then
mkdir chimera_fountains_srgb
echo Building chimera_fountains png
oiiotool -v --framepadding 5 --frames 5400-5599 -i chimera_fountains/Chimera_DCI4k2398p_HDR_P3PQ_@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_fountains_srgb/chimera_fountains_srgb.#.png
echo oiiotool -v --framepadding 5 --frames 5400-5599 -i chimera_fountains/Chimera_DCI4k2398p_HDR_P3PQ_@@@@@.tif --resize 1920x1080 --powc 2 -d uint16 -o chimera_fountains_srgb/chimera_fountains_srgb.#.png
#rm -rf chimera_fountains
fi
16 changes: 8 additions & 8 deletions enctests/sources/hdr_sources/download_media.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then
aws s3 cp --no-sign-request s3://download.opencontent.netflix.com/sparks/aces_image_sequence_59_94_fps/ sparks2 --recursive --exclude "*" --include "SPARKS_ACES_068*.exr"
fi

if [ ! -d sparks_srgb ]
if [ ! -f sparks_srgb/sparks_srgb.06100.png ]
then
mkdir sparks_srgb
echo Building sparks png
Expand All @@ -32,7 +32,7 @@ then

fi

if [ ! -d sparks2_srgb ]
if [ ! -f sparks2_srgb/sparks2_srgb.06700.png ]
then
mkdir sparks2_srgb
echo Building sparks2_srgb
Expand All @@ -41,25 +41,25 @@ then

fi

if [ ! -d sparks2_hlg ]
if [ ! -f sparks2_hlg/sparks2_hlg.06700.png ]
then
mkdir sparks2_hlg
echo Building sparks2_hlg
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --fit 1920x1080 --colorconvert acescg out_rec2020hlg1000nits -d uint16 -o sparks2_hlg/sparks2_hlg.#.png
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --iscolorspace "ACEScg" --fit 1920x1080 --ociodisplay "Rec.2100-HLG - Display" "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" -d uint16 -o sparks2_hlg/sparks2_hlg.#.png
fi

if [ ! -d sparks2_pq1000 ]
if [ ! -f sparks2_pq1000/sparks2_pq1000.06700.png ]
then
mkdir sparks2_pq1000
echo Building sparks2_pq1000
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --fit 1920x1080 --colorconvert acescg out_rec2020st20841000nits -d uint16 -o sparks2_pq1000/sparks2_pq1000.#.png
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --iscolorspace "ACEScg" --fit 1920x1080 --ociodisplay "Rec.2100-PQ - Display" "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" -d uint16 -o sparks2_pq1000/sparks2_pq1000.#.png
fi

if [ ! -d sparks2_pq2000 ]
if [ ! -f sparks2_pq2000/sparks2_pq2000.06700.png ]
then
mkdir sparks2_pq2000
echo Building sparks2_pq2000
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --fit 1920x1080 --colorconvert acescg out_rec2020st20842000nits -d uint16 -o sparks2_pq2000/sparks2_pq2000.#.png
oiiotool -v --framepadding 5 --frames 6700-6899 sparks2/SPARKS_ACES_#.exr --iscolorspace "ACEScg" --fit 1920x1080 --ociodisplay "Rec.2100-PQ - Display" "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)" -d uint16 -o sparks2_pq2000/sparks2_pq2000.#.png
fi

# Encoding test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
images: true
path: /Users/sam/git/EncodingGuidelines/enctests/sources/hdr_sources/sparks2_hlg/sparks2_hlg.%05d.png
path: sparks2_hlg.%05d.png
width: 1920
height: 1080
pix_fmt: rgb48be
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
images: true
path: /Users/sam/git/EncodingGuidelines/enctests/sources/hdr_sources/sparks2_srgb/sparks2_srgb.%05d.png
path: sparks2_srgb.%05d.png
width: 1920
height: 1080
pix_fmt: rgb48be
Expand Down
Loading

0 comments on commit a63f008

Please sign in to comment.