1. An encoder, comprising: a memory; and a processor configured to receive a video signal and provide a residual indicative of a difference between the video signal and a reconstructed video signal, the processor further configured to perform a transform on the residual to provide a plurality of transform coefficients and rate-distortion optimize the plurality of transform coefficients in accordance with an HEVC state transition scheme to provide a rate-distortion optimized plurality of quantized coefficients, the processor further configured to encode the plurality of quantized coefficients in accordance with context-adaptive binary arithmetic coding, wherein each of the rate-distortion optimized plurality of quantized coefficients is associated with a respective plurality of candidate coefficients, wherein a respective arc is associated with each of the plurality of candidate coefficients, the respective arc comprising at least three of context, cost, distortion cost, rate cost, state, or path parameters.