JpegSource
From Avisynth wiki
(Difference between revisions)
m (new version) |
m (plugin update) |
||
Line 2: | Line 2: | ||
{{Filter2 | {{Filter2 | ||
| SEt | | SEt | ||
− | | 2014.4. | + | | 2014.4.19 |
− | | [http://dl.dropboxusercontent.com/s/ | + | | [http://dl.dropboxusercontent.com/s/rjnt0y3ead2c6ef/JpegSource_20140419.7z JpegSource_20140419.7z] |
| Source filters | | Source filters | ||
| free for non-commercial use, closed source. | | free for non-commercial use, closed source. | ||
Line 9: | Line 9: | ||
<br> | <br> | ||
== Description == | == Description == | ||
− | :An advanced JPEG decoder for AviSynth 2.6. | + | :An advanced JPEG decoder for AviSynth 2.6 which decodes JPEGs in its native colorspace. In addition, JpegSource does a reconstruction pass |
+ | :on the data during the decoding stage. This process can accurately suppress common JPEG artifacts (blocking, ringing/mosquito noise, etc). | ||
+ | :The reconstruction pass is harmless on high quality JPEGs but can produce excellent results on highly compressed JPEGs. This technique | ||
+ | :yields better results than other post-processing methods. | ||
<br> | <br> | ||
− | == | + | == Supported Formats == |
− | :JpegSource | + | :JpegSource supports just about every kind of JPEG file, but due to lack of colorspace support in AviSynth some formats need additional |
+ | :steps to load: | ||
− | ::*YUV440 JPEGs | + | ::*YUV440 JPEGs - channels have to be loaded individually. |
− | ::*CMYK/YCCK JPEGs | + | ::*CMYK/YCCK JPEGs - channels have to be loaded individually. |
− | + | ::*RGB encoded JPEGs - to load correctly see the [[JpegSource#Examples|examples]] below. | |
− | :RGB encoded | + | |
− | + | ||
<br> | <br> | ||
== Requirements: == | == Requirements: == | ||
Line 27: | Line 29: | ||
<br> | <br> | ||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
− | :{{Template:FuncDef|JpegSource (''string'' file, ''int'' "rec", ''int'' "length", ''float'' "fps_num", ''int'' "fps_den")}} | + | :{{Template:FuncDef|JpegSource (''string'' file, ''int'' "rec", ''int'' "channel", ''int'' "length", ''float'' "fps_num", ''int'' "fps_den")}} |
<br> | <br> | ||
::{{Par2|file|string| }} | ::{{Par2|file|string| }} | ||
Line 34: | Line 36: | ||
::{{Par2|rec|int|1}} | ::{{Par2|rec|int|1}} | ||
:::Number of reconstruction passes. | :::Number of reconstruction passes. | ||
+ | <br> | ||
+ | ::{{Par2|channel|int|-1}} | ||
+ | :::Load only one image channel with specified index (zero based). | ||
+ | |||
+ | ::::-1 : load all channels | ||
+ | ::::0 : load 1st channel | ||
+ | ::::1 : load 2nd channel | ||
+ | ::::2 : load 3rd channel | ||
+ | ::::3 : load 4th channel (only for CMYK/YCCK JPEGs) | ||
<br> | <br> | ||
::{{Par2|length|int|1000}} | ::{{Par2|length|int|1000}} | ||
Line 46: | Line 57: | ||
== Examples == | == Examples == | ||
JpegSource with default settings: | JpegSource with default settings: | ||
− | JpegSource("image.jpg", rec=1, length=1000, fps_num=24, fps_den=1) | + | JpegSource("image.jpg", rec=1, channel=-1, length=1000, fps_num=24, fps_den=1) |
<br> | <br> | ||
Correctly display an RGB encoded JPEG: | Correctly display an RGB encoded JPEG: | ||
Line 54: | Line 65: | ||
== Changelog == | == Changelog == | ||
Version Date Changes<br> | Version Date Changes<br> | ||
+ | 2014.4.19 04/19/2010 - Added single-channel mode, so you can load pretty much every JPEG you can encounter even when | ||
+ | Avisynth doesn't have an appropriate colorspace.<br> | ||
2014.4.18 04/18/2014 - Support JPEGs with arithmetic compression. | 2014.4.18 04/18/2014 - Support JPEGs with arithmetic compression. | ||
- No longer locks files after first frame was decoded. | - No longer locks files after first frame was decoded. | ||
Line 62: | Line 75: | ||
== External Links == | == External Links == | ||
*[http://forum.doom9.org/showthread.php?t=170028 Doom9 Forum] - JpegSource discussion. | *[http://forum.doom9.org/showthread.php?t=170028 Doom9 Forum] - JpegSource discussion. | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | ----------------------------------------------- | ||
+ | '''Back to [[External_filters#Source_Filters|External Filters]] ←''' |
Revision as of 08:13, 20 April 2014
Abstract | |
---|---|
Author | SEt |
Version | 2014.4.19 |
Download | JpegSource_20140419.7z |
Category | Source filters |
License | free for non-commercial use, closed source. |
Contents |
Description
- An advanced JPEG decoder for AviSynth 2.6 which decodes JPEGs in its native colorspace. In addition, JpegSource does a reconstruction pass
- on the data during the decoding stage. This process can accurately suppress common JPEG artifacts (blocking, ringing/mosquito noise, etc).
- The reconstruction pass is harmless on high quality JPEGs but can produce excellent results on highly compressed JPEGs. This technique
- yields better results than other post-processing methods.
Supported Formats
- JpegSource supports just about every kind of JPEG file, but due to lack of colorspace support in AviSynth some formats need additional
- steps to load:
- YUV440 JPEGs - channels have to be loaded individually.
- CMYK/YCCK JPEGs - channels have to be loaded individually.
- RGB encoded JPEGs - to load correctly see the examples below.
Requirements:
- - SSSE3 capable CPU
Syntax and Parameters
- JpegSource (string file, int "rec", int "channel", int "length", float "fps_num", int "fps_den")
- string file =
- Path to image file. Path can be omitted if the script is in the same folder as the image file.
- string file =
- int rec = 1
- Number of reconstruction passes.
- int rec = 1
- int channel = -1
- Load only one image channel with specified index (zero based).
- int channel = -1
- -1 : load all channels
- 0 : load 1st channel
- 1 : load 2nd channel
- 2 : load 3rd channel
- 3 : load 4th channel (only for CMYK/YCCK JPEGs)
- int length = 1000
- Clip length in frames.
- int length = 1000
- float fps_num = 24
- FPS numerator.
- float fps_num = 24
- int fps_den = 1
- FPS denominator.
- int fps_den = 1
Examples
JpegSource with default settings:
JpegSource("image.jpg", rec=1, channel=-1, length=1000, fps_num=24, fps_den=1)
Correctly display an RGB encoded JPEG:
JpegSource("RGBimage.jpg") MergeRGB(last, UToY8(), VToY8(), "RGB24")
Changelog
Version Date Changes
2014.4.19 04/19/2010 - Added single-channel mode, so you can load pretty much every JPEG you can encounter even when Avisynth doesn't have an appropriate colorspace.
2014.4.18 04/18/2014 - Support JPEGs with arithmetic compression. - No longer locks files after first frame was decoded. - Added MT and cache hints for AviSynth+. - Changed compiler to VS2013.
2014.1.5 01/05/2014 - Initial release
External Links
- Doom9 Forum - JpegSource discussion.
Back to External Filters ←