Speedup techniques for rate distortion optimized quantization
Techniques for selecting a coding mode for an image coding process are described. Coding modes can be selected through a coding mode transition state machine, a re-quantization process, selection of an optimal transform size, by skipping some quantization parameters, or by performing motion search.
1. A method for encoding a video stream, comprising:
selecting an initial quantization parameter and an initial coding mode;
evaluating coding modes for subsequent quantization parameters based on a coding mode transition state machine comprising coding mode states and transitions between coding mode states, and wherein transition between two coding mode states is not allowed when a transition likelihood score between the two coding mode states is lower than a threshold;
selecting a coding mode among the evaluated coding modes and an associated quantization parameter; and
encoding the video stream based on the selected coding mode and the quantization parameter.
2. The method of claim 1 , wherein the transition likelihood score is assigned based on a type of a coding block to be coded.
3. The method of claim 1 , wherein the transition likelihood score is assigned based on a type of transition between the corresponding pair of coding mode states.
4. The method of claim 1 , wherein transitions between the coding mode states in the coding mode transition state are selected based on an importance of a coding block to be coded.
5. The method of claim 1 , wherein the transition likelihood threshold for a non-reference coding block is higher than the transition likelihood threshold for a reference coding block.
6. The method of claim 1 , wherein transitions between the coding mode states in the coding mode transition state are selected based on the number of quantization parameters evaluated.
7. The method of claim 1 , wherein the mode transition state machine is adjusted to allow only transitions to a same coding mode state after a predetermined number of quantization parameters are evaluated.
8. The method of claim 1 , wherein the mode transition state machine is adjusted to allow more transitions between coding mode states based on one or more coded neighboring blocks.
9. A coding apparatus, comprising:
a memory that stores a set of instructions; and
one or more processors configured to execute the set of instructions to cause the coding apparatus to:
select an initial quantization parameter and an initial coding mode;
evaluate coding modes for subsequent quantization parameters based on a coding mode transition state machine comprising coding mode states and transitions between coding mode states, and wherein transition between two coding mode states is not allowed when a transition likelihood score between the two coding mode states is lower than a threshold;
select a coding mode among the evaluated coding modes and an associated quantization parameter; and
encode a video stream based on the selected coding mode and the quantization parameter.
10. The coding apparatus of claim 9 , wherein the transition likelihood score is assigned based on a type of a coding block to be coded.
11. The coding apparatus of claim 9 , wherein the transition likelihood score is assigned based on a type of transition between the corresponding pair of coding mode states.
12. The coding apparatus of claim 9 , wherein transitions between the coding mode states in the coding mode transition state are selected based on an importance of a coding block to be coded.
13. The coding apparatus of claim 9 , wherein the transition likelihood threshold for a non-reference coding block is higher than the transition likelihood threshold for a reference coding block.
14. The coding apparatus of claim 9 , wherein transitions between the coding mode states in the coding mode transition state are selected based on the number of quantization parameters evaluated.
15. The coding apparatus of claim 9 , wherein the mode transition state machine is adjusted to allow only transitions to a same coding mode state after a predetermined number of quantization parameters are evaluated.
16. The coding apparatus of claim 9 , wherein the mode transition state machine is adjusted to allow more transitions between coding mode states based on one or more coded neighboring blocks.
17. A non-transitory computer-readable storage medium having stored therein instructions that are executable by one or more processors of a coding system to perform a method for encoding a video stream, the method comprising:
selecting an initial quantization parameter and an initial coding mode;
evaluating coding modes for subsequent quantization parameters based on a coding mode transition state machine comprising coding mode states and transitions between coding mode states, and wherein transition between two coding mode states is not allowed when a transition likelihood score between the two coding mode states is lower than a threshold;
selecting a coding mode among the evaluated coding modes and an associated quantization parameter; and
encoding the video stream based on the selected coding mode and the quantization parameter.