Update of /cvsroot/dirac/compress/doc/latex_spec
In directory
sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv11213
Modified Files:
arith.tex bs-spec.tex dataenc.tex idwt.tex intro.tex
layout-fullsize.tex low-delay.tex motion-dec.tex
picture-dec.tex spec-conventions.tex state-macros.tex
wlt-dec.tex
Log Message:
Removed mention of Y,U and V - instead use Y, C1 and C2.
Fixed bug with
biased rounding in IDWT, and fixed bug with ref2 motion
vector decoding.
Index: spec-conventions.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/spec-conventions.tex,
v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** spec-conventions.tex 4 Apr 2007 16:00:08 -0000 1.9
--- spec-conventions.tex 16 Apr 2007 15:42:50 -0000 1.10
***************
*** 153,162 ****
$13&6$ is $text&text$, which
equals $text$, or 4.
! paragraph*{$mathbf{|}$} Logical OR is applied between
the corresponding bits in the binary representation of two
numbers, e.g.
$13|6$ is $texttext{|}text$, which equals
$text$, or 15.
! paragraph*{$mathbf$} Logical XOR is applied
between the corresponding bits in the binary representation
of two numbers, e.g.
$13wedge 6$ is $textwedgetext$, which
equals $text$, or 11.
These operations are also defined on boolean values,
interpreted as single-bit integers,
where 0 is interpreted as $false$ and 1 as $true$ and
vice-versa. Logical NOT is
--- 153,164 ----
$13&6$ is $text&text$, which
equals $text$, or 4.
! paragraph*{${mathbf |}$} Logical OR is applied between
the corresponding bits in the binary representation of two
numbers, e.g.
$13|6$ is $texttext{|}text$, which equals
$text$, or 15.
! paragraph*{${mathbf wedge}$} Logical XOR is applied
between the corresponding bits in the binary representation
of two numbers, e.g.
$13wedge 6$ is $textwedgetext$, which
equals $text$, or 11.
+ paragraph*{!} Logical NOT is applied to all bits in the
representation of a number e.g. $!(b010)=b101$.
+
These operations are also defined on boolean values,
interpreted as single-bit integers,
where 0 is interpreted as $false$ and 1 as $true$ and
vice-versa. Logical NOT is
***************
*** 272,278 ****
A map is a set accessed by token names. For example
! $p[Y]$, $p[U]$, $p[V]$ might give the value of the
different video components
! (Y, U and V) of a pixel. The set of argument tokens of a
map $m$ can be accessed by $args(m)$,
! so that $args(p)={Y,U,V}$.
paragraph*
--- 274,280 ----
A map is a set accessed by token names. For example
! $p[Y]$, $p[C1]$, $p[C2]$ might give the value of the
different video components
! (Y, C1 and C2) of a pixel. The set of argument tokens of a
map $m$ can be accessed by $args(m)$,
! so that $args(p)={Y,C1,C2}$.
paragraph*
***************
*** 289,297 ****
These basic variable types may be combined. For example,
picture data may be considered
to be a map of arrays $pic$, where $pic[Y]$ is a
2-dimensional array storing luma data,
! and $pic[U]$ and $pic[V]$ are two-dimensional arrays
storing chroma data.
Variables within processes are not explicitly declared,
and their type is determined from
context or defined in the surrounding description.
Assignment between variables $a$ and $b$ is denoted by
$a=b$, and is a copy
operation between the data contained within $b$ to $a$.
--- 291,301 ----
These basic variable types may be combined. For example,
picture data may be considered
to be a map of arrays $pic$, where $pic[Y]$ is a
2-dimensional array storing luma data,
! and $pic[C1]$ and $pic[C2]$ are two-dimensional arrays
storing chroma data.
Variables within processes are not explicitly declared,
and their type is determined from
context or defined in the surrounding description.
+ paragraph*{Assignment and equality\}
+
Assignment between variables $a$ and $b$ is denoted by
$a=b$, and is a copy
operation between the data contained within $b$ to $a$.
***************
*** 314,318 ****
The pseudocode comprises a series of statements, linked by
functions and
! flow control statements such as if, while, and for.
The statements do not have a termination character, unlike
the ; in C
--- 318,322 ----
The pseudocode comprises a series of statements, linked by
functions and
! flow control statements such as {bf if}, {bf while}, and
{bf for}.
The statements do not have a termination character, unlike
the ; in C
***************
*** 366,370 ****
begin{pseudo*}
! bsFOREACH{Y,U,V}
bsCODE
bsEND
--- 370,374 ----
begin{pseudo*}
! bsFOREACH{Y,C1,C2}
bsCODE
bsEND
Index: dataenc.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/dataenc.tex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** dataenc.tex 11 Apr 2007 15:28:35 -0000 1.10
--- dataenc.tex 16 Apr 2007 15:42:50 -0000 1.11
***************
*** 401,405 ****
begin{index, context_set}
! bsCODE{pos= max(index, length(context_set[follow])-1 }
bsCODE{ctx_index = context_set[follow][pos]}
bsRET{AContexts[ctx_index]}
--- 401,405 ----
begin{index, context_set}
! bsCODE{pos= min(index, length(context_set[follow])-1 }
bsCODE{ctx_index = context_set[follow][pos]}
bsRET{AContexts[ctx_index]}
Index: motion-dec.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/motion-dec.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** motion-dec.tex 11 Apr 2007 15:28:35 -0000 1.13
--- motion-dec.tex 16 Apr 2007 15:42:50 -0000 1.14
***************
*** 36,40 ****
item A motion vector for reference 2, ${bf b}[ref2]$,
with integral horizontal element ${bf b}[ref2][0]$ and
vertical element ${bf b}[ref2][1]$
! item A set of integral DC values, ${bf b}[dc][Y]$, ${bf
b}[dc][U]$, and ${bf b}[dc][V]$ for each component
item A prediction mode, ${bf b}[mode]$, consisting of
two flags ${bf b}[mode][1]$ and ${bf b}[mode][2]$
indicating whether the corresponding reference is to be
used for predicting block $(i,j)$
--- 36,40 ----
item A motion vector for reference 2, ${bf b}[ref2]$,
with integral horizontal element ${bf b}[ref2][0]$ and
vertical element ${bf b}[ref2][1]$
! item A set of integral DC values, ${bf b}[dc][Y]$, ${bf
b}[dc][C1]$, and ${bf b}[dc][C2]$ for each component
item A prediction mode, ${bf b}[mode]$, consisting of
two flags ${bf b}[mode][1]$ and ${bf b}[mode][2]$
indicating whether the corresponding reference is to be
used for predicting block $(i,j)$
***************
*** 78,88 ****
bsCODE{vector_elements(1, 0)}
bsCODE{vector_elements(1, 1)}
! bsIF{NumRefs>0}
bsCODE{vector_elements(2,0)}
bsCODE{vector_elements(2,1)}
bsEND
bsCODE{dc_values(Y)}
! bsCODE{dc_values(U)}
! bsCODE{dc_values(V)}
end
--- 78,88 ----
bsCODE{vector_elements(1, 0)}
bsCODE{vector_elements(1, 1)}
! bsIF{NumRefs==2}
bsCODE{vector_elements(2,0)}
bsCODE{vector_elements(2,1)}
bsEND
bsCODE{dc_values(Y)}
! bsCODE{dc_values(C1)}
! bsCODE{dc_values(C2)}
end
***************
*** 203,207 ****
bsCODE{BlockData[ypos][xpos][mode][1]
wedge=mode_prediction(ypos, xpos,
1)}
bsIF{NumRefs == 2}
! bsCODE{pred_mode_residue =
read_boola(PredModeOne)}
bsCODE{BlockData[ypos][xpos][mode][2]
=pred_mode_residue}
bsCODE{BlockData[ypos][xpos][mode][2]wedge=
mode_prediction(ypos, xpos, 2)}
--- 203,207 ----
bsCODE{BlockData[ypos][xpos][mode][1]
wedge=mode_prediction(ypos, xpos,
1)}
bsIF{NumRefs == 2}
! bsCODE{pred_mode_residue =
read_boola(PredModeTwo)}
bsCODE{BlockData[ypos][xpos][mode][2]
=pred_mode_residue}
bsCODE{BlockData[ypos][xpos][mode][2]wedge=
mode_prediction(ypos, xpos, 2)}
***************
*** 509,513 ****
$BlockData[ypos-1][xpos][mode][ref]==true$
! then vector element
$BlockData[ypos-1][xpos][ref][dirn].x$ is returned.
item Otherwise, $0$ is returned
--- 509,513 ----
$BlockData[ypos-1][xpos][mode][ref]==true$
! then vector element $BlockData[ypos-1][xpos][ref][dirn]$
is returned.
item Otherwise, $0$ is returned
***************
*** 515,519 ****
{bf Case 4.} If both $xpos>0$ and $ypos>0$ then all
3 blocks in the prediction aperture may potentially
! contribute to the prediction. Define sets
$values=emptyset$. The prediction is the
median of the available vector elements:
--- 515,519 ----
{bf Case 4.} If both $xpos>0$ and $ypos>0$ then all
3 blocks in the prediction aperture may potentially
! contribute to the prediction. Define the set
$values=emptyset$. The prediction is the
median of the available vector elements:
Index: idwt.tex
============================================================
=======
RCS file: /cvsroot/dirac/compress/doc/latex_spec/idwt.tex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** idwt.tex 11 Apr 2007 15:28:35 -0000 1.10
--- idwt.tex 16 Apr 2007 15:42:50 -0000 1.11
***************
*** 124,128 ****
bsFOR{y=0}{height(synth)-1}
bsFOR{x=0}{width(synth)-1}
! bsCODE{synth[y][x] = synth[y][x]gg shift}
bsEND
bsEND
--- 124,128 ----
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
***************
*** 162,171 ****
item a scale factor $s$
item a parity (odd or even)
! item whether it is an ``update`` or ``predict`` filter
end
An even lifting filtering operation modifies 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{ (Update)} \
--- 162,170 ----
item a scale factor $s$
item a parity (odd or even)
! item whether it is an ``update" or ``predict"
filter
end
An even lifting filtering operation modifies 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{ (Update)} \
***************
*** 175,179 ****
An odd lifting filtering operation modifies 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{ (Update)} \
--- 174,177 ----
***************
*** 183,188 ****
begin
Note that the distinction between update and predict
filters is necessary
! because integer rounding is being used, and the filters
are non-linear.
! A predict filter with taps $t_i$ is not equivalent to an
update filter with taps $-t_i$.
end
--- 181,187 ----
begin
Note that the distinction between update and predict
filters is necessary
! because integer rounding is being used, and so the filters
are non-linear.
! In particular, a predict filter with taps $t_i$ is {em
not} equivalent to
! an update filter with taps $-t_i$.
end
***************
*** 252,274 ****
ref.
- 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. These filters can therefore
- (unlike the JPEG2000 implementation) be used for lossless
as well as lossy compression, whilst lossy
- compression performance is near-indentical to the
real-valued filter. The integer lifting implementaiton
- also allows for much more efficient implementation.
- end
-
-
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
! hline
begin
1. Even, Predict, $s=2, t_0=1, t_1=1$ i.e. \
--- 251,259 ----
ref.
begin[!ht]
! begin{|l|}
hline
! Lifting steps: \
begin
1. Even, Predict, $s=2, t_0=1, t_1=1$ i.e. \
***************
*** 277,281 ****
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
! & 1 \
hline
--- 262,268 ----
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
! \
! \
! $filtershift()$ returns 1\
hline
***************
*** 286,293 ****
begin[!ht]
! begin{|l|l|}
! hline
! {bf Lifting steps} & $filtershift()$ \
hline
begin
--- 273,279 ----
begin[!ht]
! begin{|l|}
hline
+ Lifting steps: \
begin
***************
*** 297,301 ****
quad $ A[2*n+1] += (A[2*n]+A[2*n+2]+1)gg 1$
end
! & 1 \
hline
--- 283,289 ----
quad $ A[2*n+1] += (A[2*n]+A[2*n+2]+1)gg 1$
end
! \
! \
! $filtershift()$ returns 1\
hline
***************
*** 305,312 ****
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
hline
begin
--- 293,300 ----
begin[!ht]
! begin{|l|}
hline
! Lifting steps: \
hline
begin
***************
*** 316,321 ****
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
!
! & 1 \
hline
--- 304,310 ----
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
! \
! \
! $filtershift()$ returns 1\
hline
***************
*** 325,333 ****
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
! hline
begin
1. Even, Predict, $s=1, t_1=1$ i.e. \
--- 314,321 ----
begin[!ht]
! begin{|l|}
hline
! Lifting steps:\
begin
1. Even, Predict, $s=1, t_1=1$ i.e. \
***************
*** 336,341 ****
quad $ A[2*n+1] += A[2*n]$
end
!
! & 0 \
hline
--- 324,330 ----
quad $ A[2*n+1] += A[2*n]$
end
! \
! \
! $filtershift()$ returns 0\
hline
***************
*** 345,353 ****
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
! hline
begin
1. Even, Predict, $s=1, t_1=1$ i.e. \
--- 334,341 ----
begin[!ht]
! begin{|l|}
hline
! Lifting steps:\
begin
1. Even, Predict, $s=1, t_1=1$ i.e. \
***************
*** 356,361 ****
quad $ A[2*n+1] += A[2*n]$
end
!
! & 1 \
hline
--- 344,350 ----
quad $ A[2*n+1] += A[2*n]$
end
! \
! \
! $filtershift()$ returns 1\
hline
***************
*** 365,373 ****
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
! hline
begin
1. Even, Predict, $s=1, t_1=1$ i.e. \
--- 354,362 ----
begin[!ht]
! begin{|l|}
hline
! Lifting steps:\
!
begin
1. Even, Predict, $s=1, t_1=1$ i.e. \
***************
*** 376,381 ****
quad $ A[2*n+1] += A[2*n]$
end
!
! & 2\
hline
--- 365,371 ----
quad $ A[2*n+1] += A[2*n]$
end
! \
! \
! $filtershift()$ returns 2\
hline
***************
*** 385,391 ****
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
hline
begin
--- 375,381 ----
begin[!ht]
! begin{|l|}
hline
! Lifting steps:\
hline
begin
***************
*** 397,401 ****
& &
-46*(A[2*n-3]+A[2*n+3])+161*(A[2*n-1]+A[2*n+1])+128)gg 8
end$
end
! & 0 \
hline
--- 387,393 ----
& &
-46*(A[2*n-3]+A[2*n+3])+161*(A[2*n-1]+A[2*n+1])+128)gg 8
end$
end
! \
! \
! $filtershift()$ returns 0\
hline
***************
*** 405,412 ****
begin[!ht]
! begin{|l|l|}
hline
! {bf Lifting steps} & $filtershift()$ \
hline
begin
--- 397,404 ----
begin[!ht]
! begin{|l|}
hline
! Lifting steps:\
hline
begin
***************
*** 420,424 ****
quad $ A[2*n+1] += (6497*A[2*n]+6497*A[2*n+2]+2048)gg
12$
end
! & 1 \
hline
--- 412,418 ----
quad $ A[2*n+1] += (6497*A[2*n]+6497*A[2*n+2]+2048)gg
12$
end
! \
! \
! $filtershift()$ returns 1\
hline
***************
*** 427,430 ****
--- 421,436 ----
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
subsection{Removal of IDWT pad values}
***************
*** 432,436 ****
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
--- 438,442 ----
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
***************
*** 446,450 ****
height & =& LumaHeight
end{eqnarray*}
! item else if $c=U$ or $c=V$,
begin{eqnarray*}
width & =& ChromaWidth \
--- 452,456 ----
height & =& LumaHeight
end{eqnarray*}
! item else if $c=C1$ or $c=C2$,
begin{eqnarray*}
width & =& ChromaWidth \
Index: state-macros.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/state-macros.tex,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** state-macros.tex 11 Apr 2007 15:28:35 -0000 1.17
--- state-macros.tex 16 Apr 2007 15:42:50 -0000 1.18
***************
*** 162,167 ****
kdefine
kdefine
! kdefine
! kdefine
kdefine
kdefine
--- 162,167 ----
kdefine
kdefine
! kdefine
! kdefine
kdefine
kdefine
Index: intro.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/intro.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** intro.tex 12 Sep 2006 08:45:53 -0000 1.1
--- intro.tex 16 Apr 2007 15:42:50 -0000 1.2
***************
*** 44,51 ****
This is version SpecVersion of the Dirac specification.
The document includes
! a full description of the core Dirac stream syntax and
decoder operations. It does
! not yet contain a specification of profiles and levels
supported by Dirac, or the
! compatible extensions required to support the Dirac Pro
toolset. These shall
! be added shortly.
subsection{Document structure}
--- 44,50 ----
This is version SpecVersion of the Dirac specification.
The document includes
! a full description of the core Dirac stream syntax and
decoder operations, together
! with compatible extensions to support low-delay operation
(professional profiles). It does
! not yet contain a full specification of profiles and
levels supported by Dirac.
subsection{Document structure}
***************
*** 68,81 ****
Parsing and interpretation defines the structure of Dirac
streams, and defines
! intermediate decoder data structures in which extracted
data is stored, which
! encapsulate {em both} meta-data used to control picture
decoding processes (for
! example, motion compensation block sizes and overlaps,
picture dimensions and
! so forth) {em and} the blocks of (arithmetically coded)
data used as input to
! these processes.
Picture decoding operations produce decoded pictures from
these populated
! data structures by applying specified functions to them.
They are not necessary
! for navigating the stream or reading any of the stream
data, but only
! for outputting pictures.
Note in particular that the distinction between parsing
and picture decoding is
--- 67,76 ----
Parsing and interpretation defines the structure of Dirac
streams, and defines
! intermediate decoder data structures in which extracted
data is stored,
! used to control picture decoding processes.
Picture decoding operations produce decoded pictures from
these populated
! data structures by applying specified functions to them.
These operations
! are logically distinct from those for navigating the
stream or reading the stream data.
Note in particular that the distinction between parsing
and picture decoding is
***************
*** 86,90 ****
and our purpose in doing so is to provide much greater
clarity. For implementors,
we hope that the decoupling of the stream structure from
the (computationally intensive)
! picture decoding processes will (we hope) avoid imposing
implicit design decisions merely through the style of the
specification. Many
other users of the specification will not be interested in
the precise format
--- 81,85 ----
and our purpose in doing so is to provide much greater
clarity. For implementors,
we hope that the decoupling of the stream structure from
the (computationally intensive)
! picture decoding processes will avoid imposing
implicit design decisions merely through the style of the
specification. Many
other users of the specification will not be interested in
the precise format
***************
*** 95,99 ****
This layered structure is reflected in the structure of
the specification,
! which, after defining conventions used in the
specification is divided into three
corresponding parts: stream data access, defining
functions for data types;
accessing and parsing the Dirac bitstream and populating
data
--- 90,94 ----
This layered structure is reflected in the structure of
the specification,
! which, after defining conventions used, is divided into
three
corresponding parts: stream data access, defining
functions for data types;
accessing and parsing the Dirac bitstream and populating
data
***************
*** 102,119 ****
inverse wavelet transform and motion compensation.
- begin
- This layered structure is reflected in the structure of
the specification,
- which is divided into four parts. The first part
introduces Dirac concepts,
- both informatively, in terms of describing Dirac video
coding processes, and
- normatively, in terms of defining terms, concepts and
conventions used
- throughout the specification.
-
- The second part defines stream data access functions for
data types. Part III
- deals with accessing, parsing the Dirac bitstream and
populating data
- structures, including the wavelet coefficient and motion
data.
-
- Part IV defines high-level decoder operations and picture
output, specifically the
- inverse wavelet transform and motion compensation.
- end
In addition to these parts, appendices deal with standard
settings, parameter
presets and levels and profiles.
No newline at end of file
--- 97,100 ----
Index: wlt-dec.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/wlt-dec.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** wlt-dec.tex 11 Apr 2007 15:28:35 -0000 1.20
--- wlt-dec.tex 16 Apr 2007 15:42:50 -0000 1.21
***************
*** 138,153 ****
If $level==0$,
begin{eqnarray*}
- subband_height(level) & = &
ph//2^ \
- & = &
leftlceilfrac{2^}rightrceil \
subband_width(level) & = &
pw//2^ \
! & = &
leftlceilfrac{2^}rightrceil
end{eqnarray*}
If $level>0$
begin{eqnarray*}
- subband_height(level) & = &
ph//2^{TransformDepth-level+1} \
- & = &
2^*leftlceilfrac{2^}rightr
ceil \
subband_width(level) & = &
pw//2^{TransformDepth-level+1} \
! & = & 2^*leftlceil
frac{2^}rightrceil
end{eqnarray*}
--- 138,153 ----
If $level==0$,
begin{eqnarray*}
subband_width(level) & = &
pw//2^ \
! & = &
leftlceilfrac{2^}rightrceil \
! subband_height(level) & = &
ph//2^ \
! & = &
leftlceilfrac{2^}rightrceil
end{eqnarray*}
If $level>0$
begin{eqnarray*}
subband_width(level) & = &
pw//2^{TransformDepth-level+1} \
! & = & 2^*leftlceil
frac{2^}rightrceil \
! subband_height(level) & = &
ph//2^{TransformDepth-level+1} \
! & = &
2^*leftlceilfrac{2^}rightr
ceil
end{eqnarray*}
***************
*** 172,176 ****
This section specifies the overall operation of the
$transform_data(comp)$ process
for parsing and decoding the set of coefficient subbands
corresponding
! to a video picture component (Y, U or V), according to the
conventions set out
in Section ref.
--- 172,176 ----
This section specifies the overall operation of the
$transform_data(comp)$ process
for parsing and decoding the set of coefficient subbands
corresponding
! to a video picture component (Y, C1 or C2), according to
the conventions set out
in Section ref.
***************
*** 268,272 ****
begin{pseudo*}
! bsIF{level>1}
bsCODE{parent = data[level-1][orient]}
bsELSE
--- 268,272 ----
begin{pseudo*}
! bsIF{level>=2}
bsCODE{parent = data[level-1][orient]}
bsELSE
Index: bs-spec.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/bs-spec.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** bs-spec.tex 11 Apr 2007 15:28:35 -0000 1.13
--- bs-spec.tex 16 Apr 2007 15:42:50 -0000 1.14
***************
*** 486,490 ****
end
! begin{}
bsIF{SChromaFormatIndex==0}
bsRET
--- 486,490 ----
end
! begin{}
bsIF{SChromaFormatIndex==0}
bsRET
***************
*** 513,518 ****
label
! The Access Unit source parameters consist of: the scan
format, frame rate,
! aspect ratio, clean area, signal range and colour
specification. These parameters
have been grouped together as they directly influence how
a downstream
display device will display decoded pictures produced by a
Dirac decoder.
--- 513,527 ----
label
! The Access Unit source parameters consist of:
! begin
! item scan format
! item frame rate
! item aspect ratio
! item clean area
! item signal range
! item colour specification
! end
!
! These parameters
have been grouped together as they directly influence how
a downstream
display device will display decoded pictures produced by a
Dirac decoder.
***************
*** 792,796 ****
Picture data may be successfully parsed after parsing any
Access Unit header
! within the same Dirac sequence. The parsing process is:
begin{}
--- 801,809 ----
Picture data may be successfully parsed after parsing any
Access Unit header
! within the same Dirac sequence. Picture data encapsulates
data for each of three
! components -- one luma component (labelled $Y$) and two
chroma components (labelled
! $C1$ and $C2$)) -- and, optionally, motion vector data.
!
! The parsing process is:
begin{}
***************
*** 810,813 ****
--- 823,828 ----
end
+
+
subsubsection{Initialising decoding parameters}
label
***************
*** 993,998 ****
begin
Note that these requirements do not preclude length from
equalling separation, i.e.
! motion compensation blocks are not overlapped. This may
improve quality at higher
! bitrates.
begin
[NB: software currently crashes in this case!]
--- 1008,1012 ----
begin
Note that these requirements do not preclude length from
equalling separation, i.e.
! motion compensation blocks are not overlapped.
begin
[NB: software currently crashes in this case!]
***************
*** 1188,1192 ****
Decoded wavelet transform coefficient data is stored in
the state
! variables $YTransform$, $UTransform$ and $VTransform$
for subsequent
processing using the inverse wavelet transform (Section
ref).
--- 1202,1206 ----
Decoded wavelet transform coefficient data is stored in
the state
! variables $YTransform$, $COneTransform$ and
$CTwoTransform$ for subsequent
processing using the inverse wavelet transform (Section
ref).
***************
*** 1201,1206 ****
bsCODE{byte_align()}
bsCODE{YTransform =
transform_data(Y)}
! bsCODE{UTransform =
transform_data(U)}
! bsCODE{VTransform =
transform_data(V)}
end
--- 1215,1220 ----
bsCODE{byte_align()}
bsCODE{YTransform =
transform_data(Y)}
! bsCODE{COneTransform =
transform_data(C1)}
! bsCODE{CTwoTransform =
transform_data(C2)}
end
Index: low-delay.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/low-delay.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** low-delay.tex 11 Apr 2007 15:28:35 -0000 1.5
--- low-delay.tex 16 Apr 2007 15:42:50 -0000 1.6
***************
*** 147,154 ****
item Chroma and luma subbands must contain corresponding
levels of padding, i.e. for all orientations $orient$ and
levels $l$,
begin{eqnarray*}
! width(YTransform[l][orient]) & = &
chroma_h_factor*width(UTransform[l][orient]) \
! & = &
chroma_h_factor*width(VTransform[l][orient]) \
! height(YTransform[l][orient]) & = &
chroma_h_factor*height(UTransform[l][orient]) \
! & = &
chroma_h_factor*height(VTransform[l][orient]) \
end{eqnarray*}
end
--- 147,154 ----
item Chroma and luma subbands must contain corresponding
levels of padding, i.e. for all orientations $orient$ and
levels $l$,
begin{eqnarray*}
! width(YTransform[l][orient]) & = &
chroma_h_factor*width(COneTransform[l][orient]) \
! & = &
chroma_h_factor*width(CTwoTransform[l][orient]) \
! height(YTransform[l][orient]) & = &
chroma_h_factor*height(COneTransform[l][orient]) \
! & = &
chroma_h_factor*height(CTwoTransform[l][orient]) \
end{eqnarray*}
end
***************
*** 201,206 ****
begin{}
bsCODE{YTransform =
initialise_wavelet_data(Y)}
! bsCODE{UTransform =
initialise_wavelet_data(U)}
! bsCODE{VTransform =
initialise_wavelet_data(V)}
bsCODE{ph=2^*leftlceilfrac
{2^}rightrceil}
bsCODE{pw=
2^*leftlceilfrac{2^{Transfo
rmDepth}}rightrceil}
--- 201,206 ----
begin{}
bsCODE{YTransform =
initialise_wavelet_data(Y)}
! bsCODE{COneTransform =
initialise_wavelet_data(C1)}
! bsCODE{CTwoTransform =
initialise_wavelet_data(C2)}
bsCODE{ph=2^*leftlceilfrac
{2^}rightrceil}
bsCODE{pw=
2^*leftlceilfrac{2^{Transfo
rmDepth}}rightrceil}
***************
*** 214,219 ****
bsIF{is_intra()}
bsCODE{intra_dc_prediction(YTransform[0][LL])}{ref{int
radcprediction}}
!
bsCODE{intra_dc_prediction(UTransform[0][LL])}{ref{int
radcprediction}}
!
bsCODE{intra_dc_prediction(VTransform[0][LL])}{ref{int
radcprediction}}
bsEND
end
--- 214,219 ----
bsIF{is_intra()}
bsCODE{intra_dc_prediction(YTransform[0][LL])}{ref{int
radcprediction}}
!
bsCODE{intra_dc_prediction(COneTransform[0][LL])}
!
bsCODE{intra_dc_prediction(CTwoTransform[0][LL])}
bsEND
end
***************
*** 325,330 ****
bsFOR{y=bottom}
bsFOR{x=left}
!
bsITEM{UTransform[level][orient]=0}
!
bsITEM{VTransform[level][orient]=0}
bsEND
bsEND
--- 325,330 ----
bsFOR{y=bottom}
bsFOR{x=left}
!
bsITEM{COneTransform[level][orient]=0}
!
bsITEM{CTwoTransform[level][orient]=0}
bsEND
bsEND
Index: layout-fullsize.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/layout-fullsize.tex,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** layout-fullsize.tex 11 Apr 2007 15:28:35 -0000 1.14
--- layout-fullsize.tex 16 Apr 2007 15:42:50 -0000 1.15
***************
*** 29,34 ****
pagestyle
fancyhf{}
! fancyhead[L,OR]
! fancyhead[R]
fancyhead[OL]
%fancyfoot[EC,OC]{input{.version-date}}
--- 29,34 ----
pagestyle
fancyhf{}
! fancyhead[LE,OR]
! fancyhead[RE]
fancyhead[OL]
%fancyfoot[EC,OC]{input{.version-date}}
***************
*** 109,122 ****
newenvironment[2]
{newcommand{\hlinehspace{valueinden
tx}}
! newcommand[1]{dfindenttext{if
(text{$##1$}):}stepcounter & &}
newcommand
!
newcommand{addtocounterdfindenttext
{else:}stepcounter & &}
!
newcommand[1]{addtocounterdfindent
text{else if (text{$##1$}):}stepcounter &
&}
! newcommand[1]{dfindenttext{while
(text{$##1$}):}stepcounter & &}
! newcommand[2]{dfindenttext{for each
text{$##1$} in text{$##2$}:}stepcounter &
&}
! newcommand[2]{dfindenttext{for
text{$##1$} such that text{$##2$}:}stepcounter
& &}
! newcommand[2]{dfindenttext{for
text{$##1$} to text{$##2$}:}stepcounter &
&}
% newcommand[1]{dfindenttext{return
text{$##1$}}addtocounter & &}
! newcommand[1]{dfindenttext{return
text{$##1$}} & &}
newcommand[1]{dfindenttext{$##1$} &
&}
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
--- 109,122 ----
newenvironment[2]
{newcommand{\hlinehspace{valueinden
tx}}
! newcommand[1]{dfindenttext{{bf if}
(text{$##1$}):}stepcounter & &}
newcommand
!
newcommand{addtocounterdfindenttext
{{bf else}:}stepcounter & &}
!
newcommand[1]{addtocounterdfindent
text{{bf else if} (text{$##1$}):}stepcounter
& &}
! newcommand[1]{dfindenttext{{bf while}
(text{$##1$}):}stepcounter & &}
! newcommand[2]{dfindenttext{{bf for
each} text{$##1$} {bf in }
text{$##2$}:}stepcounter & &}
! newcommand[2]{dfindenttext{{bf for}
text{$##1$} {bf such that}
text{$##2$}:}stepcounter & &}
! newcommand[2]{dfindenttext{{bf for}
text{$##1$} {bf to} text{$##2$}:}stepcounter
& &}
% newcommand[1]{dfindenttext{return
text{$##1$}}addtocounter & &}
! newcommand[1]{dfindenttext{{bf return}
text{$##1$}} & &}
newcommand[1]{dfindenttext{$##1$} &
&}
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
***************
*** 162,175 ****
newenvironment{pseudo*}[0]
{newcommand{\hlinehspace{valueinden
tx}}
! newcommand[1]{dfindenttext{if
(text{$##1$}):}stepcounter & &}
newcommand
!
newcommand{addtocounterdfindenttext
{else:}stepcounter & &}
!
newcommand[1]{addtocounterdfindent
text{else if (text{$##1$}):}stepcounter &
&}
! newcommand[1]{dfindenttext{while
(text{$##1$}):}stepcounter & &}
! newcommand[2]{dfindenttext{for each
text{$##1$} in text{$##2$}:}stepcounter &
&}
! newcommand[2]{dfindenttext{for
text{$##1$} such that text{$##2$}:}stepcounter
& &}
! newcommand[2]{dfindenttext{for
text{$##1$} to text{$##2$}:}stepcounter &
&}
% newcommand[1]{dfindenttext{return
text{$##1$}}addtocounter & &}
! newcommand[1]{dfindenttext{return
text{$##1$}} & &}
newcommand[1]{dfindenttext{$##1$} &
&}
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
--- 162,175 ----
newenvironment{pseudo*}[0]
{newcommand{\hlinehspace{valueinden
tx}}
! newcommand[1]{dfindenttext{{bf if}
(text{$##1$}):}stepcounter & &}
newcommand
!
newcommand{addtocounterdfindenttext
{{bf else}:}stepcounter & &}
!
newcommand[1]{addtocounterdfindent
text{{bf else if} (text{$##1$}):}stepcounter
& &}
! newcommand[1]{dfindenttext{{bf while}
(text{$##1$}):}stepcounter & &}
! newcommand[2]{dfindenttext{{bf for
each} text{$##1$} {bf in}
text{$##2$}:}stepcounter & &}
! newcommand[2]{dfindenttext{{bf for}
text{$##1$} {bf such that}
text{$##2$}:}stepcounter & &}
! newcommand[2]{dfindenttext{{bf for}
text{$##1$} {bf to} text{$##2$}:}stepcounter
& &}
% newcommand[1]{dfindenttext{return
text{$##1$}}addtocounter & &}
! newcommand[1]{dfindenttext{{bf return}
text{$##1$}} & &}
newcommand[1]{dfindenttext{$##1$} &
&}
newcommand[3]{dfindenttext{$##1 =
read_##2()$} & & ##3}
Index: picture-dec.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/picture-dec.tex,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** picture-dec.tex 15 Feb 2007 16:44:31 -0000 1.7
--- picture-dec.tex 16 Apr 2007 15:42:50 -0000 1.8
***************
*** 10,15 ****
set out in Sections ref, ref
and ref.
! This section does not specify how pictures are encoded,
nor how pictures are reordered and presented for display,
! which is described in Section ref.
subsection
--- 10,14 ----
set out in Sections ref, ref
and ref.
! This section does not specify how pictures are encoded,
nor how pictures are reordered and presented for display,
which is described in Section ref.
subsection
***************
*** 34,38 ****
Picture data from the current picture being decoded is
stored in the $CurrentPicture$ state
! variable, which is a structure with indices $pic_num$,
$Y$, $U$ and $V$.
--- 33,39 ----
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).
***************
*** 42,47 ****
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[U]$ and $CurrentPicture[V]$ are
2-dimensional arrays of width $ChromaWidth$ and height
$ChromaHeight$,
! all values $CurrentPicture[U][y][x]$ and
$CurrentPicture[V][y][x]$ set to 0
end
--- 43,48 ----
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
***************
*** 74,79 ****
bsIF{ZeroResidual==false}
bsCODE{CurrentPicture[Y]=idwt(YTransform)}
!
bsCODE{CurrentPicture[U]=idwt(UTransform)}
!
bsCODE{CurrentPicture[V]=idwt(VTransform)}
bsEND
bsIF{is_inter()}
--- 75,80 ----
bsIF{ZeroResidual==false}
bsCODE{CurrentPicture[Y]=idwt(YTransform)}
!
bsCODE{CurrentPicture[C1]=idwt(COneTransform)}
!
bsCODE{CurrentPicture[C2]=idwt(CTwoTransform)}
bsEND
bsIF{is_inter()}
***************
*** 83,88 ****
bsEND
bsCODE{motion_compensate(ref1[Y], ref2[Y],
CurrentPicture[Y], c)}
! bsCODE{motion_compensate(ref1[U], ref2[U],
CurrentPicture[U], c)}
! bsCODE{motion_compensate(ref1[V], ref2[V],
CurrentPicture[V], c)}
bsEND
bsCODE{clip_picture()}
--- 84,89 ----
bsEND
bsCODE{motion_compensate(ref1[Y], ref2[Y],
CurrentPicture[Y], c)}
! bsCODE{motion_compensate(ref1[C1], ref2[C1],
CurrentPicture[C1], c)}
! bsCODE{motion_compensate(ref1[C2], ref2[C2],
CurrentPicture[C2], c)}
bsEND
bsCODE{clip_picture()}
***************
*** 101,107 ****
pictures are decoding commences from the beginning of the
stream and pictures are decoded in
stream order, there shall be no undecodeable pictures i.e.
the reference pictures associated with
! any picture in the sequence stall have occurred prior to
that picture in the sequence.
! Picture numbers within the stream may not be in numerical,
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).
--- 102,108 ----
pictures are decoding commences from the beginning of the
stream and pictures are decoded in
stream order, there shall be no undecodeable pictures i.e.
the reference pictures associated with
! any picture in the sequence shall have occurred prior to
that picture in the sequence.
! 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).
***************
*** 162,166 ****
begin{}
! bsFOREACH{Y,U,V}
bsCODE{clip_comp(CurrentPicture[c])}
bsEND
--- 163,167 ----
begin{}
! bsFOREACH{Y,C1,C2}
bsCODE{clip_comp(CurrentPicture[c])}
bsEND
Index: arith.tex
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/latex_spec/arith.tex,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** arith.tex 16 Apr 2007 11:17:23 -0000 1.18
--- arith.tex 16 Apr 2007 15:42:50 -0000 1.19
***************
*** 124,129 ****
smallest allowable probability), then this can be
accomplished within a fixed word width.
! end{informative*}
! begin{informative*}
subsection{Arithmetic encoding (Informative)}
--- 124,129 ----
smallest allowable probability), then this can be
accomplished within a fixed word width.
! %end{informative*}
! %begin{informative*}
subsection{Arithmetic encoding (Informative)}
***************
*** 196,200 ****
width $r=h-l=range/2^$ is scaled to $r*p0$ where
$p0=prob_zero/2^$.
This operation is approximated by setting
! [range=(range*prob_zero)>>16]
If 1 is to be encoded, $[l,h)$ should be rescaled so that
$h$ is
--- 196,200 ----
width $r=h-l=range/2^$ is scaled to $r*p0$ where
$p0=prob_zero/2^$.
This operation is approximated by setting
! [range=(range*prob_zero)gg 16]
If 1 is to be encoded, $[l,h)$ should be rescaled so that
$h$ is
***************
*** 202,207 ****
approximated by setting
begin{eqnarray*}
! range & -= & (range*prob_zero)>>16 \
! low &+= & (range*prob_zero)>>16
end{eqnarray*}
--- 202,207 ----
approximated by setting
begin{eqnarray*}
! range & -= & (range*prob_zero)gg 16 \
! low &+= & (range*prob_zero)gg 16
end{eqnarray*}
***************
*** 227,231 ****
bsCODE{write_bit( low&text )}
bsWHILE{ carry>0}
! bsCODE{write_bit( ~(low&text)
)}
bsCODE{carry -= 1}
bsEND
--- 227,231 ----
bsCODE{write_bit( low&text )}
bsWHILE{ carry>0}
! bsCODE{write_bit( !(low&text)
)}
bsCODE{carry -= 1}
bsEND
***************
*** 259,263 ****
bsCODE{write_bit( low&text )}
bsWHILE{ carry>0}
! bsCODE{write_bit( ~(low&text)
)}
bsCODE{carry -= 1}
bsEND
--- 259,263 ----
bsCODE{write_bit( low&text )}
bsWHILE{ carry>0}
! bsCODE{write_bit( !(low&text)
)}
bsCODE{carry -= 1}
bsEND
***************
*** 291,295 ****
bsCODE{write_bit(m_low_code & text)}
bsWHILE{carry >= 0}
! bsCODE{write_bit(~(low & text))}
bsCODE{carry-=1}
bsEND
--- 291,295 ----
bsCODE{write_bit(m_low_code & text)}
bsWHILE{carry >= 0}
! bsCODE{write_bit(!(low & text))}
bsCODE{carry-=1}
bsEND
***************
*** 489,495 ****
begin{ctx,value}
bsIF{value==true}
! bsCODE{ctx[prob0] -=
ALUT[ctx[prob0]>>8]}{Table ref{table:lut}}
bsELSE
! bsCODE{ctx[prob0] +=
ALUT[255-(ctx[prob0]>>8)]}{Table ref{table:lut}}
bsEND
end
--- 489,495 ----
begin{ctx,value}
bsIF{value==true}
! bsCODE{ctx[prob0] -= ALUT[ctx[prob0]gg 8]}{Table
ref{table:lut}}
bsELSE
! bsCODE{ctx[prob0] += ALUT[255-(ctx[prob0]gg
8)]}{Table ref{table:lut}}
bsEND
end
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Dirac-commits mailing list
Dirac-commits lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dirac-com
mits
|