# Super-8 enhancement, progress report

**URL:** <https://forums.kinograph.cc/t/super-8-enhancement-progress-report/2248>\
**Category:** Research\
**Created:** [November 27, 2021, 6:16pm UTC](https://forums.kinograph.cc/t/super-8-enhancement-progress-report/2248 "2021-11-27T18:16:21Z")\
**Posts on this page:** 1\
**Showing post:** 39

<div class="post-metadata">

**Author:** ![cpixip](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/cpixip/32/852_2.png) [@cpixip](https://forums.kinograph.cc/u/cpixip)\
**Post date:** [January 6, 2022, 12:54pm UTC](https://forums.kinograph.cc/t/super-8-enhancement-progress-report/2248/39 "2022-01-06T12:54:44Z")

</div>

ok, here’s an update with respect to 16bit/channel processing.

The following script actually does the job, sort of

```auto
threads = 12
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)

frameStart = 0
frameStop = 3450
frameName = "HDR\HDR_%08d.png"
#####################################################################################

# 8 Bit input, reading RGB24-frames and converting them to YUV
#source = ImageSource(frameName,start=frameStart,end=frameStop,fps=18,pixel_type = "RGB24")
#source = source.ConvertToYV12(matrix="Rec709")

# 16 bit processing, reading RGB48 frames and converting them to various YUV-formats
source = ImageSource(frameName,start=frameStart,end=frameStop,fps=18,pixel_type = "RGB48")
source = source.ConvertToYUV420(matrix="Rec709")
#source = source.ConvertToYUV422(matrix="Rec709")
#source = source.ConvertToYUV444(matrix="Rec709")

denoise = input.TemporalDegrain(sad1=800,sad2=600,degrain=3,blksize=16)

amp = 4.0
size = 1.6

blurred = denoise.FastBlur(size )
TemporalDegrain_C = denoise.mt_lutxy( blurred, " i16 x "+String(amp)+" scalef 1 + * i16 y "+String(amp)+" scalef * -", use_expr=2)

TemporalDegrain_C

Prefetch(threads)

```

I needed to explicitly ask the `ImageSource` to read `RGB48` and had to introduce the `i16` qualifier in the `mt_lutxy`-call to get a similar output to the above 8 bit/channel script. Also, the needed conversion from 48 bit RGB to YUV requires yet another call (`ConvertToYUV...()`).

However, the output of the `TemporalDegrain`-Filter is **not** the same as in the 8-bit case.

[Update:]

That is actually expected, as the SAD and other values will need to be adjusted. Also,  
as the processing path also uses `mt_lutxy`-magic, I suspect that some of the parameters need to be adapted accordingly. You might want to experiment… 🙃

I ran this script on 16 bit/channel source files (.png) with VirtualDub2. In order to get 16 bit/channel output frames, I needed to store the results as .tiff-files.Also possible with VirtualDub2 was rendering out the footage with the “x264 10-bit” codec.

Reading the image files as `RGB24` allows only internal 8-bit processing. With a source resolution of 1600 x 1200 px, I get 7.0 GB memory usage, 64% CPU, and 5.2 fps processing speed. Reading the image files as `RGB48` gets you 16 bit internal processing. Depending on the `YUV`- colorspace used, memory usage and fps will vary. With `ConvertToYUV420` (my best bet), you need about 8.5 GB memory, use 53% CPU and get 3.5 fps. `ConvertToYUV422` (probably already an overkill in terms of color resolution) results in 9.7 GB memory, 61% CPU and 2.7 fps processing speed. Finally, `ConvertToYUV444` gives on my system 13.2 GB memory, 44% CPU and 1.9 fps.

[End of Update]

The 8-bit/channel image looks fine, the 16bit/channel image not so - seems to me that some scaling in the `TemporalDegrain`-filter is not right. Left is the 8 bit/channel result, right the 16 bit/channel result:

 ![Screenshot 2022-01-06 131600](https://forums.kinograph.cc/uploads/default/original/2X/d/dc2b09bec7f6a49b865df9c877a44bb29a3701a6.jpeg)

Looking at the histograms, here for the 8 bit/channel image

 ![Screenshot 2022-01-06 131239](https://forums.kinograph.cc/uploads/default/original/2X/c/c83defcc8a74bdbd5bf936a28c25f24e1ed7b465.png)  
and here for the 16 bit/channel image:  
 ![Screenshot 2022-01-06 131315](https://forums.kinograph.cc/uploads/default/original/2X/2/22f8c75dce140ef44b870ff15f7342f5ee0d9693.png)  
one can see that the 16 bit/channel result looks cleaner in the histograms, as expected.

So, I consider this a “mixed result”. While it is possible to run an avisynth-script with 16 bit/channel, it seems that a lot of detailed rework for the filters employed is necessary to actually succeed.

---

_[View the full topic](https://forums.kinograph.cc/t/super-8-enhancement-progress-report/2248)._
