[FFmpeg-devel] [PATCH] FFV1 specification: Quantization Tables syntax

Michael Niedermayer michaelni at gmx.at
Thu Apr 30 15:53:23 CEST 2015


On Thu, Apr 30, 2015 at 02:06:20PM +0200, Jerome Martinez wrote:
> Quantization Tables syntax was not defined.
> Corresponding HTML export: https://mediaarea.net/temp/ffv1-patched-Quantization-tables-syntax.html#toc-Subsection-4.4
> 

>  ffv1.lyx | 1006 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 1002 insertions(+), 4 deletions(-)
> 7625403ff9abc9cbb1dbcbaaec313510b92b9a0d  0001-Quantization-tables-syntax.patch
> From 7d58498adbc04aeabc5497df0270c6ebd1cfac12 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Martinez?= <jerome at mediaarea.net>
> Date: Wed, 29 Apr 2015 21:54:13 +0200

> Subject: [PATCH] Quantization tables syntax.

Add quantization tables syntax.


> 
> More details is provided about how to read quantization tables and the associated values (context_count).
> ---
>  ffv1.lyx | 1006 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 1002 insertions(+), 4 deletions(-)
> 
> diff --git a/ffv1.lyx b/ffv1.lyx
> index 3d2380c..22c4a93 100644
> --- a/ffv1.lyx
> +++ b/ffv1.lyx
> @@ -5246,7 +5246,7 @@ br
>  \begin_inset space ~
>  \end_inset
>  
> -QuantizationTables
> +QuantizationTable(0)
>  \end_layout
>  
>  \end_inset
> @@ -5966,7 +5966,7 @@ for(i=0; i<quant_table_count; i++)
>  \begin_inset space ~
>  \end_inset
>  
> -QuantizationTables
> +QuantizationTable(i)
>  \end_layout
>  
>  \end_inset
> @@ -6170,7 +6170,7 @@ if(states_coded)
>  \begin_inset space ~
>  \end_inset
>  
> -for(j=0; j<context_count;j++)
> +for(j=0; j<context_count[i];j++)
>  \end_layout
>  
>  \end_inset
> @@ -7906,7 +7906,7 @@ crc_parity 32bit that are choosen so that the global header as a whole or
>  \end_layout
>  
>  \begin_layout Subsection
> -Quant Table
> +Quantization Tables
>  \end_layout
>  
>  \begin_layout Standard
> @@ -7933,6 +7933,1004 @@ Table: 0 0 1 1 1 1 2 2-2-2-2-1-1-1-1 0
>  \end_inset
>  
>  Stored values: 1, 3, 1
> +\begin_inset Newline newline
> +\end_inset
> +
> +
> +\end_layout
> +
> +\begin_layout Standard
> +\begin_inset Tabular
> +<lyxtabular version="3" rows="8" columns="2">
> +<features rotate="0" tabularvalignment="middle">
> +<column alignment="left" valignment="top">
> +<column alignment="center" valignment="top">
> +<row>
> +<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +QuantizationTable (i) {

normally i dont care that much about formating but in a spec
consistent formating is important otherwise it looks unprofessional
so please make sure formating is consistent throughut the spec
further above there is QuantizationTable(i), that is without
the space
i think ite better without the space


[...]
> +scale*=2*len_count[i][j]-1

missing spaces between operands and there are many more such
cases


> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +<row>
> +<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +\begin_inset space ~
> +\end_inset
> +
> +
> +\begin_inset space ~
> +\end_inset
> +
> +
> +\begin_inset space ~
> +\end_inset
> +
> +
> +\begin_inset space ~
> +\end_inset
> +
> +}
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +<row>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +\begin_inset space ~
> +\end_inset
> +
> +
> +\begin_inset space ~
> +\end_inset
> +
> +
> +\begin_inset space ~
> +\end_inset
> +
> +
> +\begin_inset space ~
> +\end_inset
> +

> +context_count[i]=(scale+1)/2

is the rounding of the division operator defined somewhere ?
something like maybe refering to C for arithmetic operators

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150430/033808f0/attachment.asc>


More information about the ffmpeg-devel mailing list