>From 9da73eaa1ddf40667dca300ee89430283c1e36ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Martinez?= <jer...@mediaarea.net> Date: Fri, 1 May 2015 10:54:04 +0200 Subject: [PATCH 1/4] Change formatting of pseudo-code.
In order to have the same formatting everywhere. Formatting is the same as in some ISO or ITU specifications. --- ffv1.lyx | 136 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/ffv1.lyx b/ffv1.lyx index d4911cd..2942c10 100644 --- a/ffv1.lyx +++ b/ffv1.lyx @@ -1957,7 +1957,7 @@ Frame \begin_inset Text \begin_layout Plain Layout -Frame { +Frame( ) { \end_layout \end_inset @@ -2027,7 +2027,7 @@ br \begin_inset space ~ \end_inset -if (keyframe) { +if ( keyframe ) { \end_layout \end_inset @@ -2078,7 +2078,7 @@ if (keyframe) { \begin_inset space ~ \end_inset -if(version<2) +if( version < 2 ) \end_layout \end_inset @@ -2145,7 +2145,7 @@ if(version<2) \begin_inset space ~ \end_inset -FrameHeader01 +FrameHeader01( ) \end_layout \end_inset @@ -2215,7 +2215,7 @@ FrameHeader01 \begin_inset space ~ \end_inset -for(i=0; i<slice_count; i++) +for( i = 0; i < slice_count; i++) \end_layout \end_inset @@ -2266,7 +2266,7 @@ for(i=0; i<slice_count; i++) \begin_inset space ~ \end_inset -Slice(i) +Slice( i ) \end_layout \end_inset @@ -2323,7 +2323,7 @@ Slice \begin_inset Text \begin_layout Plain Layout -Slice(i) { +Slice( i ) { \end_layout \end_inset @@ -2358,7 +2358,7 @@ type \begin_inset space ~ \end_inset -if(version>2) +if( version > 2 ) \end_layout \end_inset @@ -2409,7 +2409,7 @@ if(version>2) \begin_inset space ~ \end_inset -SliceHeader(i) +SliceHeader( i ) \end_layout \end_inset @@ -2444,7 +2444,7 @@ SliceHeader(i) \begin_inset space ~ \end_inset -if (colorspace_type == 1) { +if( colorspace_type == 1) { \end_layout \end_inset @@ -2495,15 +2495,15 @@ if (colorspace_type == 1) { \begin_inset space ~ \end_inset -for (y=0; +for ( y = 0; \begin_inset space ~ \end_inset -y<height; +y < height; \begin_inset space ~ \end_inset -y++) { +y++ ) { \end_layout \end_inset @@ -2570,7 +2570,7 @@ y++) { \begin_inset space ~ \end_inset -LumaLine[y] +LumaLine( y ) \end_layout \end_inset @@ -2637,7 +2637,7 @@ LumaLine[y] \begin_inset space ~ \end_inset -CbLine[y] +CbLine( y ) \end_layout \end_inset @@ -2704,7 +2704,7 @@ CbLine[y] \begin_inset space ~ \end_inset -CrLine[y] +CrLine( y ) \end_layout \end_inset @@ -2771,7 +2771,7 @@ CrLine[y] \begin_inset space ~ \end_inset -if (alpha_plane) +if ( alpha_plane ) \end_layout \end_inset @@ -2854,7 +2854,7 @@ if (alpha_plane) \begin_inset space ~ \end_inset -AlphaLine[y] +AlphaLine( y ) \end_layout \end_inset @@ -2991,7 +2991,7 @@ AlphaLine[y] \begin_inset space ~ \end_inset -LumaPlane +LumaPlane( ) \end_layout \end_inset @@ -3042,7 +3042,7 @@ LumaPlane \begin_inset space ~ \end_inset -if (chroma_planes) { +if ( chroma_planes ) { \end_layout \end_inset @@ -3109,7 +3109,7 @@ if (chroma_planes) { \begin_inset space ~ \end_inset -CbPlane +CbPlane( ) \end_layout \end_inset @@ -3176,7 +3176,7 @@ CbPlane \begin_inset space ~ \end_inset -CrPlane +CrPlane( ) \end_layout \end_inset @@ -3278,7 +3278,7 @@ CrPlane \begin_inset space ~ \end_inset -if (alpha_plane) +if ( alpha_plane ) \end_layout \end_inset @@ -3345,7 +3345,7 @@ if (alpha_plane) \begin_inset space ~ \end_inset -AlphaPlane +AlphaPlane( ) \end_layout \end_inset @@ -3415,7 +3415,7 @@ AlphaPlane \begin_inset space ~ \end_inset -if(i || version>2) +if( i || version > 2 ) \end_layout \end_inset @@ -3501,7 +3501,7 @@ u(24) \begin_inset space ~ \end_inset -if(ec){ +if( ec ) { \end_layout \end_inset @@ -3981,7 +3981,7 @@ Slice Header \begin_inset Text \begin_layout Plain Layout -SliceHeader(i) { +SliceHeader( i ) { \end_layout \end_inset @@ -4086,7 +4086,7 @@ ur \begin_inset space ~ \end_inset -slice_width-1 +slice_width - 1 \end_layout \end_inset @@ -4121,7 +4121,7 @@ ur \begin_inset space ~ \end_inset -slice_height-1 +slice_height - 1 \end_layout \end_inset @@ -4156,7 +4156,7 @@ ur \begin_inset space ~ \end_inset -for(j=0; j<plane_count; j++) +for( j = 0; j < plane_count; j++) \end_layout \end_inset @@ -4347,7 +4347,7 @@ ur \begin_inset space ~ \end_inset -if (version > 3) +if ( version > 3 ) \end_layout \end_inset @@ -4827,7 +4827,7 @@ Version 0 and 1 \begin_inset Text \begin_layout Plain Layout -FrameHeader01 { +FrameHeader01( ) { \end_layout \end_inset @@ -4932,7 +4932,7 @@ ur \begin_inset space ~ \end_inset -if(coder_type>1) +if( coder_type > 1 ) \end_layout \end_inset @@ -4983,7 +4983,7 @@ if(coder_type>1) \begin_inset space ~ \end_inset -for(i=1; i<256; i++) +for( i = 1; i < 256; i++ ) \end_layout \end_inset @@ -5120,7 +5120,7 @@ ur \begin_inset space ~ \end_inset -if(version>0) +if( version > 0 ) \end_layout \end_inset @@ -5241,7 +5241,7 @@ br \begin_inset space ~ \end_inset -log2(h_chroma_subsample) +log2( h_chroma_subsample ) \end_layout \end_inset @@ -5276,7 +5276,7 @@ ur \begin_inset space ~ \end_inset -log2(v_chroma_subsample) +log2( v_chroma_subsample ) \end_layout \end_inset @@ -5346,7 +5346,7 @@ br \begin_inset space ~ \end_inset -QuantizationTable(0) +QuantizationTable( 0 ) \end_layout \end_inset @@ -5407,7 +5407,7 @@ Version 2 and later files use a global header and a per frame header. \begin_inset Text \begin_layout Plain Layout -GlobalHeader { +GlobalHeader( ) { \end_layout \end_inset @@ -5547,7 +5547,7 @@ ur \begin_inset space ~ \end_inset -if(coder_type>1) +if( coder_type > 1 ) \end_layout \end_inset @@ -5598,7 +5598,7 @@ if(coder_type>1) \begin_inset space ~ \end_inset -for(i=1; i<256; i++) +for( i = 1; i < 256; i++ ) \end_layout \end_inset @@ -5805,7 +5805,7 @@ br \begin_inset space ~ \end_inset -log2(h_chroma_subsample) +log2( h_chroma_subsample ) \end_layout \end_inset @@ -5840,7 +5840,7 @@ ur \begin_inset space ~ \end_inset -log2(v_chroma_subsample) +log2( v_chroma_subsample ) \end_layout \end_inset @@ -5910,7 +5910,7 @@ br \begin_inset space ~ \end_inset -num_h_slices-1 +num_h_slices - 1 \end_layout \end_inset @@ -5945,7 +5945,7 @@ ur \begin_inset space ~ \end_inset -num_v_slices-1 +num_v_slices - 1 \end_layout \end_inset @@ -6015,7 +6015,7 @@ ur \begin_inset space ~ \end_inset -for(i=0; i<quant_table_count; i++) +for( i = 0; i < quant_table_count; i++ ) \end_layout \end_inset @@ -6066,7 +6066,7 @@ for(i=0; i<quant_table_count; i++) \begin_inset space ~ \end_inset -QuantizationTable(i) +QuantizationTable( i ) \end_layout \end_inset @@ -6101,7 +6101,7 @@ QuantizationTable(i) \begin_inset space ~ \end_inset -for(i=0; i<quant_table_count; i++) { +for( i = 0; i < quant_table_count; i++ ) { \end_layout \end_inset @@ -6203,7 +6203,7 @@ br \begin_inset space ~ \end_inset -if(states_coded) +if( states_coded ) \end_layout \end_inset @@ -6270,7 +6270,7 @@ if(states_coded) \begin_inset space ~ \end_inset -for(j=0; j<context_count[i];j++) +for( j = 0; j < context_count[i]; j++ ) \end_layout \end_inset @@ -6353,7 +6353,7 @@ for(j=0; j<context_count[i];j++) \begin_inset space ~ \end_inset -for(k=0; k<CONTEXT_SIZE;k++) +for( k = 0; k < CONTEXT_SIZE; k++) \end_layout \end_inset @@ -7612,11 +7612,11 @@ initial_state_delta[i][j][k] indicates the initial range coder state, it \begin_inset Newline newline \end_inset -pred= j ? initial_states[i][j-1][k] : 128 +pred = j ? initial_states[i][j - 1][k] : 128 \begin_inset Newline newline \end_inset -initial_state[i][j][k]= (pred+initial_state_delta[i][j][k])&255 +initial_state[i][j][k] = ( pred + initial_state_delta[i][j][k] ) & 255 \end_layout \begin_layout Description @@ -7875,7 +7875,7 @@ Stored values: 1, 3, 1 \begin_inset Text \begin_layout Plain Layout -QuantizationTable(i) { +QuantizationTable( i ) { \end_layout \end_inset @@ -7910,7 +7910,7 @@ type \begin_inset space ~ \end_inset -scale=1 +scale = 1 \end_layout \end_inset @@ -7945,7 +7945,7 @@ scale=1 \begin_inset space ~ \end_inset -for(j=0; j<MAX_CONTEXT_INPUTS; j++) { +for( j = 0; j < MAX_CONTEXT_INPUTS; j++ ) { \end_layout \end_inset @@ -7996,7 +7996,7 @@ for(j=0; j<MAX_CONTEXT_INPUTS; j++) { \begin_inset space ~ \end_inset -QuantizationTablePerContext(i, j, scale) +QuantizationTablePerContext( i, j, scale ) \end_layout \end_inset @@ -8047,7 +8047,7 @@ QuantizationTablePerContext(i, j, scale) \begin_inset space ~ \end_inset -scale*=2*len_count[i][j]-1 +scale *= 2 * len_count[i][j] - 1 \end_layout \end_inset @@ -8117,7 +8117,7 @@ scale*=2*len_count[i][j]-1 \begin_inset space ~ \end_inset -context_count[i]=(scale+1)/2 +context_count[i] = ( scale + 1 ) / 2 \end_layout \end_inset @@ -8209,7 +8209,7 @@ type \begin_inset space ~ \end_inset -v=0 +v = 0 \end_layout \end_inset @@ -8244,7 +8244,7 @@ v=0 \begin_inset space ~ \end_inset -for(k= 0; k<128;) { +for( k = 0; k < 128; ) { \end_layout \end_inset @@ -8295,7 +8295,7 @@ for(k= 0; k<128;) { \begin_inset space ~ \end_inset -len-1 +len - 1 \end_layout \end_inset @@ -8346,7 +8346,7 @@ sr \begin_inset space ~ \end_inset -for(a=0; a<len; a++) { +for( a = 0; a < len; a++ ) { \end_layout \end_inset @@ -8413,7 +8413,7 @@ for(a=0; a<len; a++) { \begin_inset space ~ \end_inset -quant_tables[i][j][k]=scale*v +quant_tables[i][j][k] = scale * v \end_layout \end_inset @@ -8652,7 +8652,7 @@ v++ \begin_inset space ~ \end_inset -for (k=1; k<128; k++) { +for( k = 1; k < 128; k++ ) { \end_layout \end_inset @@ -8703,7 +8703,7 @@ for (k=1; k<128; k++) { \begin_inset space ~ \end_inset -quant_tables[i][j][256-k]=-quant_tables[i][j][k] +quant_tables[i][j][256 - k] = -quant_tables[i][j][k] \end_layout \end_inset @@ -8773,7 +8773,7 @@ quant_tables[i][j][256-k]=-quant_tables[i][j][k] \begin_inset space ~ \end_inset -quant_tables[i][j][128]=-quant_tables[i][j][127] +quant_tables[i][j][128] =-quant_tables[i][j][127] \end_layout \end_inset @@ -8808,7 +8808,7 @@ quant_tables[i][j][128]=-quant_tables[i][j][127] \begin_inset space ~ \end_inset -len_count[i][j]=v +len_count[i][j] = v \end_layout \end_inset -- 1.9.5.msysgit.1
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel