:: 
:: Please contact Shijun Sun (ssun@sharplabs.com, 360-817-7531)
:: if there is any question or comment.
::                                             May, 2004


:: 
:: set up the input data files
::

copy harbour_10.rgb input_10.rgb
rgb2yogr_10 harbour_10.rgb input_10.yogr 1280 720 3
:: ITU-R BT.709, video_full_range_falg on
RGB2YCbCr harbour_10.rgb input420_8.yuv 1280 720

::
:: encode YUV420/8 and RGB444/10
::

:: YUV420/8 in main profile using TML8.1a encoder
copy encoder_main.cfg encoder.cfg
lencod_main
:: ITU-R BT.709, video_full_range_falg on, chroma replication
YCbCr2RGB main_rec8.yuv main_rec8.rgb 1280 720
:: RGB444/10 using modified FRExt encoder
copy encoder_8_10.cfg encoder.cfg
lencod_8_10
:: calculate PSNR in YCoCg-R
rgb2yogr_10 frext_8_10_rec.rgb frext_8_10_rec.yogr 1280 720 3
findsnr input_10.yogr frext_8_10_rec.yogr 0 1280 720

::
:: encode RGB444/10 directly
::

:: RGB444/10 using FRExt encoder
copy encoder_10.cfg encoder.cfg
lencod10
:: calculate PSNR in YCoCg-R
rgb2yogr_10 frext_10_rec.rgb frext_10_rec.yogr 1280 720 3
findsnr input_10.yogr frext_10_rec.yogr 0 1280 720

::
:: decode YUV420/8 and RGB444/10
::

:: YUV420/8 in main profile using TML8.1a decoder
ldecod_main decoder_main.cfg
:: ITU-R BT.709, video_full_range_falg on, chroma replication
YCbCr2RGB main_dec8.yuv main_dec8.rgb 1280 720
:: RGB444/10 using modified FRExt decoder
ldecod_8_10 decoder_8_10.cfg
:: calculate PSNR in YCoCg-R
rgb2yogr_10 frext_8_10_dec.rgb frext_8_10_dec.yogr 1280 720 3
findsnr input_10.yogr frext_8_10_dec.yogr 0 1280 720

::
:: decode RGB444/10 directly
::

:: RGB444/10 using FRExt decoder
ldecod10 decoder_10.cfg
:: calculate PSNR in YCoCg-R
rgb2yogr_10 frext_10_dec.rgb frext_10_dec.yogr 1280 720 3
findsnr input_10.yogr frext_10_dec.yogr 0 1280 720

:: end
pause