A little confused here. Why do we need to do reordering and what's RLE? Could someone explain more about entropy encoding?
THWG
You can refer to https://en.wikipedia.org/wiki/Run-length_encoding for RLE. It's simply encoding the data into [value + number of occurrence of vallue]. For this specific task, since there are significantly more numbers of 0s, the RLE can also encode in this way (I think this also work for sparse vector/matrix):
struct {
int number;
int number_of_zeros_following;
}
For example [1,0,0,3,0,0,0,0,0,4,0] can be encoded as [[1,2], [3,5], [4,1]].
alexz
Why do we need reordering? Is this because 0 usually appears on the right and bottom side (which represents high-frequency basis)?
A little confused here. Why do we need to do reordering and what's RLE? Could someone explain more about entropy encoding?
You can refer to https://en.wikipedia.org/wiki/Run-length_encoding for RLE. It's simply encoding the data into [value + number of occurrence of vallue]. For this specific task, since there are significantly more numbers of 0s, the RLE can also encode in this way (I think this also work for sparse vector/matrix): struct { int number; int number_of_zeros_following; } For example [1,0,0,3,0,0,0,0,0,4,0] can be encoded as [[1,2], [3,5], [4,1]].
Why do we need reordering? Is this because 0 usually appears on the right and bottom side (which represents high-frequency basis)?