FFmpeg
Functions | Variables
doc/snow.txt File Reference

Functions

any process which generates a stream compliant to the syntactical and semantic requirements and which is decodable by the process described in this spec shall be considered a conformant Snow encoder but not strictly required ilog2 (x) is the rounded down logarithm of x with basis 2 ilog2(0)=0Type definitions
 
 if (!keyframe)
 
plane< nb_plane_types;plane++){ quant_table[plane][0][0] s header_state for(level=0;level< spatial_decomposition_count;level++){ quant_table[plane][level][1]s header_state quant_table[plane][level][3]s header_state } }reset_contexts *_state[ *]=MID_STATEprediction:for(y=0;y< block_count_vertical;y++) for(x=0;x< block_count_horizontal;x++) block(0) block(level):mvx_diff=mvy_diff=y_diff=cb_diff=cr_diff=0 if(keyframe){ intra=1 }else{ if(level!=max_block_depth){ s_context=2 *left-> level *top level topleft level topright level leaf b block_state[4+s_context] if (level==max_block_depth||leaf)
 

Variables

 though
 
any process which generates a stream compliant to the syntactical and semantic requirements and which is decodable by the process described in this spec shall be considered a conformant Snow encoder Definitions
 
spatial_decomposition_type s header_state qlog s header_state mv_scale s header_state qbias s header_state block_max_depth s header_state qlogs
 
 else
 
Tag description
 
Tag MUST be even
 
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||......... intra?||||:Block01 :yes no||||:Block02 :....... ..........||||:Block03 ::y DC ::ref index:||||:Block04 ::cb DC ::motion x :||||......... :cr DC ::motion y :||||....... ..........|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------ ------------ ------------|||Y subbands||Cb subbands||Cr subbands||||--- ---||--- ---||--- ---|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------ ------------ ------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction ------------|\ Dequantization ------------------- \||Reference frames|\ IDWT|------- -------|Motion \|||Frame 0||Frame 1||Compensation . OBMC v -------|------- -------|--------------. \------> Frame n output Frame Frame<----------------------------------/|...|------------------- Range Coder:============Binary Range Coder:------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits(0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen|new state ---------+----------------------------------------------- 0|256 - state_transition_table[256 - old_state];1|state_transition_table[old_state];state_transition_table={ 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:------------------------- FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled left
 
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||......... intra?||||:Block01 :yes no||||:Block02 :....... ..........||||:Block03 ::y DC ::ref index:||||:Block04 ::cb DC ::motion x :||||......... :cr DC ::motion y :||||....... ..........|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------ ------------ ------------|||Y subbands||Cb subbands||Cr subbands||||--- ---||--- ---||--- ---|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------ ------------ ------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction ------------|\ Dequantization ------------------- \||Reference frames|\ IDWT|------- -------|Motion \|||Frame 0||Frame 1||Compensation . OBMC v -------|------- -------|--------------. \------> Frame n output Frame Frame<----------------------------------/|...|------------------- Range Coder:============Binary Range Coder:------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits(0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen|new state ---------+----------------------------------------------- 0|256 - state_transition_table[256 - old_state];1|state_transition_table[old_state];state_transition_table={ 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:------------------------- FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled top and top right vectors is used as motion vector prediction the used motion vector is the sum of the predictor and(mvx_diff, mvy_diff) *mv_scale Intra DC Prediction block[y][x] dc [1] = block[y][x-1].dc[1] + cb_diff
 
Motion Compensation
 
vertical halfpel samples are found by H2 [y][x]
 
vertical horizontal halfpel samples are found by H3 [y][x]
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 Filter
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H0
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L1
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H1
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L2
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L3
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 note
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 this can end with a L or a H
 
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 this can end with a L or a the number of elements shall be w s[-1] shall be considered equivalent to s[1] s[w] shall be considered equivalent to s[w-2] perform the lifting steps in order as described below Integer filter
 
for all even i< w2. s[i]+=(s[i-1]+s[i+1])>
 
for all odd i< w\|/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|+|+|+|+|-1/4/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|+|+|+|++1/2Snow 's 9/7 Integer filter:1. s[i] -=(3 *(s[i-1]+s[i+1])+4)>
 
for all even i< w2. s[i] -=s[i-1]+s[i+1] ;for all odd i< w3. s[i]+=(s[i-1]+s[i+1]+4 *s[i]+8)> >
 
for all even i< w4. s[i]+=(3 *(s[i-1]+s[i+1]))>
 

Function Documentation

◆ ilog2()

any process which generates a stream compliant to the syntactical and semantic requirements and which is decodable by the process described in this spec shall be considered a conformant Snow encoder but not strictly required ilog2 ( )
pure virtual

Definition at line 23 of file snow.txt.

Referenced by if().

◆ if() [1/2]

if ( keyframe)

Definition at line 61 of file snow.txt.

◆ if() [2/2]

plane<nb_plane_types; plane++){ quant_table[plane][0][0] s header_state for(level=0; level < spatial_decomposition_count; level++){ quant_table[plane][level][1]s header_state quant_table[plane][level][3]s header_state } }reset_contexts *_state[*]= MID_STATEprediction: for(y=0; y<block_count_vertical; y++) for(x=0; x<block_count_horizontal; x++) block(0)block(level): mvx_diff=mvy_diff=y_diff=cb_diff=cr_diff=0 if(keyframe){ intra=1 }else{ if(level!=max_block_depth){ s_context= 2*left-> level* top level topleft level topright level leaf b block_state [4 + s_context] if ( level  = =max_block_depth || leaf)

Definition at line 110 of file snow.txt.

Variable Documentation

◆ though

though

Definition at line 1 of file snow.txt.

◆ Definitions

any process which generates a stream compliant to the syntactical and semantic requirements and which is decodable by the process described in this spec shall be considered a conformant Snow encoder Definitions

Definition at line 21 of file snow.txt.

◆ qlogs

spatial_decomposition_type s header_state qlog s header_state mv_scale s header_state qbias s header_state block_max_depth s header_state qlogs

Definition at line 85 of file snow.txt.

Referenced by if(), and ilog2().

◆ else

else
Initial value:
{
}
}
residual2(luma)
if (nb_planes > 2) {
residual2(chroma_cr)
residual2(chroma_cb)
}
residual2:
for(level=0; level<spatial_decomposition_count; level++){
if(level==0)
subband(LL, 0)
subband(HL, level)
subband(LH, level)
subband(HH, level)
}
subband:
FIXME
nb_plane_types = gray ? 1 : 2

Definition at line 125 of file snow.txt.

◆ description

Tag description

◆ even

Tag MUST be even

Definition at line 206 of file snow.txt.

Referenced by generate_parity_lut(), and interlaced_vertical_filter().

◆ left

Tag MUST be and<10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients [1] are the next outer ones and so on, resulting in a filter like: ...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]= 32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps= 6 hcoeff={40,-10,2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps= 8 hcoeff={42,-14,6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset || keyframeqlog quality (logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset || keyframemv_scale stored as delta from last, last is reset to 0 if always_reset || keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset || keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset || keyframequant_table quantization tableHighlevel bitstream structure:============================== --------------------------------------------| Header | --------------------------------------------| ------------------------------------ || | Block0 | || | split? | || | yes no | || | ......... intra? | || | : Block01 : yes no | || | : Block02 : ....... .......... | || | : Block03 : : y DC : : ref index: | || | : Block04 : : cb DC : : motion x : | || | ......... : cr DC : : motion y : | || | ....... .......... | || ------------------------------------ || ------------------------------------ || | Block1 | || ... | --------------------------------------------| ------------ ------------ ------------ ||| Y subbands | | Cb subbands| | Cr subbands|||| --- --- | | --- --- | | --- --- |||| |LL0||HL0| | | |LL0||HL0| | | |LL0||HL0| |||| --- --- | | --- --- | | --- --- |||| --- --- | | --- --- | | --- --- |||| |LH0||HH0| | | |LH0||HH0| | | |LH0||HH0| |||| --- --- | | --- --- | | --- --- |||| --- --- | | --- --- | | --- --- |||| |HL1||LH1| | | |HL1||LH1| | | |HL1||LH1| |||| --- --- | | --- --- | | --- --- |||| --- --- | | --- --- | | --- --- |||| |HH1||HL2| | | |HH1||HL2| | | |HH1||HL2| |||| ... | | ... | | ... ||| ------------ ------------ ------------ | --------------------------------------------Decoding process:================= ------------ | | | Subbands | ------------ | | | | ------------ | Intra DC | | | | LL0 subband prediction ------------ | \ Dequantization ------------------- \ || Reference frames | \ IDWT| ------- ------- | Motion \ |||Frame 0| |Frame 1|| Compensation . OBMC v -------| ------- ------- | --------------. \------> Frame n output Frame Frame<----------------------------------/ | ... | ------------------- Range Coder: ============ Binary Range Coder: ------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits (0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen | new state ---------+----------------------------------------------- 0 | 256 - state_transition_table[256 - old_state]; 1 | state_transition_table[ old_state]; state_transition_table = { 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0}; FIXME Range Coding of integers: ------------------------- FIXME Neighboring Blocks: =================== left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y,cb,cr are 128 level, ref, mx and my are 0 Motion Vector Prediction: ========================= 1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv= (mv * (256 * (current_reference+1) / (mv.reference+1)) + 128)> the median of the scaled left

Definition at line 386 of file snow.txt.

Referenced by add_hfyu_left_pred_bgr32_c(), add_hfyu_median_pred_int16_c(), add_lag_median_prediction(), add_median_pred_c(), add_median_prediction(), adjust_pred16(), alac_stereo_decorrelation(), ana_convert(), ape_unpack_stereo(), assign_pair(), av_spherical_tile_bounds(), blend_line(), blend_line16(), blend_line_hv(), blend_line_hv16(), butter_filter_stereo_samples(), celt_frame_setup_input(), channel_decorrelation(), check(), check_add_median_pred(), check_ipred(), cmp_int(), cmpbytes(), codeblock(), comparei(), convert_coeffs(), count_hq_slice(), dc_16x16_c(), dc_32x32_c(), dc_4x4_c(), dc_8x8_c(), dc_left_16x16_c(), dc_left_32x32_c(), dc_left_4x4_c(), dc_left_8x8_c(), decode_channel(), decode_frame(), decode_interframe_v4(), decode_intra4x4_modes(), decode_mb_i(), decode_mode(), decode_q_branch(), decode_rle(), decode_rle16(), decode_rle_bpp2(), decode_rle_bpp4(), decode_slice(), decode_splitmvs(), decode_str(), decode_subband(), decode_subband_internal(), decode_subframe(), decode_var_block_data(), decorr_mono(), def_diag_downleft(), def_diag_downright(), def_vert_left(), def_vert_right(), dx2_decode_slice_410(), dx2_decode_slice_420(), dx2_decode_slice_444(), dx2_decode_slice_555(), dx2_decode_slice_565(), dx2_decode_slice_5x5(), dx2_decode_slice_rgb(), encode_frame(), encode_q_branch(), encode_q_branch2(), encode_subband(), ensure_bits(), estimate_stereo_mode(), exp_quant_coarse(), ff_blend_mask(), ff_blend_rectangle(), ff_cavs_load_intra_pred_luma(), ff_dc_16x16_msa(), ff_h263_resync(), ff_h264_check_intra4x4_pred_mode(), ff_h264_check_intra_pred_mode(), ff_hevc_deblocking_boundary_strengths(), ff_intra_pred_8_16x16_msa(), ff_intra_pred_8_32x32_msa(), ff_ivi_decode_frame(), ff_lag_rac_init(), ff_msmpeg4_decode_block(), ff_msmpeg4_decode_ext_header(), ff_tm_16x16_msa(), ff_tm_32x32_msa(), ff_tm_4x4_msa(), ff_tm_8x8_msa(), ff_vbv_update(), ff_vc1_h_s_overlap_mmi(), fill_ltable(), filter_frame(), frame_block_to_cell(), get_block_bits(), get_submv_prob(), getfilter_float(), gif_read_image(), gradient_predict(), h261_resync(), h263_decode_gob_header(), h264_metadata_update_sps(), h265_metadata_update_sps(), hor_16x16_c(), hor_32x32_c(), hor_4x4_c(), hor_8x8_c(), idct_row(), if(), init_obmc_weight(), init_obmc_weight_row(), initFilter(), intra_pred(), intra_pred_down_left(), intra_pred_down_right(), intra_pred_horiz(), intra_pred_lp(), intra_pred_lp_left(), intra_pred_plane(), ljpeg_decode_rgb_scan(), ljpeg_encode_bgr(), magicyuv_median_pred16(), magy_decode_slice(), magy_decode_slice10(), median_predict(), mmf_read_packet(), mov_read_default(), mpeg4_decode_dpcm_macroblock(), mpeg_decode_slice(), mpegts_probe(), mpegts_write_section(), old_codec1(), old_codec37(), old_codec47(), opengl_make_ortho(), parse_strk(), parse_vtrk(), pred_angular(), pred_angular_0(), pred_angular_1(), pred_angular_2(), pred_angular_3(), pred_dc(), pred_intra_mode(), pred_mv(), pred_non_zero_count(), pred_planar(), process_frame_obj(), put_obmc(), raw_read_packet(), read_packet(), real_seek(), rle_decode(), rv10_decode_packet(), rv34_pred_4x4_block(), sao_filter_CTB(), set_frame(), shift_stereo(), sub_hfyu_median_pred_int16_c(), sub_left_prediction(), sub_median_pred_c(), sub_median_prediction(), svq3_decode_frame(), svq3_decode_mb(), tm2_null_res_block(), tm_16x16_c(), tm_32x32_c(), tm_4x4_c(), tm_8x8_c(), vble_restore_plane(), vc1_h_s_overlap_c(), xa_decode(), xcbgrab_reposition(), xwma_read_packet(), and yule_filter_stereo_samples().

◆ dc

block [*][-1] dc[ *] = block[y][x-1].dc[1] + cb_diff

Definition at line 400 of file snow.txt.

Referenced by add_dc(), avc_idct8_dc_addblk_msa(), check_idct(), check_luma_dc_wht(), data_close(), data_open(), data_read(), dc_16x16_c(), dc_32x32_c(), dc_4x4_c(), dc_8x8_c(), dc_left_16x16_c(), dc_left_32x32_c(), dc_left_4x4_c(), dc_left_8x8_c(), dc_top_16x16_c(), dc_top_32x32_c(), dc_top_4x4_c(), dc_top_8x8_c(), dct_quantize_refine(), dct_quantize_trellis_c(), decfloat(), decode_block(), decode_dct(), decode_dlta(), decode_p_block(), draw_basis(), draw_cbp(), dv_decode_video_segment(), encode_block(), encode_dcs(), encode_thread(), epic_decode_component_pred(), epic_decode_from_cache(), epic_decode_pixel_pred(), epic_decode_run_length(), epic_decode_tile(), epic_handle_edges(), epic_predict_from_NW_NE(), epic_predict_pixel(), epic_predict_pixel2(), estimate_dcs(), ff_er_frame_end(), ff_gradfun_blur_line_c(), ff_gradfun_filter_line_c(), ff_h264_idct4x4_addblk_dc_msa(), ff_h264_idct8_dc_add(), ff_h264_idct8_dc_add_8_mmi(), ff_h264_idct_dc_add(), ff_h264_idct_dc_add_8_mmi(), ff_metadata_conv(), ff_mpeg1_decode_block_intra(), ff_pred4x4_dc_8_mmi(), ff_pred8x8l_dc_8_mmi(), ff_pred8x8l_top_dc_8_mmi(), ff_vc1_inv_trans_4x4_dc_mmi(), ff_vc1_inv_trans_4x8_dc_mmi(), ff_vc1_inv_trans_8x4_dc_mmi(), ff_vc1_inv_trans_8x8_dc_mmi(), ff_vp3_idct_dc_add_mmi(), ff_vp3_idct_dc_add_msa(), ff_vp8_idct_dc_add_mmi(), ff_vp8_luma_dc_wht_dc_mmi(), ff_vp8_luma_dc_wht_mmi(), ff_vp9dsp_init_16bpp_x86(), filter(), filter181(), get_block(), guess_dc(), hexfloat(), inter_predict_dc(), interpol(), is_pixel_on_stack(), jpg_decode_block(), ljpeg_decode_rgb_scan(), ljpeg_decode_yuv_scan(), mcdc(), mpeg1_encode_block(), mpeg2_decode_block_intra(), mpeg2_fast_decode_block_intra(), mpeg4_decode_partition_a(), mpeg4_decode_partition_b(), mss4_decode_dct(), pred16x16_dc(), pred16x16_left_dc(), pred16x16_top_dc(), pred4x4_dc(), pred4x4_left_dc(), pred4x4_top_dc(), pred8x8l_dc(), pred8x8l_left_dc(), pred8x8l_top_dc(), pred_dc(), put_dc(), record_block(), remove_dc(), rv34_decode_inter_macroblock(), rv34_idct_dc_add_c(), rv34_inv_transform_dc_noround_c(), rv34_output_i16x16(), svq3_add_idct_c(), teletext_data_unit_from_ancillary_packet(), tgq_dconly(), tgq_decode_mb(), tgq_idct_put_mb_dconly(), tscc2_decode_mb(), vc1_inv_trans_4x4_dc_c(), vc1_inv_trans_4x8_dc_c(), vc1_inv_trans_8x4_dc_c(), vc1_inv_trans_8x8_dc_c(), vp3_idct_dc_add_c(), and vp56_add_predictors_dc().

◆ Compensation

Motion Compensation

Definition at line 418 of file snow.txt.

◆ H2

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H2
Initial value:
= hcoeff[0]*(F[y ][x] + F[y+1][x])
+ hcoeff[1]*(F[y-1][x] + F[y+2][x])
+ ...
h2[y][x] = (H2[y][x] + 32)>>6

Definition at line 421 of file snow.txt.

◆ H3

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H3
Initial value:
= hcoeff[0]*(H2[y][x ] + H2[y][x+1])
+ hcoeff[1]*(H2[y][x-1] + H2[y][x+2])
+ ...
H3[y][x] = hcoeff[0]*(H1[y ][x] + H1[y+1][x])
+ hcoeff[1]*(H1[y+1][x] + H1[y+2][x])
+ ...
h3[y][x] = (H3[y][x] + 2048)>>12

Definition at line 427 of file snow.txt.

◆ Filter

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 Filter

Definition at line 554 of file snow.txt.

◆ H0

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H0

Definition at line 554 of file snow.txt.

◆ L1

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L1

◆ H1

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H1

Definition at line 554 of file snow.txt.

◆ L2

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L2

Definition at line 554 of file snow.txt.

Referenced by wv_unpack_stereo().

◆ L3

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L3

Definition at line 554 of file snow.txt.

◆ note

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 note

Definition at line 555 of file snow.txt.

◆ H

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 this can end with a L or a H

◆ filter

F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F | | | | | | | | | F H1 F | | | | | | | | | F H1 Funavailable fullpel samples (outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically,horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \ / v \ / v O O O O O O O | / | \ | q q q q q | / | \ | O O O O O O O ^ / \ ^ / \ ^ h2--> O q O<--h3-> O q O<--h2 v \ / v \ / v O O O O O O O | \ | / | q q q q q | \ | / | O O O O O O O ^ / \ ^ / \ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0; y<height; y++){ for(x=0; x<width; x++){ sample[y][x] += median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]); }}sample[-1][*]=sample[*][-1]= 0;width,height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT (inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0| | | | | | | | | | | ||---+---| HL1 | | L0|H0 | HL1 | | LL1 | HL1 | | | ||LH0|HH0| | | | | | | | | | | ||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 this can end with a L or a the number of elements shall be w s [-1] shall be considered equivalent to s [1 ] s [w ] shall be considered equivalent to s [w-2] perform the lifting steps in order as described below Integer filter

Definition at line 562 of file snow.txt.

◆ i< w2. s[i]+=(s[i-1]+s[i+1])>

for all even i< w2. s[i]+=(s[i-1]+s[i+1])>

Definition at line 563 of file snow.txt.

◆ i< w\|/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|+|+|+|+|-1/4/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|+|+|+|++1/2Snow 's 9/7 Integer filter:1. s[i] -=(3 *(s[i-1]+s[i+1])+4)>

for all odd i< w\|/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|+|+|+|+| -1/4/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|\|/|+|+|+|++1/2Snow 's 9/7 Integer filter:1. s[i] -=(3 *(s[i-1]+s[i+1])+4)>

Definition at line 574 of file snow.txt.

◆ i< w2. s[i] -=s[i-1]+s[i+1] ;for all odd i< w3. s[i]+=(s[i-1]+s[i+1]+4 *s[i]+8)> >

for all even i< w2. s[i] -= s[i-1]+s[i+1] ;for all odd i< w3. s[i]+=( s[i-1]+s[i+1]+4 *s[i]+8)> >

Definition at line 576 of file snow.txt.

◆ i< w4. s[i]+=(3 *(s[i-1]+s[i+1]))>

for all even i< w4. s[i]+=(3 *(s[i-1]+s[i+1]))>

Definition at line 577 of file snow.txt.

level
uint8_t level
Definition: svq3.c:207
F
#define F(x)
LH
#define LH(psrc)
Definition: generic_macros_msa.h:93
H2
vertical halfpel samples are found by H2[y][x]
Definition: snow.txt:421
H1
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 H1
Definition: snow.txt:554
H3
vertical horizontal halfpel samples are found by H3[y][x]
Definition: snow.txt:427
gray
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted then it is pulled from the input slice through the input converter and horizontal scaler The result is also stored in the ring buffer to serve future vertical scaler requests When no more output can be generated because lines from a future slice would be then all remaining lines in the current slice are horizontally scaled and put in the ring buffer[This is done for luma and chroma, each with possibly different numbers of lines per picture.] Input to YUV Converter When the input to the main path is not planar bits per component YUV or bit gray
Definition: swscale.txt:52
residual
uint64_t residual
Definition: dirac_vlc.h:29
if
if(!keyframe)
Definition: snow.txt:61
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207