21. A method comprising: accessing, without initially decoding, an arithmetically coded bitstream that includes at least a first coded portion and a second coded portion, wherein the first coded portion and the second coded portion have been coded with a code having memory, such that decoding the second coded portion relies on an output from decoding the first coded portion; and replacing the first coded portion with a replacement arithmetically coded portion to produce a modified coded bitstream for which a decoding of the second coded portion will produce a common result based on either an output from decoding the first coded portion or an output from decoding the replacement arithmetically coded portion, wherein the replacement arithmetically coded portion generates a Context-based Adaptive Binary Arithmetic Coding (CABAC) state value that is the same as a CABAC state value generated by the first coded portion.
21. A method comprising: accessing, without initially decoding, an arithmetically coded bitstream that includes at least a first coded portion and a second coded portion, wherein the first coded portion and the second coded portion have been coded with a code having memory, such that decoding the second coded portion relies on an output from decoding the first coded portion; and replacing the first coded portion with a replacement arithmetically coded portion to produce a modified coded bitstream for which a decoding of the second coded portion will produce a common result based on either an output from decoding the first coded portion or an output from decoding the replacement arithmetically coded portion, wherein the replacement arithmetically coded portion generates a Context-based Adaptive Binary Arithmetic Coding (CABAC) state value that is the same as a CABAC state value generated by the first coded portion. 24. The method of claim 21 wherein: the second coded portion comprises more than one syntax element, and each of the more than one syntax elements has a corresponding state variable value that is produced during decoding of the modified coded bitstream, and the replacement arithmetically coded portion for the first coded portion maintains the state variable values for each of the more than one syntax elements the same as if the first coded portion were used instead of the replacement arithmetically coded portion in the modified coded bitstream.