Update of /cvsroot/dirac/compress/doc/latex_spec
In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv8411
Modified Files:
bs-spec.tex dataenc.tex idwt.tex layout-fullsize.tex
lifting.tex mc.tex picture-dec.tex
ref-default-videoparams.tex
spec-conventions.tex spec-structure.tex state-macros.tex
terms.tex vidsys.tex wlt-unpacking.tex
Log Message:
Further compliance modifications with VC-2. Reorganisation
to simplify
motion compensation sections (ongoing).
Index: ref-default-videoparams.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/ref-default-videopara
ms.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** ref-default-videoparams.tex 5 Nov 2007 16:33:30
-0000 1.13
--- ref-default-videoparams.tex 8 Nov 2007 16:46:19
-0000 1.14
***************
*** 1,128 ****
label
! [TBC!!]
! begin
! begin[!ht]
! begin{|l|c|c|c|c|c|c|c|}
! hline
! & multicolumn{|c|}{{bf Video Formats}} \
! hline
! &0 -- Custom &1 -- QSIF & 2 -- QCIF & 3
-- SIF & 4 -- CIF & 5 -- 4SIF & 6 -- 4CIF \
! hline
!
SLumaWidth&640&176&176&352&352&704&
amp;704\
!
SLumaHeight&480&120&144&240&288&480
&576\
! hline
!
%VChromaFormat&4:2:0&4:2:0&4:2:0&4:2:0&
4:2:0&4:2:0&4:2:0\
! hline
! SLumaDepth&8&8&8&8&8&8&8\
! SChromaDepth&8&8&8&8&8&8&8\
! hline
! end
! caption{Default sequence parameters for video formats
0--6}
! end
! begin[!ht]
! begin{|l|c|c|c|c|c|c|}
! hline
! & multicolumn{|c|}{{bf Video Formats}} \
! hline
! &7 -- SD480 & 8 -- SD576 & 9 -- HD720
&10 -- HD1080 & 11 -- 2KCinema & 12 --
4KCinema\
! hline
! SLumaWidth & 720 & 720 & 1280 & 1920
& 2048 & 4096\
! SLumaHeight & 480 & 576 & 720 & 1080
& 1556 & 3112\
! hline
! %VChromaFormat & 4:2:0 & 4:2:0 & 4:2:0 &
4:2:0 &4:4:4 & 4:4:4\
hline
! SLumaDepth & 8 & 8 & 8 & 8 & 16 &
16\
! SChromaDepth & 8 & 8 & 8 & 8 & 16
& 16\
hline
!
! end
! caption{Default sequence parameters for video formats
7--12}
! end
!
! begin[!ht]
! begin{|l|c|c|c|c|c|c|c|}
hline
! & multicolumn{|c|}{{bf Video Formats}} \
hline
! &0 -- Custom &1 -- QSIF & 2 -- QCIF & 3
-- SIF & 4 -- CIF & 5 -- 4SIF & 6 -- 4CIF \
hline
! SInterlaced & false & false & false &
false & false & false & false\
! STopFieldFirst & true & true & true &
true & true & true & true \
!
hline
!
SFrameRateNumerator&30&15000&25&15000&2
5&15000&25\
!
SFrameRateDenominator&1&1001&2&1001&2&a
mp;1001&2\
hline
!
SAspectRatioNumerator&1&10&12&10&12&
;10&12\
!
SAspectRatioDenominator&1&11&11&11&11&a
mp;11&11\
hline
!
SCleanWidth&640&176&176&352&352&704
&704\
!
SCleanHeight&480&120&144&240&288&48
0&576\
hline
! SLeftOffset&0&0&0&0&0&0&0\
! STopOffset&0&0&0&0&0&0&0\
hline
!
SLumaOffset&128&128&128&128&128&128
&128\
!
SLumaExcursion&255&255&255&255&255&
255&255\
!
SChromaOffset&0&0&0&0&0&0&0\
!
SChromaExcursion&254&254&254&254&254&am
p;254&254\
hline
!
SColourSpecIndex&0&1&2&1&2&1&2
hline
! SColourPrimariesIndex&ITU709&SMPTE
C&EBU3213&SMPTE C&EBU3213&SMPTE
C&EBU3213\
hline
! $K_$ & 0.2126
&0.299&0.299&0.299&0.299&0.299&0.299
\
! $K_$ & 0.0722
&0.144&0.144&0.144&0.144&0.144&0.144
\
hline
!
STransferFunction&TV&TV&TV&TV&TV&TV
&TV\
hline
-
end
! caption{Default source parameters for video formats
0--6}
! end
! begin[!ht]
! begin{|l|c|c|c|c|c|c|}
hline
! & multicolumn{|c|}{{bf Video Formats}} \
hline
! &7 -- SD480 & 8 -- SD576 & 9 -- HD720
&10 -- HD1080 & 11 -- 2KCinema & 12 --
4KCinema\
hline
! SInterlaced & false & false & false &
false & false & false \
! STopFieldFirst & true & true & true &
true & true & true\
!
hline
! SFrameRateNumerator & 24000 & 25 & 24 &24
&24 &24 \
! SFrameRateDenominator& 1001 & 1 & 1 & 1
& 1 & 1 \
hline
! SAspectRatioNumerator & 10 & 12 & 1 & 1
& 1 & 1 \
! SAspectRatioDenominator& 11 & 11 & 1 & 1
& 1 & 1 \
hline
! SCleanWidth & 720 & 720 & 1280 & 1920
& 2048 & 4096\
! SCleanHeight & 480 & 576 & 720 & 1080
& 1536 & 3072\
hline
! SLeftOffset & 0 & 0 & 0 & 0 & 0 &
0 \
! STopOffset & 0 & 0 & 0 & 0 & 0 &
0 \
hline
! SLumaOffset & 128 & 128 & 128 & 128 &
32768 & 32768\
! SLumaExcursion & 235 & 235 & 235 & 235
& 65535 & 65535\
! SChromaOffset & 0 & 0 & 0 & 0 & 0
& 0\
! SChromaExcursion & 224 & 224 & 224 & 224
& 65534 & 65534\
hline
! SColourSpecIndex & 1 & 2 & 0 & 0 & 3
& 3\
hline
! SColourPrimariesIndex & SMPTE C & EBU3213 &
ITU709 & ITU709 & Not defined & Not defined\
hline
! $K_$ & 0.299 & 0.299 & 0.2126 & 0.2126
& 0.25 & 0.25\
! $K_$ & 0.144 & 0.144 & 0.0722 & 0.0722
& 0.25 & 0.25\
hline
!
STransferFunction&TV&TV&TV&TV&Linear&am
p;Linear \
hline
end
! caption{Default source parameters for video formats
7--12}
! end
- end
No newline at end of file
--- 1,131 ----
label
+ This annex defines the default values of video parameters
that are determined by the
+ value of the base video format. These defaults reduce
overhead by allowing a large
+ number of parameters to be set without explicit
signaling.
! The collection of default values for each value of the
base video format constitutes
! a map, which shall be returned by the
$set_source_defaults(base_video_format)$
! function and used as a basis for defining the source
video
! format in the sequence header as per Section
ref.
! All source parameters for any of the predefined video
formats may be overridden as required in the sequence
header.
!
! begin[!ht]
! begin{|r|c|c|c|c|c|c|c|c|c|}
hline
! multicolumn{|c|}{cellcolor[gray]{0.75}bf Video
Formats}\
hline
! {bf
! begin
! Base video format\
! index value
! end}
! & 0 & 1 & 2 & 3 & 4 & 5 & 6
& 7 & 8 \
hline
! {bf Name (informative)}
! &Custom & QSIF525 & QCIF & SIF525 &
4CIF & 4SIF525 & 4CIF &
! beginSD480\-60Iend &
beginSD576\-50Iend\
hline
! {bf Frame
Width:}&640&176&176&352&352&704&
704&720&720\
! {bf Frame
Height:}&480&120&144&240&288&480&
;576&480&576\
hline
! {bf Sampling
Format:}&4:2:0&4:2:0&4:2:0&4:2:0&4:2:0&a
mp;4:2:0&4:2:0&4:2:2&4:2:2\
hline
! {bf Interlaced:} & false & false & false
& false & false & false & false &
true & true \
! {bf Top Field First:} & false & false &
true & false & true & false & true
& false & true \
hline
! {bf Frame Rate Index} &1 &9 &10 &9
&10 &9 &10 &4 &3\
! {bf Numerator} & 24000 & 15000 & 25 &
15000 & 25 & 15000 & 25 & 30000 & 25\
! {bf Denominator} & 1001 & 1001 & 2 &
1001 & 2 & 1001 & 2 & 1001 &
1\
hline
! {bf Aspect Ratio Index} &1 &2 &3 &2
&3 &2 &3 &2 &3\
! {bf Numerator} & 1 & 10 & 12 & 10 &
12 & 10 & 12 & 10 & 12\
! {bf Denominator}& 1 & 11 &11 & 11 &
11 & 11 & 11 & 11 & 11\
hline
! {bf Clean
Width:}&640&176&176&352&352&704&
704&704&704\
! {bf Clean
Height:}&480&120&144&240&288&480&
;576&480&576\
! {bf Clean Left Offset} & 0 & 0 &0 &0
&0 &0 &0 &8 &8\
! {bf Clean Top Offset} & 0 &0 &0 &0 &0
&0 &0 &0 &0\
hline
! {bf Signal Range Index} &1 &1 &1 &1
&1 &1 &1 &3 & 3\
! {bf Luma Offset} &0 &0 &0 &0 &0
&0 &0 &64 &64\
! {bf Luma Excursion} &255 &255 &255 &255
&255 &255 &255 &876 & 876\
! {bf Chroma Offset} &128 &128 &128 &128
&128 &128 &128 &512 & 512\
! {bf Chroma Excursion} &255 &255 &255 &255
&255 &255 &255 & 896 & 896\
hline
! {bf Colour Specification Index} &0 & 1 &
2& 1& 2&1 & 2& 1& 2\
! &Custom&SDTV 525&SDTV 625&SDTV
525&SDTV 625&SDTV 525&SDTV 625&SDTV
525&SDTV 625\
hline
! {bf Colour Primaries Index}
&0& 1&2&1&2&1&2&1&2\
! &HDTV&SDTV 525&SDTV 625&SDTV 525&SDTV
625&SDTV 525&SDTV 625&SDTV 525&SDTV 625\
hline
! {bf Colour Matrix Index}
&0&1&1&1&1&1&1&1&1\
!
&HDTV&SDTV&SDTV&SDTV&SDTV&SDTV&S
DTV&SDTV&SDTV\
hline
! {bf Transfer Function Index}
&0&0&0&0&0&0&0&0&0\
! &TV gamma&TV gamma&TV gamma&TV
gamma&TV gamma&TV gamma&TV gamma&TV
gamma&TV gamma\
hline
end
! caption{Predefined video format parameters for video
formats 0--8}
! end
! begin[!ht]
! begin{|r|c|c|c|c|c|c|c|c|}
hline
! multicolumn{|c|}{cellcolor[gray]{0.75}bf Video
Formats}\
hline
! {bfbegin
! Base video format\
! index value
! end}
! & 9 & 10 & 11 & 12 & 13 & 14 &
15 & 16 \
hline
! {bf Name (informative)} & HD720P-60& HD720P-50
& HD1080I-60& HD1080I-50&
! HD1080P-60 &HD1080P-50& DC2K &DC4K \
hline
! {bf Frame
Width:}&1280&1280&1920&1920&1920&192
0&2048&4096\
! {bf Frame
Height:}&720&720&1080&1080&1080&1080
&1080&2160\
hline
! {bf Sampling
Format:}&4:2:2&4:2:2&4:2:2&4:2:2&4:2:2&a
mp;4:2:2&4:4:4&4:4:4\
hline
! {bf Interlaced:} & false & false & true
& true & false & false & false &
false \
! {bf Top Field First:} & true & true & true
& true & true & true & true & true
\
hline
! {bf Frame Rate Index} &7 &6 &4&3 &7
&6 &2&2 \
! {bf Numerator} & 60000 & 50 & 30000 &
25 & 60000 & 50 & 24 & 24\
! {bf Denominator} & 1001 & 1 & 1001 &
1 & 1001 & 1 & 1 & 1\
hline
! {bf Aspect Ratio Index} &1 &1 &1 &1
&1 &1 &1 &1\
! {bf Numerator} & 1 & 1 & 1 & 1 & 1
& 1 & 1 & 1\
! {bf Denominator}& 1 & 1 &1 & 1 & 1
& 1 & 1 & 1\
hline
! {bf Clean
Width}&1280&1280&1920&1920&1920&1920
&2048&4096\
! {bf Clean
Height}&720&720&1080&1080&1080&1080&
amp;1080&2160\
! {bf Clean Left Offset} & 0 & 0 &0 &0
&0 &0 &0 &0 \
! {bf Clean Top Offset} & 0 &0 &0 &0 &0
&0 &0 &0 \
hline
! {bf Signal Range Index} &3 &3 &3 &3
&3 &3 &4 &4 \
! {bf Luma Offset} &64 &64 &64 &64 &64
&64 &256 &256\
! {bf Luma Excursion} &876 &876 &876 &876
&876 &876 &3504 &3504\
! {bf Chroma Offset} &512 &512 &512 &512
&512 &512 &2048 &2048\
! {bf Chroma Excursion} &896 &896 &896 &896
&896 &896 &3584 & 3584\
hline
! {bf Colour Specification Index} &3 & 3 &
3& 3& 3&3 & 4& 4\
!
&HDTV&HDTV&HDTV&HDTV&HDTV&HDTV&C
inema&Cinema\
hline
! {bf Colour Primaries Index}
&0& 0&0&0&0&0&3&3\
!
&HDTV&HDTV&HDTV&HDTV&HDTV&HDTV&C
inema&Cinema\
! hline
! {bf Colour Matrix Index}
&0&0&0&0&0&0&0&0\
!
&HDTV&HDTV&HDTV&HDTV&HDTV&HDTV&H
DTV&HDTV\
! hline
! {bf Transfer Function Index}
&0&0&0&0&0&0&0&0\
! &TV gamma&TV gamma&TV gamma&TV
gamma&TV gamma&TV gamma&TV gamma&TV gamma\
hline
end
! caption{Predefined video format parameters for video
formats 9--16}
! end
!
!
Index: spec-conventions.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/spec-conventions.tex,
v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** spec-conventions.tex 5 Nov 2007 16:33:30 -0000 1.16
--- spec-conventions.tex 8 Nov 2007 16:46:19 -0000 1.17
***************
*** 134,138 ****
left{begin
1 text{ if $ageq0$} \
! 0 text{ if $a==0$}
-1 text{ if $a<0$}
endright.]
--- 134,138 ----
left{begin
1 text{ if $ageq0$} \
! 0 text{ if $a==0$}\
-1 text{ if $a<0$}
endright.]
***************
*** 148,151 ****
--- 148,154 ----
[n*bleq a]
+ i.e. numbers are rounded towards -infinity. N.B. this
differs from C/C++ conventions
+ of round towards 0.
+
item[Remainder] For integers $a,b$, with $b>0$, the
remainder $a%b$ is
equal to
***************
*** 155,161 ****
$a%b$ always lies between 0 and $b-1$.
-
- i.e. numbers are rounded towards -infinity. N.B. this
differs from C/C++ conventions
- of round towards 0.
item[Exponentiation] For integers $a, b$, $b>0$ $a^b$
is defined as $a*a*hdots *a$ ($b$ times). $a^0$ is 1.
--- 158,161 ----
Index: terms.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/terms.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** terms.tex 5 Nov 2007 16:33:30 -0000 1.3
--- terms.tex 8 Nov 2007 16:46:19 -0000 1.4
***************
*** 36,40 ****
item[DC subband:] the signal band that represents data
composed from the lowest frequency band of a wavelet
transform (0-LL).
item[Discrete Wavelet Transform (DWT):] a means of
transforming an array of values into space-frequency
components through the use of a filter bank.
- (Note: see http://en.wikip
edia.org/wiki/Discrete_wavelet_transform for a fuller
description).
item[Entropy Coding:] a term for describing any
mathematical process used to encode data in a lossless
manner, intended to reduce the required bit rate.
item[Exp-Golomb:] a form of variable-length code. This
specification uses an interleaved variant.
--- 36,39 ----
Index: spec-structure.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/spec-structure.tex,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** spec-structure.tex 5 Nov 2007 16:33:30 -0000 1.16
--- spec-structure.tex 8 Nov 2007 16:46:19 -0000 1.17
***************
*** 51,55 ****
appendix
! section{Dirac stream data parsing}input
clearpage
--- 51,55 ----
appendix
! section{Data encodings}input
clearpage
***************
*** 59,85 ****
clearpage
! section{Quantisation matrices and weighting functions}
input
clearpage
begin{informative*}
section{Wavelet transform and lifting (Informative)}
input
end{informative*}
- clearpage
- section{Video systems model and source parameters}
- input
- clearpage
- section{Video format
defaults}input
-
- clearpage
- section{Profiles and levels}input
%clearpage
%section{Parse diagrams}input
- %clearpage
- %section
- %annotate{I hope we do not have any references - it
would be nice
- %to be freestanding.}
--- 59,83 ----
clearpage
! section{Predefined video
formats}input
!
! clearpage
! section{Profiles and levels}input
!
! clearpage
! section{Low delay quantisation matrices}
input
clearpage
+ section{Video systems model (Informative)}
+ input
+
+ clearpage
begin{informative*}
section{Wavelet transform and lifting (Informative)}
input
end{informative*}
%clearpage
%section{Parse diagrams}input
Index: mc.tex
============================================================
=======
RCS file: /cvsroot/dirac/compress/doc/latex_spec/mc.tex,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** mc.tex 5 Nov 2007 16:33:30 -0000 1.21
--- mc.tex 8 Nov 2007 16:46:19 -0000 1.22
***************
*** 6,12 ****
component arrays $ref1$ and $ref2$ of the same type.
! This process is invoked for each component in a picture,
subsequent to the
! decoding of coefficient data, specified in Section
ref, and the Inverse Wavelet
! Transform (IWT), specified in Section ref.
subsubsection{Definitions and conventions}
--- 6,11 ----
component arrays $ref1$ and $ref2$ of the same type.
! This process shall be invoked for each component in a
picture, subsequent to the
! decoding of coefficient data, specified in Section
ref, and the Inverse Wavelet Transform (IWT),
specified in Section ref.
subsubsection{Definitions and conventions}
***************
*** 15,72 ****
global motion parameters $GlobalParams$.
- paragraph
-
- Since $motion_compensate()$ applies to both luma and
(potentially subsampled)
- chroma data, for simplicity a number of local variables
are defined. If $c=Y$ then:
- begin{eqnarray*}
- lenX & = & LumaWidth \
- lenY & = & LumaHeight \
- xblen & = & LumaXBlen \
- yblen & = & LumaYBlen \
- xbsep & = & LumaXBsep \
- ybsep & = & LumaYBsep
- end{eqnarray*}
-
- If $c=U$ or $c=V$, then likewise:
- begin{eqnarray*}
- lenX & = & ChromaWidth \
- lenY & = & ChromaHeight \
- xblen & = & ChromaXBlen \
- yblen & = & ChromaYBlen \
- xbsep & = & ChromaXBsep \
- ybsep & = & ChromaYBsep
- end{eqnarray*}
-
- Define the offsets $xoffset, yoffset$ by
- begin{eqnarray*}
- xoffset & = & (xblen-xbsep)//2 \
- yoffset & = & (yblen-ybsep)//2
- end{eqnarray*}
-
- begin
- The subband data that makes up the IWT coefficients is
padded in order that the IWT
- may function correctly. For simplicity, in this
specification, padding data is removed
- after the IWT has been performed so that the picture data
and reference data arrays have
- the same dimensions for motion compensation. However, it
may be more efficient to perform
- all operations prior to the output of pictures using
padded data, i.e. to discard padding values
- subsequent to motion compensation. Such a course of action
is equivalent, so long as it is realised
- that blocks must be regarded as edge blocks if they
overlap the actual picture area, not the
- larger area produced by padding. The specification of this
section fully supports such an
- interpretation.
- end
paragraph{Chroma subsampling}
label
$ $newline
! When motion compensating chroma components, motion vectors
are scaled by the
$chroma_mv_scale()$ function. This produces chroma
vectors in units of
! $MotionVectorPrecision$ with respect to the chroma
samples:
begin
! bsCODE{sv[0] gg=
chroma_h_shift()}
! bsCODE{sv[1] gg=
chroma_v_shift()}
bsRET
end.
begin{informative*}
subsubsection{Overlapped Block Motion Compensation (OBMC)
(Informative)}
--- 14,35 ----
global motion parameters $GlobalParams$.
paragraph{Chroma subsampling}
label
$ $newline
! When motion compensating chroma components, motion vectors
shall be scaled by the
$chroma_mv_scale()$ function. This produces chroma
vectors in units of
! $MotionVectorPrecision$ with respect to the chroma
samples, as follows:
begin
! bsCODE{sv[0] =
v[0]//chroma_h_ratio()}
! bsCODE{sv[1] =
v[1]//chroma_v_ratio()}
bsRET
end.
+ begin
+ Recall that division in this specification rounds towards
-infinity. This division can be achieved by a bit-shift in
C/C++ as chroma dimension ratios are 1 or 2.
+ end
+
begin{informative*}
subsubsection{Overlapped Block Motion Compensation (OBMC)
(Informative)}
***************
*** 97,101 ****
begin{informative*}
! The overlap between blocks horizontally is $xblen - xbsep$
and vertically is
$yblen - ybsep$. As a result pixels in the overlapping
areas lie in more than
one block, and so more than one motion vector set (and set
of associated predictions)
--- 60,64 ----
begin{informative*}
! The overlap (offset) between blocks horizontally is $xblen
- xbsep$ and vertically is
$yblen - ybsep$. As a result pixels in the overlapping
areas lie in more than
one block, and so more than one motion vector set (and set
of associated predictions)
***************
*** 108,117 ****
In Dirac blocks are positioned so that blocks will
overspill the left and top edges by
($xoffset$) and ($yoffset$) pixels. The number of blocks
has been
! determined (Section ??) so that the picture area is wholly
covered, and the overspill
on the right hand and bottom edges will be at least the
amount on the left and top edges.
Indeed, the number of blocks has been set so that the
blocks divide into whole superblocks
(sets of 4x4 blocks), which mean that some blocks may fall
entirely out of the picture area.
! Any predictions for pixels outside the picture area
defined by $0 leq x < lenX, 0 leq y <lenY$
! are discarded.
end{informative*}
--- 71,79 ----
In Dirac blocks are positioned so that blocks will
overspill the left and top edges by
($xoffset$) and ($yoffset$) pixels. The number of blocks
has been
! determined (Section ref{}) so that the picture area is
wholly covered, and the overspill
on the right hand and bottom edges will be at least the
amount on the left and top edges.
Indeed, the number of blocks has been set so that the
blocks divide into whole superblocks
(sets of 4x4 blocks), which mean that some blocks may fall
entirely out of the picture area.
! Any predictions for pixels outside the actual picture
area are discarded.
end{informative*}
***************
*** 120,127 ****
label
! The motion compensation process forms an integer
prediction $p[y][x]$ for each pixel in the predicted
! picture component $pic$, and adds it to the component
data. This is then clipped to keep it in range.
! begin{pseudo*}
bsIF{c==Y}
bsCODE{bit_depth=LumaDepth}
--- 82,96 ----
label
! The motion compensation process shall form an integer
prediction for each pixel in
! the predicted picture component $pic$, which shall be
added to the pixel value, and
! then clipped to keep it in range.
! The $motion_compensate()$ process is defined by means of
a temporary data
! array $mc_tmp$ for storing the motion-compensated
prediction for the
! current picture.
!
! The $motion_compensate()$ shall be defined as follows:
!
! begin{ref1, ref2, pic, c}
bsIF{c==Y}
bsCODE{bit_depth=LumaDepth}
***************
*** 129,202 ****
bsCODE{bit_depth=ChromaDepth}
bsEND
! bsFOR{y=0}
! bsFOR{x=0}
! bsCODE{pic[y][x] += pixel_predict(y, x, pic,
ref1, ref2, c)}
bsCODE{pic[y][x] = clip(pic[y][x],
-2^, 2^-1)}
bsEND
bsEND
! end{pseudo*}
! subsubsection{Pixel prediction}
! label
! In order to specify the $pixel_predict()$ process, some
definitions are required. For block indices $(i,j)$,
! define the set of elements $B(i,j)$ in the corresponding
! block by:
! begin{eqnarray*}
! xstart & = & max(i*xbsep-xoffset, 0) \
! ystart & = & max(j*xbsep-xoffset, 0) \
! xstop & = & minleft( (i+1)*xbsep+xoffset,
lenXright)\
! ystop & = & minleft( (j+1)*ybsep+yoffset,
lenYright)\
! B(i,j) & = & {(x,y): xstartleq x<xstop,
ystartleq y<ystop}
! end{eqnarray*}
! Define the total weight resolution $total_wt_bits$ as
follows:
! begin{eqnarray*}
! hbits & = & log_2(xblen-xbsep)+1 =
log_2(xoffset)+2 \
! vbits & = & log_2(yblen-ybsep)+1 =
log_2(yoffset)+2 \
! total_wt_bits & = &
hbits+vbits+RefsWeightPrecision
! end{eqnarray*}
! This is the number of bits added to pixel values in order
to perform OBMC
! reversibly with integer arithmetic using the spatial
specified in Sections
! ref and the reference weights extracted
in
! parsing the picture prediction header data (Section
ref).
! The $pixel_predict(y, x, ref1, ref2, c)$ function forms a
prediction by adding together weighted predictions
! for all blocks containing the pixel $(x,y)$. Weight
contributions come both from a spatial matrix and from the
! weights assigned to references:
! begin{y, x, pic, ref1, ref2, c}
! bsCODE{p=0}
! bsFORSUCH{(i,j)}{(x,y)in B(i,j)}
! bsCODE{m=BlockData[j][i][mode]}
! bsIF{m==Intra}
! bsCODE{val=BlockData[j][i][dc][c]}
! bsCODE{val=val*2^RefsWeightPrecision}
! bsELSEIF{m==RefOneOnly}
! bsCODE{val=block_pred(ref1, 1, i, j, x, y, c)}
! bsCODE{val=val*(RefOneWeight+RefTwoWeight)}
! bsELSEIF{m==RefTwoOnly}
! bsCODE{val=block_pred(ref2, 2, i, j, x, y, c)}
! bsCODE{val=val*(RefOneWeight+RefTwoWeight)}
! bsELSE
! bsCODE{val1=block_pred(ref1, 1, i, j, x, y, c)}
! bsCODE{val1=val1*RefOneWeight}
! bsCODE{val2=block_pred(ref2, 2, i, j, x, y, c)}
! bsCODE{val2=val2*RefTwoWeight}
! bsCODE{val=val1+val2}
! bsEND{}
!
bsCODE{val=val*spatial_wt(i,j,x,y)}
! bsCODE{p=p+val}
! bsEND
! bsCODE{p=(p+2^)gg total_wt_bits}
! bsRET
! end
begin
! {bf 1.} Note that the number of bits $total_wt_bits$
used for
! the OBMC weighting matrix depends upon the block sizes -
specifically
the block overlaps - selected. A Dirac decoder level
(Section ref)
specifies the maximum block overlaps allowable, and hence
--- 98,181 ----
bsCODE{bit_depth=ChromaDepth}
bsEND
! bsCODE{init_dimensions(c)}
! bsCODE{mc_tmp=init_temp_array()}
! bsCODE{total_wt_bits=set_mc_wt()}
! bsFOR{j=0}
! bsFOR{i=0}
! bsCODE{block_mc(mc_tmp,i,j)}
! bsEND
! bsEND
! bsFOR{y=0}
! bsFOR{x=0}
! bsCODE{pic[y][x] +=
(mc_tmp[y][x]+2^)gg total_wt_bits}
bsCODE{pic[y][x] = clip(pic[y][x],
-2^, 2^-1)}
bsEND
bsEND
! end
! subsubsection
! label
! Since motion compensation shall apply to both luma and
(potentially subsampled)
! chroma data, for simplicity a number of variables are
defined by the
! $init_dimensions()$ function, which is as follows:
! begin
! bsIF{c==Y}
! bsCODE{LenX=LumaWidth}
! bsCODE{LenY=LumaHeight}
! bsCODE{XBlen=LumaXBlen}
! bsCODE{YBlen=LumaYBlen}
! bsCODE{XBsep=LumaXBsep}
! bsCODE{YBsep=LumaYBsep}
! bsELSE
! bsCODE{LenX=ChromaWidth}
! bsCODE{LenY=ChromaHeight}
! bsCODE{XBlen=ChromaXBlen}
! bsCODE{YBlen=ChromaYBlen}
! bsCODE{XBsep=ChromaXBsep}
! bsCODE{YBsep=ChromaYBsep}
! bsEND
! bsCODE{XOffset = (XBlen-XBsep)//2}
! bsCODE{YOffset = (YBlen-YBsep)//2}
! end
! begin
! The subband data that makes up the IWT coefficients is
padded in order that the IWT
! may function correctly. For simplicity, in this
specification, padding data is removed
! after the IWT has been performed so that the picture data
and reference data arrays have
! the same dimensions for motion compensation. However, it
may be more efficient to
! perform all operations prior to the output of pictures
using padded data, i.e. to discard
! padding values subsequent to motion compensation. Such a
course of action is equivalent,
! so long as it is realised that blocks must be regarded as
edge blocks if they overlap the
! actual picture area, not the larger area produced by
padding.
! end
! subsubsection{Initialising the motion compensated data
array}
! label
! The $init_temp_array()$ function shall return a
two-dimensional data array with
! horizontal size $LenX$ and vertical size $LenY$, such
that each element of the two dimensional array shall be set
to zero.
! subsubsection{Weighting bits}
! label
+ The function $set_mc_wts()$ shall set the total number
of extra bits of resolution
+ that shall be added to motion compensation data as a
result of applying weighting
+ matrices and picture weights. It shall be defined as
follows:
+
+ begin{}
+ bsCODE{hbits = intlog2(XOffset)+2}
+ bsCODE{vbits = intlog2(YOffset)+2}
+ bsRET{hbits+vbits+RefsWeightPrecision}
+ end
begin
+ This is the number of bits added to pixel values in order
to perform OBMC
+ reversibly with integer arithmetic using the spatial
matrix specified in Sections
+ ref and the reference weights extracted
in
+ parsing the picture prediction header data (Section
ref).
! Note that the number of motion compensation bits depends
upon the
! block sizes -- specifically
the block overlaps - selected. A Dirac decoder level
(Section ref)
specifies the maximum block overlaps allowable, and hence
***************
*** 211,259 ****
a 16 bit word could be used to provide additional
reference
weighting.
! {bf 2.} The motion compensation process has been
presented as double
! loop: first over all pixels in a given component and
second over all
! blocks of which the pixel is a member. However, if an
intermediate
! buffer is allowed, the loop order can be reversed. In this
case
! one sets a picture buffer, consisting of
! a component of data (or a strip of component data lines)
and
! add in the weighted predictions for each block. As the
! blocks overlap, the contributions sum and form a
prediction
! for every pixel. This is the most natural implementation
! strategy:
! begin{pseudo*}
! bsCODE{b[quad][quad]=0}
! bsFOR{j=0}
! bsFOR{i=0}
! bsCODE{m=BlockData[j][i][mode]}
! bsFOREACH{(x,y)}{B(i,j)}
! bsIF{m==Intra}
! bsCODE{wt=2^RefsWeightPrecision *
spatial_wt(i,j,x,y)}
!
bsCODE{b[y][x]+=BlockData[j][i][dc][c]*wt}
! bsELSEIF{m==RefOneOnly}
! bsCODE{wt=(RefOneWeight+RefTwoWeight) *
spatial_wt(i,j,x,y)}
! bsCODE{b[y][x]+=block_pred(ref1, 1, i,
j, x, y, c)*wt}
! bsELSEIF{m==RefTwoOnly}
! bsCODE{wt=(RefOneWeight+RefTwoWeight) *
spatial_wt(i,j,x,y)}
! bsCODE{b[y][x]+=block_pred(ref2, 2, i,
j, x, y, c)*wt}
! bsELSE
! bsCODE{wt=RefOneWeight *
spatial_wt(i,j,x,y)}
! bsCODE{b[y][x]+=block_pred(ref1, 1, i,
j, x, y, c)*wt}
! bsCODE{wt=RefTwoWeight *
spatial_wt(i,j,x,y)}
! bsCODE{b[y][x]+=block_pred(ref2, 2, i,
j, x, y, c)*wt}
! bsEND
bsEND
bsEND
bsEND
! bsFOR{y=0}
! bsFOR{x=0}
! bsCODE{pic[y][x] +=
(b[y][x]+2^)gg total_wt_bits}
! bsCODE{pic[y][x] = clip(pic[y][x],
-2^, 2^-1)}
! bsEND
! bsEND
! end{pseudo*}
The double multiplication by a spatial and by a reference
weight can be
avoided by using a set of spatial weighting matrices
--- 190,237 ----
a 16 bit word could be used to provide additional
reference
weighting.
+ end
+ subsubsection{Motion compensation of a block}
+ label
! This section defines the $block_mc()$ process for
motion-compensating a single
! block.
! Each block shall be motion-compensated by applying a
weighting matrix to a block prediction and adding the
weighted prediction into the motion-compensated
! prediction array.
!
! The $block_mc()$ process shall be defined as follows:
!
! begin{mc_pred,i,j}
! bsCODE{xstart = i*XBsep-XOffset}
! bsCODE{ystart = j*XBsep-XOffset}
! bsCODE{xstop = (i+1)*XBsep+XOffset}
! bsCODE{ystop = (j+1)*YBsep+YOffset}
! bsCODE{m=BlockData[j][i][mode]}
! bsCODE{W=spatial_wt(i,j)}{ref{}}
! bsFOR{y=max(ystart,0)}{min(ystop,LenY)-1}
! bsFOR{x=max(xstart,0)}{min(xstop,LenX)-1}
! bsCODE{p=x-xstart}
! bsCODE{q=y-xstart}
! bsIF{m==Intra}
! bsCODE{wt=2^RefsWeightPrecision * W[q][p]}
!
bsCODE{mc_tmp[y][x]+=BlockData[j][i][dc][c]*wt}
! bsELSEIF{m==RefOneOnly}
! bsCODE{wt=(RefOneWeight+RefTwoWeight) *
W[q][p]}
! bsCODE{mc_tmp[y][x]+=pixel_pred(ref1, 1, i,
j, x, y, c)*wt}{ref{}}
! bsELSEIF{m==RefTwoOnly}
! bsCODE{wt=(RefOneWeight+RefTwoWeight) *
W[q][p]}
! bsCODE{mc_tmp[y][x]+=pixel_pred(ref2, 2, i,
j, x, y, c)*wt}{ref{}}
! bsELSE
! bsCODE{wt=RefOneWeight * W[q][p]}
! bsCODE{mc_tmp[y][x]+=pixel_pred(ref1, 1, i,
j, x, y, c)*wt}{ref{}}
! bsCODE{wt=RefTwoWeight * W[q][p]}
! bsCODE{mc_tmp[y][x]+=pixel_pred(ref2, 2, i,
j, x, y, c)*wt}{ref{}}
bsEND
bsEND
bsEND
! end
+ begin
The double multiplication by a spatial and by a reference
weight can be
avoided by using a set of spatial weighting matrices
***************
*** 263,299 ****
this means a double-size spatial matrix for all modes
other than
$RefOneAndTwo$.
-
- {bf 3.} The reference prediction weights used for each
prediction mode may appear confusing. It is helpful
- to think of two cases for using reference picture
weighting. The first is interpolative
- prediction, where the picture being predicted is, for
example, a cross-fade and is
- closely approximated by some mixture of the reference
pictures:
- $Pbacksimeqdelta R_1+(1-delta)R_2$. Here the weights
we'd like to
- use for each frame prediction add up to 1 (or
$2^RefsWeightPrecision$ for integer weights).
- The second case is scaling prediction, where
- the weights we'd like to use for the frame predictions
don't add up to 1: for example,
- a fade to or from black
- $Pbacksimeqdelta_1 R_1$ and $Pbacksimeqdelta_2 R_2$.
It is not possible to choose
- weights for each prediction mode which will be optimal
both cases. The weighting
- factors chosen will give work with interpolative
prediction (which is more common)
- but are not perfect for scaling prediction. It would have
been possible to create a variety of
- prediction modes to cover all cases, however the potential
savings do not justify the
- additional complexity.
-
- For interpolative prediction, all data in the current
picture will be of commensurate scale to
- that of the references. In forming the bi-directional
prediction, a value $W_1 p_1 + W_2 p2_2$ is
- formed, so the prediction has "scale" $W_1+W_2$.
$W_1+W_2$ is
- therefore the weighting value used to scale unidirectional
prediction, in order to provide
- predictions of commensurate order. The unity weighting
value $2^RefsWeightPrecision$ is used
- for DC blocks as this gives the best prediction, and in
the interpolative case this equals $W_1+W_2$
- so all predictions are of the same order.
-
- The weighting factors we would like to use for
unidirectionally predicted blocks in the scaling case
- are $2W_1$ and $2W_2$ - the factor 2 takes into account
that we're only adding in one prediction
- value as against two for bidirectional prediction. These
factors differ from $W_1+W_2$, and hence
- unidirectional prediction is incorrect when there are two
references. Note, however, that we can
- still perform prediction with the correct scaling values
when we only have a single reference. Note
- also that the value of $W_1+W_2$ was selected instead of
$2^RefsWeightPrecision$, which
- would be equivalent in the interpolative case, as it gives
a better approximation when the
- weights do not sum to $2^RefsWeightPrecision$.
end
--- 241,244 ----
***************
*** 302,356 ****
label
! This section specifies the process $wt(i,j,x,y)$ for
deriving a spatial weighting value for a pixel with
! coordinates $(x,y)$ in the block with coordinates $(i,j)$.
Note that other weights are applied
! to the prediction as a result of the weights applied to
each reference.
! The two-dimensional spatial weighting matrix $W$ applies a
linear roll-off in both horizontal and vertical directions
! based on the position of the pixel $(x,y)$ within the
block $B(i,j)$. Define $xpos, ypos$ as the relative
! pixel coordinates from the top-left corner of the block:
! begin{eqnarray*}
! xpos & = & x-(i*xbsep-xoffset) \
! ypos & = & x-(i*ybsep-yoffset)
! end{eqnarray*}
! Define a horizontal weighting array $WH$ by the recipe:
providecommand[1]{leftlvert#1rightrvert}
! begin{pseudo*}
! bsCODE{max_x=2(xblen-xbsep)}
! bsIF{i==0 text xpos< xblen//2}
! bsCODE{WH[xpos]=max_x}
! bsELSEIF{i==BlocksX text xposgeq xblen//2}
! bsCODE{WH[xpos]=max_x}
! bsELSE
! bsCODE{WH[xpos] =
clip(xblen-2abs{xpos-dfrac{(xblen-1)}}, max_x ) }
bsEND
! end{pseudo*}
! Likewise define $WV$ by
! begin{pseudo*}
! bsCODE{max_y=2(yblen-ybsep)}
! bsIF{j==0 text xpos< yblen//2}
! bsCODE{WH[ypos]=max_y}
! bsELSEIF{j==BlocksY text yposgeq yblen//2}
! bsCODE{WH[ypos]=max_y}
bsELSE
! bsCODE{WV[ypos] = clip(yblen -
2abs{ypos-dfrac{(yblen-1)}},0, max_y) }
bsEND
! end{pseudo*}
!
! The overall spatial weighting matrix $W$ is given by
! begin{equation*}
! W[ypos][xpos] = WH[xpos]WV[ypos]
! end{equation*}
! and this is the value returned.
! Note that blocks at the extremities of the block set
receive maximum weight around their outward-facing edges.
! This is to compensate for the lack of blocks making weight
contributions on these edges, and ensures that
! the total contribution for the pixels in the blocks is
$2^$. In section ($i=0$), the profile of the matrix
! for interior blocks is as shown in Figure
ref{fig:weightprofile}.
begin[!ht]
--- 247,304 ----
label
! This section specifies the function $spatial_wt(i,j)$ for
deriving the spatial weighting
! matrix that shall be applied to the block with coordinates
$(i,j)$.
! Note that other weights shall be applied to the prediction
as a result of the
! weights applied to each reference.
! The same weighting matrix shall be returned for all blocks
within the interior
! of the picture component array. Suitably modified
weighting matrices shall
! be returned for blocks at the edges of the picture
component data array.
!
! The function shall return a two-dimensional spatial
weighting matrix. This
! shall apply a linear roll-off in both horizontal and
vertical directions.
providecommand[1]{leftlvert#1rightrvert}
! The spatial matrix returned shall be the product of a
horizontal and a vertical
! weighting matrix. It shall be defined as follows:
!
! begin{i,j}
! bsFOR{y==0}
! bsFOR{x==0}
! bsCODE{W[y][x]=h_wt(i,x)*v_wt(j,y)}
! bsEND
bsEND
! bsRET
! end
! The horizontal weighting function shall be defined as
follows:
! begin{i,x}
! bsCODE{max_x=4*XOffset}
! bsIF{i==0 text x< XBlen//2}
! bsRET
! bsELSEIF{i==BlocksX text xgeq XBlen//2}
! bsRET
bsELSE
! bsRET{clip(XBlen-2abs{x-dfrac{(XBlen-1)}},
max_x ) }
bsEND
! end
! The horizontal weighting function shall be defined as
follows:
! begin{j,y}
! bsCODE{max_y=4*YOffset}
! bsIF{j==0 text y< YBlen//2}
! bsRET
! bsELSEIF{j==BlocksY text ygeq YBlen//2}
! bsRET
! bsELSE
! bsRET{clip(YBlen -
2abs{y-dfrac{(YBlen-1)}},0, max_y) }
! bsEND
! end
! The profile of the matrix
! for interior blocks is illustrated in Figure
ref{fig:weightprofile}.
begin[!ht]
***************
*** 361,368 ****
end
! subsubsection{Block prediction}
! label
! This section specifies the operation of the
$block_pred(ref, ref_num, i, j, x, y, c)$
process for forming a prediction for a pixel
with coordinates $(x,y)$ in component $c$, belonging to
the block with coordinates $(i,j)$.
--- 309,366 ----
end
! begin{informative*}
! subsubsection{Reference weights and fade prediction
(Informative)}
! The reference prediction weights used for each prediction
mode for
! block prediction (Section ref) may appear
! confusing. It is helpful
! to think of two cases for using reference picture
weighting. The first is interpolative
! prediction, where the picture being predicted is, for
example, a cross-fade and is
! closely approximated by some mixture of the reference
pictures:
! $Pbacksimeqdelta R_1+(1-delta)R_2$. Here the weights
we'd like to
! use for each frame prediction add up to 1 (or
$2^RefsWeightPrecision$
! for integer weights).
! The second case is scaling prediction, where
! the weights we'd like to use for the frame predictions
don't add up to 1: for example,
! a fade to or from black
! $Pbacksimeqdelta_1 R_1$ and $Pbacksimeqdelta_2 R_2$.
It is not possible to choose
! weights for each prediction mode which will be optimal
both cases. The weighting
! factors chosen will give work with interpolative
prediction (which is more common)
! but are not perfect for scaling prediction. It would have
been possible to create a variety of
! prediction modes to cover all cases, however the potential
savings do not justify the
! additional complexity.
!
! For interpolative prediction, all data in the current
picture will be of commensurate scale to
! that of the references. In forming the bi-directional
prediction, a value
! $W_1 p_1 + W_2 p2_2$ is
! formed, so the prediction has "scale" $W_1+W_2$.
$W_1+W_2$ is
! therefore the weighting value used to scale unidirectional
prediction, in order to provide
! predictions of commensurate order. The unity weighting
value
! $2^RefsWeightPrecision$ is used
! for DC blocks as this gives the best prediction, and in
the interpolative case
! this equals $W_1+W_2$
! so all predictions are of the same order.
!
! The weighting factors we would like to use for
unidirectionally
! redicted blocks in the scaling case
! are $2W_1$ and $2W_2$ - the factor 2 takes into account
that
! we're only adding in one prediction
! value as against two for bidirectional prediction. These
factors differ f
! rom $W_1+W_2$, and hence
! unidirectional prediction is incorrect when there are two
references.
! Note, however, that we can
! still perform prediction with the correct scaling values
when we
! only have a single reference. Note
! also that the value of $W_1+W_2$ was selected instead of
! $2^RefsWeightPrecision$, which
! would be equivalent in the interpolative case, as it gives
a
! better approximation when the
! weights do not sum to $2^RefsWeightPrecision$.
! end{informative*}
!
! subsubsection{Pixel prediction}
! label
! [GOT HERE!!]
! This section specifies the operation of the
$pixel_pred(ref, ref_num, i, j, x, y, c)$
process for forming a prediction for a pixel
with coordinates $(x,y)$ in component $c$, belonging to
the block with coordinates $(i,j)$.
***************
*** 370,376 ****
Firstly, a motion vector to be applied to pixel $(x,y)$ is
derived. For block motion, this is
the block motion vector, whereas for global motion it is
computed from the global motion
! parameters:
! begin{ref,ref_num,i,j,x,y,c}
bsIF{BlockData[j][i][global]==false}
bsCODE{mv= BlockData[j][i][ref]}
--- 368,377 ----
Firstly, a motion vector to be applied to pixel $(x,y)$ is
derived. For block motion, this is
the block motion vector, whereas for global motion it is
computed from the global motion
! parameters.
! Then the motion vector is used to derive reference picture
coordinates.
! The value returned is that of the upconverted reference
pixel at the derived coordinates.
!
! begin{ref,ref_num,i,j,x,y,c}
bsIF{BlockData[j][i][global]==false}
bsCODE{mv= BlockData[j][i][ref]}
***************
*** 381,391 ****
bsCODE{mv =
chroma_mv_scale(mv)}
bsEND
- bsCODE
- end
-
- Then the motion vector is used to derive reference picture
coordinates.
- The value returned is that of the upconverted reference
pixel at the derived coordinates.
-
- begin{pseudo*}
bsIF{MotionVectorPrecision>0}
bsCODE{px = (xll MotionVectorPrecision)+mv[0]}
--- 382,385 ----
***************
*** 396,400 ****
bsEND
bsRET{upconvert(ref, px, py))}
! end{pseudo*}
subsubsection{Global motion vector field generation}
--- 390,394 ----
bsEND
bsRET{upconvert(ref, px, py))}
! end
subsubsection{Global motion vector field generation}
Index: idwt.tex
============================================================
=======
RCS file: /cvsroot/dirac/compress/doc/latex_spec/idwt.tex,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** idwt.tex 10 Oct 2007 16:04:02 -0000 1.17
--- idwt.tex 8 Nov 2007 16:46:19 -0000 1.18
***************
*** 4,41 ****
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- label
! This section defines the process $idwt(data)$ for
reconstructing picture component data
! from decoded subband data $data$ using the Inverse
Discrete Wavelet Transform (IDWT). $idwt()$
! can be invoked in the picture decoding process only after
successful parsing of the
! subband coefficient data (Section ref).
! The $idwt()$ process consists of two sub-processes:
! begin
! item Synthesis, which returns a pixel array from the
subband wavelet
! coefficients:
! $pic=idwt_synthesis(data)$ (Section ref)
! item Pad-removal, which removes padding values from the
synthesised pixel array $pic$ (Section
ref)
! end
! The output returned by this process is a two-dimensional
array $pic$ of pixel data representing
! Y, U or V component data.
! begin
! The IDWT can operate with a number of different wavelet
filters, whose identity has
! been signalling in the transform data header. These allow
trade-offs to be made
! between compression efficiency, implementation complexity
and perceptual quality.
- Different filters are applicable in different scenarios.
Shorter filters are generally more
- suitable for motion-compensated residual data, and longer
filters for intra picture data.
- The default filter set includes a ``Fidelity" filter
optimised for downconversion, so that a lower-resolution,
- but high-quality, proxy layer may be decoded for viewing.
- end
! Since wavelet filtering operates on both rows and columns
of two-dimensional arrays independently
! it is useful to define operators $row(a,k)$ and
$column(a,k)$ for extracting rows and columns
! with index $k$ from a 2-dimensional array $a$:
If $b=row(a,k)$ then $b[r]$ is a {em reference} to the
value of $a[k][r]$. This means that modifying the
--- 4,33 ----
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! subsection{Picture IDWT}
! label
! The inverse discrete wavelet transform process shall
consist of transforming the
! wavelet coefficients for each of the video components. It
shall be defined as follows:
! begin{}
! bsCODE{CurrentPicture[Y]=idwt(YTransform)}
!
bsCODE{CurrentPicture[C1]=idwt(COneTransform)}
!
bsCODE{CurrentPicture[C2]=idwt(CTwoTransform)}
! bsFOR{Y,C1,C2}
!
bsCODE{idwt_pad_removal(CurrentPicture[c],c)}{ref{padre
moval}}
! end
! subsection{Component IDWT}
! This section defines the $idwt(coeff_data)$ process for
reconstructing picture
! component data from decoded subband data $coeff_data$
using the inverse discrete wavelet transform (IDWT). The
IDWT shall be invoked in the picture decoding process only
after successful unpacking of the subband coefficient data
(Section ref).
! The IDWT process shall return a pixel array from the
subband wavelet coefficients representing a reconstructed
video component (Y, C1 or C2) for a single picture.
! Since wavelet filtering operates on both rows and columns
of two-dimensional arrays
! independently it is useful to define operators
$row(a,k)$ and $column(a,k)$ for
! extracting rows and columns with index $k$ from a
2-dimensional array $a$:
If $b=row(a,k)$ then $b[r]$ is a {em reference} to the
value of $a[k][r]$. This means that modifying the
***************
*** 45,71 ****
value of $b[r]$ modifies the value of $a[r][k]$.
! begin
! These definitions allow us to express the important
feature that all filtering operations are specified
! as {em in place} calculations, not involving data being
copied at any stage.
! end
!
! subsubsection{IDWT synthesis operation}
! label
! This section defines the process $idwt_synthesis(pic,
data)$ invoked by $idwt()$.
!
! This is an iterative procedure operating on four subbands
at each
! iteration stage to produce a new subband. The procedure
! is:
! begin
! bsCODE{LL_band = data[0][LL]}
bsFOR{n=1}
! bsCODE{ LL_band = vh_synthesis(LL_band,
data[n][HL], data[n][LH], data[n][HH])}
bsEND
bsRET
end
! Note that at each stage, the input dimensions of
$LL_band$ will be the same as those of the
! other input bands, whereas the output dimensions are
double those of the input bands.
subsubsection{Vertical and horizontal synthesis}
--- 37,58 ----
value of $b[r]$ modifies the value of $a[r][k]$.
! The $idwt()$ process shall be an iterative procedure
operating on four subbands
! (LL, HL,LH and HH) at each iteration stage to produce
a new subband. The procedure
! shall be as follows
! begin
! bsCODE{LL_band = coeff_data[0][LL]}
bsFOR{n=1}
! bsCODE{
! new_LL= vh_synth(LL_band,
coeff_data[n][HL], coeff_data[n][LH],
! coeff_data[n][HH])
! }
! bsCODE{LL_band=new_LL}
bsEND
bsRET
end
! Note that at each stage, the input dimensions of the input
$LL_band$ will be the same
! as those of the other input bands, whereas the output
dimensions are double those of the input bands.
subsubsection{Vertical and horizontal synthesis}
***************
*** 73,83 ****
This section specifies the operation of the vertical and
horizontal
! synthesis process $vh_synthesis()$.
! $vh_synthesis$ is repeatedly invoked by
$idwt_synthesis()$. It operates on four subband
! data arrays of identical dimensions to produce a new array
$synth$, which is returned as the result of
! the process.
! {bf Step 1.} $synth$ is initialised so that:
begin{eqnarray*}
width(synth) & = & 2*width(LL_data) \
--- 60,74 ----
This section specifies the operation of the vertical and
horizontal
! synthesis process:
! $vh_synth(LL_data, HL_data, LH_data, HH_data)$
! $vh_synth$ shall return an array of twice the dimensions
of each of the input
! argument arrays.
!
! $vh_synth$ is repeatedly invoked by the IDWT synthesis
process and operates on four subband data arrays of
identical dimensions to produce a new array $synth$,
! which shall be returned as the result of the process.
!
! {bf Step 1.} $synth$ is a temporary two-dimensional array
that shall be initialised so that:
begin{eqnarray*}
width(synth) & = & 2*width(LL_data) \
***************
*** 85,89 ****
end{eqnarray*}
! {bf Step 2.} The data from the four arrays is interleaved
as follows:
begin{pseudo*}
--- 76,80 ----
end{eqnarray*}
! {bf Step 2.} The data from the four arrays shall be
interleaved as follows:
begin{pseudo*}
***************
*** 99,107 ****
end{pseudo*}
! This enables in-place calculation during the inverse
filter process.
! {bf Step 3.} Data is next synthesised vertically by
operating on each column
of data using a one-dimensional filter, and then
horizontally by operating
! on each row.
begin{pseudo*}
--- 90,100 ----
end{pseudo*}
! Note: This enables in-place calculation during the inverse
filter process.
! {bf Step 3.} Data shall be synthesised vertically by
operating on each column
of data using a one-dimensional filter, and then
horizontally by operating
! on each row. The one-dimensional filters used shall be
determined by
! the value of $WaveletIndex$ according to Tables
ref--ref.
! The process shall be as follows:
begin{pseudo*}
***************
*** 115,127 ****
end{pseudo*}
! {bf Step 4.} Finally, the synthesised subband data
receives a bitshift to
! remove any accuracy bits. The shift value $filtershift()$
used is as determined in Section ref
! from the wavelet index $WaveletIndex$.
begin{pseudo*}
bsCODE{shift = filtershift()}
! bsFOR{y=0}{height(synth)-1}
! bsFOR{x=0}{width(synth)-1}
! bsCODE{synth[y][x] = (synth[y][x] +
(1<<(shift-1)))gg shift}
bsEND
bsEND
--- 108,123 ----
end{pseudo*}
! {bf Step 4.} Finally, the synthesised subband data shall
implement a bitshift to
! remove any accuracy bits. The bit shift value
$filtershift()$ used shall be determined
! by the value of $WaveletIndex$ according to Tables
ref--ref.
! The process shall be as follows:
begin{pseudo*}
bsCODE{shift = filtershift()}
! bsIF{shift>0}
! bsFOR{y=0}{height(synth)-1}
! bsFOR{x=0}{width(synth)-1}
! bsCODE{synth[y][x] = (synth[y][x] +
(1<<(shift-1)))gg shift}
! bsEND
bsEND
bsEND
***************
*** 129,147 ****
begin
! Accuracy bits are added in the encoder by shifting up all
coefficients in the
! $LL$ band prior to applying any filtering (this includes
an initial shift of all
! values in the component data). Adding a small shift before
each decomposition
! is the most efficient way of providing additional
resolution where it is needed:
! the result is that the shift varies with the level to
which a subband belongs.
!
! Accuracy bits are required because the rounding stages in
integer lifting
! introduce non-linearities that can aliase data between
subbands. Quantising
! data in non-DC bands can then (for example) produce
artefacts at DC
! band frequencies. This increases bit rate and the
perceptual impact of quantisation,
! especially for 8-bit video. The accuracy bits have been
computed so as to virtually
! eliminate these effects (with the exception of Haar0 which
is included as it
! is suitable for low-delay low-complexity implementations,
especially lossless coding).
! For example, Fidelity does not require a shift value since
its filter gain is such
! as to add a bit of resolution with each level of
decomposition.
end
--- 125,132 ----
begin
! Accuracy bits are added in the encoder by shifting up all
coefficients in the LL band
! prior to applying any filtering (this includes an initial
shift of all values in the component
! data). Adding a small shift before each decomposition
stage is the most efficient way of
! providing additional resolution mitigating aliasing
through non-linear rounding effects.
end
***************
*** 150,209 ****
This section specifies the one-dimensional synthesis
process
! $1d_synthesis()$ applied to a 1-dimensional array of
coefficients of
! even length, consisting
! of either a row or a column of a 2-dimensional integral
data array.
! The one-dimensional synthesis process comprises the
application of a
! number of reversible integer lifting filter operations.
Four types
! of lifting operations are defined: Type 1, Type 2, Type 3
and type 4.
! Each type is characterised by two elements:
begin
! item a set of taps $t_, hdots,t_M$
! item a scale factor $s$
end
! Type 1 and Type 2 lifting filtering operations modify the
even coefficients
! by the odd coefficients:
! begin{eqnarray*}
! A[2*n]& +=& big( sum^M_{i=-N} t_i *A[2*(n+i) +
1] +(1ll (s-1))big) gg s mbox{ (Type 1)} \
! A[2*n]& -=& big( sum^M_{i=-N} t_i *A[2*(n+i) +
1] +(1ll (s-1))big) gg s mbox{ (Type 2)}
! end{eqnarray*}
!
! Type 3 and Type 4 lifting filtering operation modify the
odd coefficients
! by the even coefficients:
! begin{eqnarray*}
! A[2*n+1]& +=& big( sum^M_{i=-N} t_i
A[2*(n+i)]+(1ll (s-1)) big) gg s mbox{ (Type 3)} \
! A[2*n+1]& -=& big( sum^M_{i=-N} t_i
A[2*(n+i)] +(1ll (s-1))big) gg s mbox{ (Type 4)} \
! end{eqnarray*}
!
! begin
! Note that the distinctions between Type 1 and Type 2 and
between
! Type 3 and Type 4 filters is necessary
! because integer rounding is being used, and so the filters
are non-linear.
! In particular, a Type 1 or Type 3 filter with taps $t_i$
is {em not} equivalent to
! an Type 2 or Type 4 filter with taps $-t_i$.
! end
! These formulae are deemed to be applied for all applicable
$n$
! before the next filtering stage is applied and to use edge
extension (of even and
! odd parts separately) at the array
! edges where the filter would otherwise overlap. In
pseudo-code, four
! functions $lift1(A, t_i, s)$ and $lift2(A, t_i, s)$ are
specified by:
! begin{A,t_i, s}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
! bsFOR{i=-N}
bsCODE{pos=2*(n+i)-1}
bsCODE{pos=min(pos, length(A)-1)}
bsCODE{pos=max(pos, 1)}
! bsCODE{sum+=t_i*A[pos]}
bsEND
- bsCODE{sum+=(1ll (s-1))}
bsCODE{A[2*n]+=(sumgg s)}
bsEND
end
! begin{A,t_i, s}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
--- 135,183 ----
This section specifies the one-dimensional synthesis
process
! $1d_synthesis()$, which shall apply to a 1-dimensional
array of coefficients
! of even length, consisting of either a row or a column of
a 2-dimensional integral data array.
! The one-dimensional synthesis process shall comprise the
application of a
! number of reversible integer lifting filter operations.
!
! Lifting filtering operations shall be one of four types,
Type 1, Type 2, Type 3 and
! Type 4. Each type shall be characterised by four
elements:
begin
! item a filter length value $L$
! item a filter offset value $D$
! item an array of taps of length $L$:
$taps[0],ldots,taps[L-1]$
! item a scale factor $S$
end
! The four types of lifting operations shall be defined by
the functions:
! begin
! item[] $lift1(A,L,D,taps)$,
! item[] $lift2(A,L,D,taps)$,
! item[] $lift3(A,L,D,taps)$, and
! item[] $lift4(A,L,D,taps)$
! end
! respectively and shall act upon the values in a
one-dimensional array $A$.
! The Type 1 lifting process $lift1(A,L,D,taps)$ shall be
defined as follows:
! begin{A,L,D,taps}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
! bsFOR{i=D}{L+D-1}
bsCODE{pos=2*(n+i)-1}
bsCODE{pos=min(pos, length(A)-1)}
bsCODE{pos=max(pos, 1)}
! bsCODE{sum+=taps[i-D]*A[pos]}
! bsEND
! bsIF{S>0}
! bsCODE{sum+=(1ll (s-1))}
bsEND
bsCODE{A[2*n]+=(sumgg s)}
bsEND
end
! The Type 2 lifting process $lift2(A,L,D,taps)$ shall be
defined as follows:
!
! begin{A,L,D,taps}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
***************
*** 219,223 ****
end
! begin{A,t_i, s,fsort}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
--- 193,199 ----
end
! The Type 3 lifting process $lift3(A,L,D,taps)$ shall be
defined as follows:
!
! begin{A,L,D,taps}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
***************
*** 233,239 ****
end
! and
! begin{A,t_i, s}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
--- 209,215 ----
end
! The Type 4 lifting process $lift4(A,L,D,taps)$ shall be
defined as follows:
! begin{A,L,D,taps}
bsFOR{n=0}{(length(A)//2)-1}
bsCODE{sum=0}
***************
*** 249,277 ****
end
! $1d_synthesis$ applies the sequence of lifting filters
specified in Section ref
! according to the types specified there.
! begin
! This specification defines the lifting process on the
basis of lifting
! procedures applied to an entire row or column
consecutively. It is
! possible to implement lifting filtering operations so that
a filtering
! operation associated with one lifting filter is followed
by a filtering
! operation associated with another lifting filter. I.e. the
order of
! iteration is changed. In this case, the order in which
filtering is
! applied to coefficients does affect the outcome of the
process as even
! lifting operations may be followed by odd ones, and care
must be taken
! that values are not modified in the wrong order.
Nevertheless such an
! implementation may be more efficient, and complies with
this
! specification if it produces identical results.
! end
! subsubsection{Filters and shift values}
label
! The following the lifting filters and bitshift operations
that
! apply for each value of $WaveletIndex$ are specified in
Tables ref to
! ref.
! begin[!ht]
begin{|l|}
--- 225,281 ----
end
! $1d_synthesis$ shall apply the sequence of lifting
filters specified in Section ref
! corresponding to the value of $WaveletIndex$,and shall
invoke the corresponding lifting processes with the
parameters defined.
! paragraph{Mathematical formulation of lifting processes
(Informative)}
! $ $newline
! The lifting processes defined in the previous section are
extremely similar, and
! careful attention should be paid to the detail of their
operation in any implementation.
! The four different variants arise from two factors: the
‘phase’ (odd or
! even) of the lifting operation, and their implementation
using integer-only
! operations, which introduces rounding errors and makes
addition and subtraction
! subtly different.
!
! A lifting operation either modifies the odd coefficients
by a linear combination of the
! even coefficients, or vice-versa. Mathematically, the four
types of filter may be
! described as follows.
!
! Type 1 and Type 2 lifting filtering operations modify the
even coefficients
! by the odd coefficients:
! begin{eqnarray*}
! A[2*n]& +=& left( sum^M_{i=-N} t_i *A[2*(n+i)
+ 1] +(1ll (s-1))right) gg s mbox{ (Type 1)} \
! A[2*n]& -=& left( sum^M_{i=-N} t_i *A[2*(n+i)
+ 1] +(1ll (s-1))right) gg s mbox{ (Type 2)}
! end{eqnarray*}
!
! Type 3 and Type 4 lifting filtering operation modify the
odd coefficients
! by the even coefficients:
! begin{eqnarray*}
! A[2*n+1]& +=& left( sum^M_{i=-N} t_i
A[2*(n+i)]+(1ll (s-1)) right) gg s mbox{ (Type 3)} \
! A[2*n+1]& -=& left( sum^M_{i=-N} t_i
A[2*(n+i)] +(1ll (s-1))right) gg s mbox{ (Type 4)} \
! end{eqnarray*}
!
! The distinctions between Type 1 and Type 2 and between
! Type 3 and Type 4 filters are necessary
! because integer division (bit-shifting) is being used, and
so the filters are non-linear:
! a Type 1 or Type 3 filter with taps $t_i$ is {em not}
equivalent to
! an Type 2 or Type 4 filter with taps $-t_i$.
!
! Edge extension is used where the filter would otherwise
extend beyond the
! boundaries of the array. This is slightly different
between Types 1 and 2 on the
! one hand and Types 3 and 4 on the other. This is because
even values and
! odd values must be extended separately to maintain the
correct phase (and hence invertibility of the filter). For
example, a Type 1 filter must use the values 1 and
$length(A)-1$ at the edges because (as the length is even)
these are the odd values nearest the edges.
!
! Further information on wavelet filtering and lifting is
provided in Appendix
! ref.
!
! subsubsection{Lifting filter parameters}
label
! The lifting filters and filter bit-shift operations that
apply for each value
! $WaveletIndex$ shall be as specified in Tables
ref to ref
! below.
! begin[h]
begin{|l|}
***************
*** 279,285 ****
Lifting steps: \
begin
! 1. Type 2, $s=2, t_0=1, t_1=1$ i.e. \
quad $ A[2*n] -= (A[2*n-1]+A[2*n+1]+2)gg 2$ \
! 2. Type 3, $s=4$, $t_=-1, t_0=9, t_1=9, t_2=-1$ i.e.
\
quad $ A[2*n+1] +=
(-A[2*n-2]+9*A[2*n]+9*A[2*n+2]-A[2*n+4]+8)gg 4$
end
--- 283,289 ----
Lifting steps: \
begin
! 1. Type 2, $S=2, L=2, D=0, taps=[1,1]$ i.e. \
quad $ A[2*n] -= (A[2*n-1]+A[2*n+1]+2)gg 2$ \
! 2. Type 3, $S=4, L=4, D=-1, taps=[-1,9,9,-1]$ i.e. \
quad $ A[2*n+1] +=
(-A[2*n-2]+9*A[2*n]+9*A[2*n+2]-A[2*n+4]+8)gg 4$
end
***************
*** 290,297 ****
end
! caption{$WaveletIndex==0$: Deslauriers-Debuc (9,5)
lifting stages and shift values}label
end
! begin[!ht]
begin{|l|}
--- 294,301 ----
end
! caption{$WaveletIndex==0$: Deslauriers-Debuc (9,7)
lifting stages and shift values}label
end
! begin[h]
begin{|l|}
***************
*** 300,306 ****
begin
! 1. Type 2, $s=2, t_0=1, t_1=1$ i.e. \
quad $ A[2*n] -= (A[2*n-1]+A[2*n+1]+2)gg 2$ \
! 2. Type 3, $s=1$, $t_0=1, t_1=1$ i.e. \
quad $ A[2*n+1] += (A[2*n]+A[2*n+2]+1)gg 1$
end
--- 304,310 ----
begin
! 1. Type 2, $S=2, L=2, D=0, taps=[1,1]$ i.e. \
quad $ A[2*n] -= (A[2*n-1]+A[2*n+1]+2)gg 2$ \
! 2. Type 3, $S=1, L=2, D=0, taps=[1,1]$ i.e. \
quad $ A[2*n+1] += (A[2*n]+A[2*n+2]+1)gg 1$
end
***************
*** 314,318 ****
end
! begin[!ht]
begin{|l|}
--- 318,322 ----
end
! begin[h]
begin{|l|}
***************
*** 320,326 ****
Lifting steps: \
begin
! 1. Type 2, $s=5, t_=-1, t_0=9, t_1=9, t_2=-1$ i.e. \
quad $ A[2*n] -=
(-A[2*n-3]+9*A[2*n-1]+9*A[2*n+1]+A[2*n+3]+16)gg 5$ \
! 2. Type 3, $s=4, t_=-1, t_0=9, t_1=9, t_2=-1$ i.e. \
quad $ A[2*n+1] +=
(-A[2*n-2]+9*A[2*n]+9*A[2*n+2]+A[2*n+4]+8)gg 4$
end
--- 324,330 ----
Lifting steps: \
begin
! 1. Type 2, $S=5, L=4, D=-1, taps=[-1,9,9,-1]$ i.e. \
quad $ A[2*n] -=
(-A[2*n-3]+9*A[2*n-1]+9*A[2*n+1]+A[2*n+3]+16)gg 5$ \
! 2. Type 3, $S=4, L=4, D=-1, taps=[-1,9,9,-1]$ i.e. \
quad $ A[2*n+1] +=
(-A[2*n-2]+9*A[2*n]+9*A[2*n+2]+A[2*n+4]+8)gg 4$
end
***************
*** 331,338 ****
end
! caption{$WaveletIndex==2$: Deslauriers-Debuc (13,5)
lifting stages and shift values}
end
! begin[!ht]
begin{|l|}
--- 335,342 ----
end
! caption{$WaveletIndex==2$: Deslauriers-Debuc (13,7)
lifting stages and shift values}
end
! begin[h]
begin{|l|}
***************
*** 340,346 ****
Lifting steps:\
begin
! 1. Type 2, $s=1, t_1=1$ i.e. \
quad $A[2*n] -= (A[2*n+1]+1)gg 1$ \
! 2. Type 3, $s=0, t_0=1$ i.e. \
quad $ A[2*n+1] += A[2*n]$
end
--- 344,350 ----
Lifting steps:\
begin
! 1. Type 2, $S=1, L=1, D=1, taps=[1]$ i.e. \
quad $A[2*n] -= (A[2*n+1]+1)gg 1$ \
! 2. Type 3, $S=0, L=1, D=0, taps=[1]$ i.e. \
quad $ A[2*n+1] += A[2*n]$
end
***************
*** 354,358 ****
end
! begin[!ht]
begin{|l|}
--- 358,362 ----
end
! begin[h]
begin{|l|}
***************
*** 360,366 ****
Lifting steps:\
begin
! 1. Type 2, $s=1, t_1=1$ i.e. \
quad $A[2*n] -= (A[2*n+1]+1)gg 1$ \
! 2. Type 3, $s=0, t_0=1$ i.e. \
quad $ A[2*n+1] += A[2*n]$
end
--- 364,370 ----
Lifting steps:\
begin
! 1. Type 2, $S=1, L=1, D=1, taps=[1]$ i.e. \
quad $A[2*n] -= (A[2*n+1]+1)gg 1$ \
! 2. Type 3, $S=0, L=1, D=0, taps=[1]$ i.e. \
quad $ A[2*n+1] += A[2*n]$
end
***************
*** 374,407 ****
end
! begin[!ht]
! begin{|l|}
!
! hline
! Lifting steps:\
!
! begin
! 1. Type 2, $s=1, t_1=1$ i.e. \
! quad $A[2*n] -= (A[2*n+1]+1)gg 1$ \
! 2. Type 3, $s=0, t_0=1$ i.e. \
! quad $ A[2*n+1] += A[2*n]$
! end
! \
! \
! $filtershift()$ returns 2\
! hline
!
! end
! caption{$WaveletIndex==5$: Haar filter with double
shift}
! end
!
! begin[!ht]
begin{|l|}
hline
Lifting steps:\
begin
! 1. Type 3, $s=8, t_=-2, t_=10, t_=-25, t_0=81,
t_1=81, t_2=-25, t_3=10, t_4=-2$ i.e. \
$ begin A[2*n+1] & += &
(-2*(A[2*n-6]+A[2*n+8])+10*(A[2*n-4]+A[2*n+6])\
& &
-25*(A[2*n-2]+A[2*n+4])+81*(A[2*n]+A[2*n+2])+128)gg 8
end$ \
! 1. Type 2, $s=8, t_=-8, t_=21, t_=-46,
t_0=161, t_1=161, t_2=-46, t_3=21, t_4=-8$ i.e. \
$ beginA[2*n] & -= &
(-8*(A[2*n-7]+A[2*n+7])+21*(A[2*n-5]+A[2*n+5]) \
& &
-46*(A[2*n-3]+A[2*n+3])+161*(A[2*n-1]+A[2*n+1])+128)gg 8
end$
--- 378,390 ----
end
! begin[h]
begin{|l|}
hline
Lifting steps:\
begin
! 1. Type 3, $S=8, L=8, D=-3,
taps=[]-2,10,-25,81,81,-25,10,-2]$ i.e. \
$ begin A[2*n+1] & += &
(-2*(A[2*n-6]+A[2*n+8])+10*(A[2*n-4]+A[2*n+6])\
& &
-25*(A[2*n-2]+A[2*n+4])+81*(A[2*n]+A[2*n+2])+128)gg 8
end$ \
! 1. Type 2, $S=8, L=8, D=-3,
taps=[-8,21,-46,161,161,-46,21,-8]$ i.e. \
$ beginA[2*n] & -= &
(-8*(A[2*n-7]+A[2*n+7])+21*(A[2*n-5]+A[2*n+5]) \
& &
-46*(A[2*n-3]+A[2*n+3])+161*(A[2*n-1]+A[2*n+1])+128)gg 8
end$
***************
*** 413,420 ****
end
! caption{$WaveletIndex==6$: Fidelity filter for improved
downconversion and anti-aliasing}
end
! begin[!ht]
begin{|l|}
--- 396,403 ----
end
! caption{$WaveletIndex==5$: Fidelity filter for improved
downconversion and anti-aliasing}
end
! begin[h]
begin{|l|}
***************
*** 422,432 ****
Lifting steps:\
begin
! 1. Type 2, $s=12, t_0=1817, t_1=1817$ i.e. \
quad $A[2*n] -= (1817*A[2*n-1]+1817*A[2*n+1]+2048)gg
12$ \
! 2. Type 4, $s=12, t_0=3616, t_1=3616$ i.e. \
quad $ A[2*n+1] -= (3616*A[2*n]+3616*A[2*n+2]+2048)gg
12$ \
! 3. Type 1, $s=12, t_0=217, t_1=217$ i.e. \
quad $A[2*n] += (217*A[2*n-1]+217*A[2*n+1]+2048)gg 12$
\
! 4. Type 3, $s=12, t_0=6497, t_1=6497$ i.e. \
quad $ A[2*n+1] += (6497*A[2*n]+6497*A[2*n+2]+2048)gg
12$
end
--- 405,415 ----
Lifting steps:\
begin
! 1. Type 2, $S=12, L=2, D=0, taps=[1817,1817]$ i.e. \
quad $A[2*n] -= (1817*A[2*n-1]+1817*A[2*n+1]+2048)gg
12$ \
! 2. Type 4, $S=12, L=2, D=0, taps=[3616,3616]$i.e. \
quad $ A[2*n+1] -= (3616*A[2*n]+3616*A[2*n+2]+2048)gg
12$ \
! 3. Type 1, $S=12, L=2, D=0, taps=[217,217]$ i.e. \
quad $A[2*n] += (217*A[2*n-1]+217*A[2*n+1]+2048)gg 12$
\
! 4. Type 3, $S=12, L=2, D=0, taps=[6497,6497]$ i.e. \
quad $ A[2*n+1] += (6497*A[2*n]+6497*A[2*n+2]+2048)gg
12$
end
***************
*** 437,464 ****
end
! caption{$WaveletIndex==7$: Integer lifting approximation
to Daubechies (9,7)}label
end
-
- begin
- This specification contains an implementation of the
Daubechies (9,7) filter
- ($WaveletIndex==7$). Daubechies (9,7), like any other FIR
biorthogonal wavelet, possesses a lifting
- implementation. However, to produce a perfect
reconstruction filter, the lifting stages
- require real-valued filter taps, and a final coefficient
scaling stage. Any realisable implementation
- is therefore an approximation. The implementation
specified here is fully integral, yet (other than omitting
- the final scaling stages), it is a very close
approximation. Unlike the JPEG2000 implementation,
- these filters can therefore be used for lossless as well
as lossy compression, and lossy
- compression performance is near-indentical to the
real-valued filter. The integer lifting implementation
- also allows for much more efficient implementation.
- end
-
clearpage
subsubsection{Removal of IDWT pad values}
! label
! This section defines the decoding process
$idwt_pad_removal(pic, c)$. This
! is invoked subsequent to $idwt_synthesis()$.
! Subband data elements have been padded to ensure that the
reconstructed
! data array $pic$ has dimensions divisible by
$2^TransformDepth$.
Values $width$ and $height$ are defined to be the
appropriate dimensions
--- 420,434 ----
end
! caption{$WaveletIndex==6$: Integer lifting approximation
to Daubechies (9,7)}label
end
clearpage
subsubsection{Removal of IDWT pad values}
! label
! This section defines the decoding process
$idwt_pad_removal(pic, c)$
! for removing extraneous values after performing the IDWT.
! Section ref requires that subband coefficient
data arrays are padded to ensure that
! the reconstructed data array $pic$ has dimensions
divisible by $2^TransformDepth$.
Values $width$ and $height$ are defined to be the
appropriate dimensions
***************
*** 485,488 ****
end
! are discarded and $pic$ is resized to have width $width$
and height $height$.
--- 455,458 ----
end
! shall be discarded and $pic$ shall be resized to have
width $width$ and height $height$.
Index: state-macros.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/state-macros.tex,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** state-macros.tex 5 Nov 2007 16:33:30 -0000 1.26
--- state-macros.tex 8 Nov 2007 16:46:19 -0000 1.27
***************
*** 106,109 ****
--- 106,118 ----
kdefine
kdefine
+ kdefine
+ kdefine
+ kdefine
+ kdefine
+ kdefine
+ kdefine
+ kdefine
+ kdefine
+
kdefine
kdefine
Index: lifting.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/lifting.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lifting.tex 5 Jul 2007 14:13:57 -0000 1.2
--- lifting.tex 8 Nov 2007 16:46:19 -0000 1.3
***************
*** 1,4 ****
This is an informative appendix introducing the
fundamentals of wavelet
! filtering and the lifting scheme. For a fuller explanation
see ?.
subsection{Wavelet filter banks}
--- 1,5 ----
+ label
This is an informative appendix introducing the
fundamentals of wavelet
! filtering and the lifting scheme.
subsection{Wavelet filter banks}
Index: dataenc.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/dataenc.tex,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** dataenc.tex 5 Nov 2007 16:33:30 -0000 1.19
--- dataenc.tex 8 Nov 2007 16:46:19 -0000 1.20
***************
*** 172,182 ****
end{equation*}
! A table of encodings of the first 10 values is shown in
Figure ref.
! begin[!ht]]
centering
! begin{l|c}
! Bit sequence & Decoded value \
! hline\
1 & 0\
0 0 1 & 1\
--- 172,183 ----
end{equation*}
! Table ref{table:uegolcodings} shows encodings of the
values 0--9 is shown.
! begin[!ht]
centering
! begin{|l|c|}
! hline
! rowcolor[gray]{0.75}Bit sequence & Decoded value \
! hline
1 & 0\
0 0 1 & 1\
***************
*** 189,197 ****
0 0 0 0 0 1 1 & 8\
0 0 0 1 0 0 1 & 9\
end
caption{Example conversions from unsigned interleaved
exp-Golomb-coded
! values to unsigned integers label}
! end
Although apparently complex, the interleaving ensures that
the code has a very simple decoding loop.
--- 190,199 ----
0 0 0 0 0 1 1 & 8\
0 0 0 1 0 0 1 & 9\
+ hline
end
caption{Example conversions from unsigned interleaved
exp-Golomb-coded
! values to unsigned integers label{table:uegolcodings}}
! end
Although apparently complex, the interleaving ensures that
the code has a very simple decoding loop.
***************
*** 242,252 ****
The code for the signed interleaved exp-Golomb data format
consists of the
unsigned interleaved exp-Golomb code for the magnitude,
followed by a sign bit
! for non-zero values (Figure ref).
! begin[!ht]
centering
! begin{l|c}
! Bit sequence & Decoded value \
! hline\
0 0 0 1 1 1 & -4\
0 0 0 0 1 1 & -3\
--- 244,255 ----
The code for the signed interleaved exp-Golomb data format
consists of the
unsigned interleaved exp-Golomb code for the magnitude,
followed by a sign bit
! for non-zero values (Table ref{table:segolcodings}).
! begin[!ht]
centering
! begin{|l|c|}
! hline
! rowcolor[gray]{0.75}Bit sequence & Decoded value \
! hline
0 0 0 1 1 1 & -4\
0 0 0 0 1 1 & -3\
***************
*** 258,266 ****
0 0 0 0 1 0 & 3\
0 0 0 1 1 0 & 4\
end
caption{Example conversions from signed interleaved
exp-Golomb-coded values
! to signed integers label}
! end
The decoding operation is as follows.
--- 261,270 ----
0 0 0 0 1 0 & 3\
0 0 0 1 1 0 & 4\
+ hline
end
caption{Example conversions from signed interleaved
exp-Golomb-coded values
! to signed integers label{table:segolcodings}}
! end
The decoding operation is as follows.
Index: picture-dec.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/picture-dec.tex,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** picture-dec.tex 5 Nov 2007 16:33:30 -0000 1.14
--- picture-dec.tex 8 Nov 2007 16:46:19 -0000 1.15
***************
*** 6,58 ****
label
subsection{Overall picture decoding process}
label
- subsubsection{Picture data initialisation}
- label
-
Picture data from the current picture being decoded is
stored in the $CurrentPicture$ state
! variable, which is a structure with indices $pic_num$,
$Y$, $C1$ and $C2$ representing
! luma and chroma data (typically Y, Cb and Cr, although
other formats are supported too -- see
! Appendix ref).
!
!
! The $init_picture_data()$ initialises the current
picture data so that:
! begin
! item $CurrentPicture[pic_num]=PictureNumber$
! item $CurrentPicture[Y]$ is a 2-dimensional array of
width $LumaWidth$ and height $LumaHeight$,
! all values $CurrentPicture[Y][y][x]$ set to 0
! item $CurrentPicture[C1]$ and $CurrentPicture[C2]$ are
2-dimensional arrays of width $ChromaWidth$ and height
$ChromaHeight$,
! all values $CurrentPicture[C1][y][x]$ and
$CurrentPicture[C2][y][x]$ set to 0
! end
!
! subsubsection{Decoding process}
! label
! The process for decoding a picture within a Dirac sequence
can commence
! when:
! begin
! item a sequence header has been located, and parsed, and
the default parameters set, and
! item a picture data unit has been located and parsed,
overriding default parameters, and
! item all reference pictures for the current picture have
been decoded
! end
! Decoding a picture with picture number
! $n=PictureNumber$ in a Dirac sequence consists of:
begin{}
bsIF{is_ref(()}
bsCODE{ref_buffer_remove()}
bsEND
- bsCODE{init_picture_data()}
bsIF{ZeroResidual==false}
!
bsCODE{CurrentPicture[Y]=idwt(YTransform)}
!
bsCODE{CurrentPicture[C1]=idwt(COneTransform)}
!
bsCODE{CurrentPicture[C2]=idwt(CTwoTransform)}
bsEND
bsIF{is_inter()}
! bsCODE{ref1=get_ref(RefOneNum)}
bsIF{num_refs()==2}
! bsCODE{ref2=get_ref(RefTwoNum)}
bsEND
bsCODE{motion_compensate(ref1[Y], ref2[Y],
CurrentPicture[Y], c)}
--- 6,39 ----
label
+ This section defines the processes for decoding a picture
from a Dirac stream.
+ Picture decoding depends upon correctly parsing the
stream, and decoding operations
+ are dependent on decoding the sequence header and picture
metadata
+ (Section ref and ref) and
unpacking the coefficient
+ and motion data (Sections ref and
ref).
+
subsection{Overall picture decoding process}
label
Picture data from the current picture being decoded is
stored in the $CurrentPicture$ state
! variable, which is a map with labels $pic_num$, and $Y$,
$C1$ and $C2$ representing
! luma and chroma data.
! After decoding the decoded picture is returned to the
decoding application.
! The $picture_decode()$ process shall be invoked after
parsing the $picture_parse()$ process and shall be defined
as follows:
begin{}
+ bsCODE{CurrentPicture={}}
+ bsCODE{CurrentPicture[pic_num]=PictureNumber}
bsIF{is_ref(()}
bsCODE{ref_buffer_remove()}
bsEND
bsIF{ZeroResidual==false}
! bsCODE{ref{}}
bsEND
bsIF{is_inter()}
! bsCODE{ref1=get_ref(RefOneNum)}
bsIF{num_refs()==2}
!
bsCODE{ref2=get_ref(RefTwoNum)}
bsEND
bsCODE{motion_compensate(ref1[Y], ref2[Y],
CurrentPicture[Y], c)}
***************
*** 68,79 ****
end
begin
! When randomly accessing a sequence, a picture may not be
decodeable because reference pictures
! may not be available in the buffer. In this case the
current picture may be discarded, although some
! decoders may be designed to produce an output.
! Picture numbers within the stream may not be in numerical
order, and subsequent reordering may be
! required: the size of the decoded picture buffer required
to perform any such reordering is specified
! as part of the application profile and level (Appendix
ref).
end
--- 49,63 ----
end
+
begin
! When randomly accessing a sequence, a picture may not be
decodeable
! because reference pictures may not be available in the
buffer. In this case the
! current picture may be discarded, although some decoders
may be designed to
! produce an output.
! Picture numbers within the stream may not be in numerical
order, and
! subsequent reordering may be required: the size of the
decoded picture buffer
! required to perform any such reordering is specified as
part of the application profile
! and level (Appendix ref).
end
***************
*** 115,121 ****
a copy of $CurrentPicture$.
-
-
- subsection{Inverse discrete wavelet transform}
input
--- 99,102 ----
Index: wlt-unpacking.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/wlt-unpacking.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wlt-unpacking.tex 5 Nov 2007 16:33:30 -0000 1.2
--- wlt-unpacking.tex 8 Nov 2007 16:46:19 -0000 1.3
***************
*** 675,681 ****
%% Table of context sets for signed coefficient extraction
%%
begin[!ht]
! begin{|c|c|c||l|l|}
hline
! $zero_parent$ & $zero_nhood$ & $sign_pred$
& multicolumn{c|}{bf{Context map}} \
% Zero parent, zero neighbour, zero sign prediction
--- 675,681 ----
%% Table of context sets for signed coefficient extraction
%%
begin[!ht]
! begin{|c|c|c|l|l|}
hline
! rowcolor[gray]{0.75} $zero_parent$ & $zero_nhood$
& $sign_pred$ &
multicolumn{c|}{cellcolor[gray]{0.75}bf{Context map}}
\
% Zero parent, zero neighbour, zero sign prediction
Index: bs-spec.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/bs-spec.tex,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** bs-spec.tex 5 Nov 2007 16:33:30 -0000 1.32
--- bs-spec.tex 8 Nov 2007 16:46:19 -0000 1.33
***************
*** 200,204 ****
begin{|c|c|l|c|}
hline
! multicolumn{|c|}{bf Generic} \
hline
0x00 & 0000 0000 & Sequence header &--\
--- 200,207 ----
begin{|c|c|l|c|}
hline
! rowcolor[gray]{0.75}
! ParseCode & {bf Bits} & {bf Description} &
begin {bf Number of}\ {bf Reference}\{bf
Pictures}end\
! hline
! multicolumn{|c|}{cellcolor[gray]{0.85}bf Generic}\
hline
0x00 & 0000 0000 & Sequence header &--\
***************
*** 210,216 ****
0x30 & 0011 0000 & Padding data & -- \
hline
! multicolumn{|c|}{bf Core syntax} \
! hline
! ParseCode & {bf Bits} & {bf Description} &
begin {bf Number of}\ {bf Reference}\{bf
Pictures}end\
hline
0x0C & 0000 1100 & Intra Reference Picture
(arithmetic coding) & 0\
--- 213,217 ----
0x30 & 0011 0000 & Padding data & -- \
hline
! multicolumn{|c|}{cellcolor[gray]{0.85}bf Core
syntax}\
hline
0x0C & 0000 1100 & Intra Reference Picture
(arithmetic coding) & 0\
***************
*** 238,244 ****
0x4A & 0100 1010 & Inter Non Reference Picture (no
arithmetic coding)& 2\
hline
! multicolumn{|c|}{bf Low-delay syntax} \
! hline
! ParseCode & {bf Bits} & {bf Description} &
begin {bf Number of}\ {bf Reference}\{bf
Pictures}end\
hline
0xCC & 1100 1100 & Intra Reference Picture &
0\
--- 239,243 ----
0x4A & 0100 1010 & Inter Non Reference Picture (no
arithmetic coding)& 2\
hline
! multicolumn{|c|}{cellcolor[gray]{0.85}bf Low-delay
syntax}\
hline
0xCC & 1100 1100 & Intra Reference Picture &
0\
***************
*** 329,333 ****
end{informative*}
! section{Sequence parameters}
label
--- 328,332 ----
end{informative*}
! section{Sequence header}
label
***************
*** 440,444 ****
begin{|c|c|}
hline
! Video format index & Video format description \
hline
0 & Custom Format\
--- 439,443 ----
begin{|c|c|}
hline
! rowcolor[gray]{0.75}Video format index & Video format
description \
hline
0 & Custom Format\
***************
*** 562,566 ****
begin{|c|c|}
hline
! sampling_format_index & {bf Chroma format} \
hline
0 & 4:4:4 \
--- 561,565 ----
begin{|c|c|}
hline
! rowcolor[gray]{0.75}sampling_format_index & {bf
Chroma format} \
hline
0 & 4:4:4 \
***************
*** 623,627 ****
end
! The decoded value of $index$ shall fall in the range 0 to
8.
For $index>0$,
$preset_frame_rate(VideoParams,index)$ shall set frame
rate
--- 622,626 ----
end
! The decoded value of $index$ shall fall in the range 0 to
10.
For $index>0$,
$preset_frame_rate(VideoParams,index)$ shall set frame
rate
***************
*** 633,637 ****
begin{|c|c|c|}
hline
! $index$ & Numerator & Denominator \
hline
1 & 24000 & 1001 \
--- 632,636 ----
begin{|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & Numerator &
Denominator \
hline
1 & 24000 & 1001 \
***************
*** 651,654 ****
--- 650,657 ----
8 & 60 & 1 \
hline
+ 9 & 15000 & 1001 \
+ hline
+ 10 & 25 & 2 \
+ hline
end
caption{Available preset frame rate
values}label{table:frameratevalues}
***************
*** 684,688 ****
begin{|c|c|c|}
hline
! $index$ & Numerator & Denominator \
hline
1 (Square Pixels) & 1 & 1 \
--- 687,691 ----
begin{|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & Numerator &
Denominator \
hline
1 (Square Pixels) & 1 & 1 \
***************
*** 768,772 ****
begin{|c|c|c|c|c|}
hline
! $index$ & Luma offset & Luma excursion &
Chroma offset & Chroma excursion\
hline
1 (8 Bit Full Range) & 0 & 255 & 128 &
255\
--- 771,775 ----
begin{|c|c|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & Luma offset & Luma
excursion & Chroma offset & Chroma excursion\
hline
1 (8 Bit Full Range) & 0 & 255 & 128 &
255\
***************
*** 822,826 ****
begin{|c|c|c|c|c|}
hline
! $index$ & {bf Description} & {bf
Primaries} & {bf Matrix} & {bf Transfer
function}\
hline
0 & Custom & HDTV & HDTV & TV gamma \
--- 825,829 ----
begin{|c|c|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & {bf Description}
& {bf Primaries} & {bf Matrix} &
{bf Transfer function}\
hline
0 & Custom & HDTV & HDTV & TV gamma \
***************
*** 861,865 ****
begin{|c|c|c|c|}
hline
! $index$ & {bf Description} & {bf Specification}
& {bf Comment} \
hline
0 & HDTV & ITU-R BT.709 & Also
Computer, Web, sRGB \
--- 864,868 ----
begin{|c|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & {bf Description}
& {bf Specification} & {bf Comment} \
hline
0 & HDTV & ITU-R BT.709 & Also
Computer, Web, sRGB \
***************
*** 898,902 ****
begin{|c|c|c|c|c|}
hline
! $index$ & {bf Description} & {bf Specification}
& {bf Colour matrix} & {bf Comment}\
hline
0 & HDTV & ITU-R BT.709 & $K_R=0.2126$,
$K_B=0.0722$ & Also computer and web\
--- 901,905 ----
begin{|c|c|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & {bf Description}
& {bf Specification} & {bf Colour matrix} &
{bf Comment}\
hline
0 & HDTV & ITU-R BT.709 & $K_R=0.2126$,
$K_B=0.0722$ & Also computer and web\
***************
*** 931,935 ****
begin{|c|c|c|}
hline
! $index$ & {bf Description} & {bf
Specification}\
hline
0 & TV gamm & ITU-R BT.1361\
--- 934,938 ----
begin{|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & {bf Description} &
{bf Specification}\
hline
0 & TV gamm & ITU-R BT.1361\
***************
*** 1028,1032 ****
section{Picture syntax}
!
This section specifies the structure of Dirac picture data
units.
--- 1031,1035 ----
section{Picture syntax}
! label
This section specifies the structure of Dirac picture data
units.
***************
*** 1150,1156 ****
begin{|c|c|c|c|c|}
hline
! & multicolumn{|c|}{{bf Block
parameters}}\
! hline
! $index$ & LumaXBlen & LumaYBlen &
LumaXBsep & LumaYBsep \
hline
1 & 8 & 8 & 4 & 4 \
--- 1153,1157 ----
begin{|c|c|c|c|c|}
hline
! rowcolor[gray]{0.75}$index$ & LumaXBlen &
LumaYBlen & LumaXBsep & LumaYBsep \
hline
1 & 8 & 8 & 4 & 4 \
***************
*** 1420,1424 ****
begin{|c|c|}
hline
! WaveletIndex & {bf Filter} \
hline
0 & Deslauriers-Debuc (9,7) \
--- 1421,1425 ----
begin{|c|c|}
hline
! rowcolor[gray]{0.75}WaveletIndex & {bf Filter} \
hline
0 & Deslauriers-Debuc (9,7) \
***************
*** 1496,1500 ****
begin{|c|c|}
hline
! $CodeblockMode$ & {bf Description} \
hline
0 & Single quantiser per subband, used for all
codeblocks\
--- 1497,1501 ----
begin{|c|c|}
hline
! rowcolor[gray]{0.75}$CodeblockMode$ & {bf
Description} \
hline
0 & Single quantiser per subband, used for all
codeblocks\
Index: layout-fullsize.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/layout-fullsize.tex,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** layout-fullsize.tex 5 Nov 2007 16:33:30 -0000 1.23
--- layout-fullsize.tex 8 Nov 2007 16:46:19 -0000 1.24
***************
*** 1,4 ****
--- 1,7 ----
documentclass[a4paper,9pt]
+ usepackage
usepackage
+ usepackage
+ usepackage
usepackage
usepackage
***************
*** 16,22 ****
addtolengthtextheight{1.5in}
setlengthoddsidemargin
! setlengthmarginparwidth{1.25in}
setlengthtextwidth
! addtolengthtextwidth{-1.25in}
addtolengthtextwidth
addtolengthtextwidth
--- 19,27 ----
addtolengthtextheight{1.5in}
setlengthoddsidemargin
! %setlengthmarginparwidth{1.25in}
! setlengthmarginparwidth{1.0in}
setlengthtextwidth
! %addtolengthtextwidth{-1.25in}
! addtolengthtextwidth{-1.0in}
addtolengthtextwidth
addtolengthtextwidth
***************
*** 79,82 ****
--- 84,90 ----
definecolor{1,0,0}
+ counterwithin
+ counterwithin
+
makeindex
***************
*** 126,134 ****
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
setcounter
! hspace{0.5in}
! begin{|m{4.2in}m{0.0in}|m{0.4in}|}
% firstline is function definition
hline
! text{$#1(#2)$} : & & %textbf
}
{ % last line is end of function
--- 134,143 ----
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
setcounter
! hspace{0.2in}
! begin{|mm{0.0in}|m{0.4in}|}
% firstline is function definition
hline
! text{cellcolor[gray]{0.75}$#1(#2)$} :
&cellcolor[gray]{0.75} &
! {cellcolor[gray]{0.75}textbf}
}
{ % last line is end of function
***************
*** 179,184 ****
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
setcounter
! hspace{0.5in}
! begin{|m{4.2in}m{0.0in}|m{0.4in}|}
hline
--- 188,193 ----
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
setcounter
! hspace{0.2in}
! begin{|mm{0.0in}|m{0.4in}|}
hline
Index: vidsys.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/vidsys.tex,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** vidsys.tex 5 Nov 2007 16:33:30 -0000 1.12
--- vidsys.tex 8 Nov 2007 16:46:19 -0000 1.13
***************
*** 355,517 ****
unsuitable values.
! end{informative*}
!
! subsection{Source parameter presets}
! label
!
! Source parameters are signalled using a range of preset
indices into the following
! tables, as specified in Section ref.
Their correct
! interpretation by a display device is described in
Appendix ref.
!
! begin[!ht]
! centering
! begin{|c|c|c|}
! hline
! $index$ & $frame_rate_numer$ &
$frame_rate_denom$ \
! hline
! 1 & 24000 & 1001 \
! hline
! 2 & 24 & 1 \
! hline
! 3 & 25 & 1 \
! hline
! 4 & 30000 & 1001 \
! hline
! 5 & 30 & 1 \
! hline
! 6 & 50 & 1 \
! hline
! 7 & 60000 & 1001 \
! hline
! 8 & 60 & 1 \
! hline
! end
! caption{Available preset frame rate
values}label{table:frameratevalues}
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|}
! hline
! $index$ & $aspect_ratio_numer$ &
$aspect_ratio_denom$ \
! hline
! 1 (Square Pixels) & 1 & 1 \
! hline
! 2 (525-line systems) & 10 & 11 \
! hline
! 3 (625-line systems) & 12 & 11 \
! hline
! end
! caption{Available preset aspect ratio
values}label{table:aspectratiovalues}
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|}
! hline
! $index$ & $luma_offset$ & $luma_excursion$ \
! hline
! 1 (8 Bit Full Range) & 0 & 255 \
! hline
! 2 (8 Bit Video) & 16 & 235 \
! hline
! 3 (10 Bit Video) & 64 & 876 \
! hline
! end
! caption{Luma signal range available
presets}label{table:lumasignalrangevalues}
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|}
! hline
! $index$ & $chroma_offset$ & $chroma_excursion$
\
! hline
! 1 (8 Bit Full Range) & 0 & 255 \
! hline
! 2 (8 Bit Video) & 0 & 224 \
! hline
! 3 (10 Bit Video) & 0 & 896 \
! hline
! end
! caption{Chroma signal range available
presets}label{table:chromasignalrangevalues}
! end
!
! begin
! The only presets available cover a full 8-bit range or 8-
or 10-bit SDI video ranges.
! If other video depths have been selected, custom signal
range parameters
! should be signalled, or the resulting video may have an
unintended appearance that
! affects video quality adversely on a display device.
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|c|c|}
! hline
! $index$ & {bf Description} & {bf
Primaries} & {bf Matrix} & {bf Transfer
function}\
! hline
! 0 & Custom & HDTV & HDTV & TV gamma \
! hline
! 1 & SDTV 525 & SDTV 525 & SDTV & TV gamma
\
! hline
! 2 & SDTV 625 & SDTV 625 & SDTV & TV gamma
\
! hline
! 3 & HDTV & HDTV & HDTV & TV gamma \
! hline
! 4 & Cinema & CIE XYZ & Reversible & DCI
Gamma \
! hline
! end
! caption{Colour specification
presets}label{table:colourspecvalues}
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|c|}
! hline
! $index$ & {bf Description} & {bf Specification}
& {bf Comment} \
! hline
! 0 & HDTV & ITU-R BT.709 & Also
Computer, Web, sRGB \
! hline
! 1 & SDTV 525 & ITU-R BT.601 & 525
primaries \
! hline
! 2 & SDTV 625 & ITU-R BT.601 & 625
primaries \
! hline
! 3 & Cinema & SMPTE 428.1 & CIE XYZ
\
! hline
! end
! caption{Colour primaries
presets}label{table:primariesvalues}
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|c|c|}
! hline
! $index$ & {bf Description} & {bf Specification}
& {bf Colour matrix} & {bf Comment}\
! hline
! 0 & HDTV & ITU-R BT.709 & $K_R=0.2126$,
$K_B=0.0722$ & Also computer and web\
! hline
! 1 & SDTV & ITU-R BT.601 & $K_R=0.299$,
$K_B=0.114$ & \
! hline
! 2 & Reversible & ITU-T H.264 & YCgCo & \
! hline
! end
! caption{Colour matrix presets}label{table:matrixvalues}
! end
!
! begin[!ht]
! centering
! begin{|c|c|c|}
! hline
! $index$ & {bf Description} & {bf
Specification}\
! hline
! 0 & TV gamm & ITU-R BT.1361\
! hline
! 1 & Extended Gamut & ITU-R BT.1361 1998 Annex 1\
! hline
! 2 & Linear & Linear\
! hline
! 3 & DCI Gamma & SMPTE 428.1\
! hline
! end
! caption{Transfer function
presets}label{table:transfervalues}
! end
--- 355,357 ----
unsuitable values.
! end{informative*}
No newline at end of file
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Dirac-commits mailing list
Dirac-commits lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dirac-com
mits
|