| CPC H04N 19/126 (2014.11) [H04N 19/119 (2014.11); H04N 19/12 (2014.11); H04N 19/176 (2014.11); H04N 19/42 (2014.11); H04N 19/463 (2014.11); H04N 19/60 (2014.11)] | 18 Claims | 

| 
               1. An apparatus for decoding a current block of video, comprising: 
            a memory; and 
                a processor, the processor configured to execute instructions stored in the memory to: 
              decode, from a compressed bitstream, a flag indicating whether a residual block for the current block is encoded using vector quantization (VQ); 
                  in response to the flag indicating that the residual block is encoded using VQ, execute instructions to: 
                  decode a parameter indicating an entry in a codebook wherein to decode the parameter indicating the entry in the codebook comprises to: 
                    decode a gain index identifying a gain scalar from a gain codebook, wherein the gain scalar represents a magnitude of the residual block; 
                      decode a shape index identifying a unit-norm vector from a shape codebook, wherein the unit-norm vector represents a directional pattern of the residual block; and 
                      decode a sign bit value; and 
                    decode the residual block using the entry, wherein to decode the residual block comprises to: decode the residual block by multiplying the sign bit value, the gain scalar, and the unit-norm vector; 
                  in response to the flag indicating that the residual block is not encoded using VQ, execute instructions to: 
                  decode the residual block based on a skip flag indicating whether the current block is encoded using transform skip; and 
                  reconstruct the current block using the residual block. 
                 |