<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to UsageApplication</title><link>https://sourceforge.net/p/gpujpeg/home/UsageApplication/</link><description>Recent changes to UsageApplication</description><atom:link href="https://sourceforge.net/p/gpujpeg/home/UsageApplication/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 03 Jan 2012 09:00:38 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gpujpeg/home/UsageApplication/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage UsageApplication modified by Martin Srom</title><link>https://sourceforge.net/p/gpujpeg/home/UsageApplication/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -53,6 +53,10 @@
 * &lt;b&gt;--restart=8&lt;/b&gt; &lt;br/&gt;
         Set restart interval for encoder, number of MCUs between 
         restart markers
+* &lt;b&gt;--chroma-subsampling&lt;/b&gt; &lt;br/&gt;
+        Produce chroma subsampled JPEG stream
+* &lt;b&gt;--interleaving&lt;/b&gt; &lt;br/&gt;
+        Produce interleaved stream
 * &lt;b&gt;--encode&lt;/b&gt; &lt;br/&gt;
         Encode images
 * &lt;b&gt;--decode&lt;/b&gt; &lt;br/&gt;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Srom</dc:creator><pubDate>Tue, 03 Jan 2012 09:00:38 -0000</pubDate><guid>https://sourceforge.net2e037915e5e37039b0a4611763a54a45076da5a2</guid></item><item><title>WikiPage UsageApplication modified by Martin Srom</title><link>https://sourceforge.net/p/gpujpeg/home/UsageApplication/</link><description>Usage of console application
============================

The console application gpujpeg uses libgpujpeg library to demonstrate it's functions. To build console application check Requirements and go to gpujpeg directory (where README and LICENSE files are placed) and run 'make' command. It builds libgpugjpeg library in subdirectory ./libgpujpeg/ and it creates executable file ./gpujpeg and run script ./gpujpeg.sh, which runs executable file linked to runtime library libgpujpeg.so (which is placed in ./libgpujpeg/ subdirectory).

[[include ref=Requirements]]

Usage
-----

To encode image from raw RGB image file to JPEG image file use following command:
      
    ./gpujpeg.sh --encode --size=WIDTHxHEIGHT --quality=QUALITY \ 
              INPUT_IMAGE.rgb OUTPUT_IMAGE.jpg

&lt;br/&gt;
      
You must specify input image size by --size=WIDTHxHEIGHT parameter. Optionally you can specify desired output quality by parameter --quality=QUALITY which accepts values 0-100. Console application accepts a few more parameters and you can list them by folling command:
    
    ./gpujpeg.sh --help

&lt;br/&gt;
      
To decode image from JPEG image file to raw RGB image file use following command:
      
    ./gpujpeg.sh --decode OUTPUT_IMAGE.jpg INPUT_IMAGE.rgb

&lt;br/&gt;
      
You can also encode and decode image to test the console application:
      
    ./gpujpeg.sh --encode --decode --size=WIDTHxHEIGHT --quality=QUALITY \
            INPUT_IMAGE.rgb OUTPUT_IMAGE.jpg

&lt;br/&gt;
      
Decoder will create new decoded file OUTPUT_IMAGE.jpg.decoded.rgb and do not overwrite your INPUT_IMAGE.rgb file. Console application is able to load raw RGB image file data from *.rgb files and raw YUV and YUV422 data from *.yuv files. For YUV422 you must specify *.yuv file and use '--sampling-factor=4:2:2' parameter. 

All supported parameters for console application are following:

* &lt;b&gt;--help&lt;/b&gt; &lt;br/&gt;
        Prints console application help
* &lt;b&gt;--size=1920x1080&lt;/b&gt; &lt;br/&gt;
        Input image size in pixels, e.g. 1920x1080
* &lt;b&gt;--sampling-factor=4:4:4&lt;/b&gt; &lt;br/&gt;
        Input image sampling factor (supported are '4:4:4' and '4:2:2')
* &lt;b&gt;--colorspace=rgb&lt;/b&gt; &lt;br/&gt;
        Input image colorspace (supported are 'rgb', 'yuv' and 'ycbcr-jpeg', 
        where 'yuv' means YCbCr ITU-R BT.601), when *.yuv file is specified,
        instead of default 'rgb', automatically the colorspace 'yuv' is used
* &lt;b&gt;--quality&lt;/b&gt; &lt;br/&gt;
        Set output quality level 0-100 (default 75)
* &lt;b&gt;--restart=8&lt;/b&gt; &lt;br/&gt;
        Set restart interval for encoder, number of MCUs between 
        restart markers
* &lt;b&gt;--encode&lt;/b&gt; &lt;br/&gt;
        Encode images
* &lt;b&gt;--decode&lt;/b&gt; &lt;br/&gt;
        Decode images
* &lt;b&gt;--device=0&lt;/b&gt; &lt;br/&gt;
        By using this parameter you can specify CUDA device id which will 
        be used for encoding/decoding.
    
Restart interval is important for parallel huffman encoding and decoding. When '--restart=N' is used (default is 8), the coder can process each N MCUs independently, and so he can code each N MCUs in parallel. When '--restart=0' is specified, restart interval is disabled and the coder must use CPU version of huffman coder (because on GPU would run only one thread, which is very slow).

The console application can encode/decode multiple images by following command:
      
    ./gpujpeg.sh ARGUMENTS INPUT_IMAGE_1.rgb OUTPUT_IMAGE_1.jpg \
            INPUT_IMAGE_2.rgb OUTPUT_IMAGE_2.jpg ...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Srom</dc:creator><pubDate>Wed, 07 Dec 2011 14:16:00 -0000</pubDate><guid>https://sourceforge.netaca79718024ba3045c077b93e6c56e184263f113</guid></item></channel></rss>