An apparatus (20, 30) for coding video data, comprising: a memory for storing the video data, the memory including a buffer; and a hardware processor operationally coupled to the memory and configured to: determine and store a scaling parameter based upon a total number of pixels within a slice of video data; determine and store a data structure associating a plurality of input values with their reciprocal values; receive the video data to be coded, the video data comprising at least one slice divided into a plurality of blocks; determine a threshold value based upon the stored scaling parameter; for a block of the slice to be coded, in response to a determination that a number of remaining pixels in the slice is less than the threshold value, decrement the scaling parameter and determine a reduced threshold value based upon the decremented scaling parameter; and perform one or more fixed-point approximation operations to determine a target rate for the block, based upon a number of bits remaining in the slice and a reciprocal value associated with the number of remaining pixels scaled based upon the scaling factor, wherein the reciprocal value is determined using the stored data structure. a memory for storing the video data, the memory including a buffer; and a hardware processor operationally coupled to the memory and configured to: determine and store a scaling parameter based upon a total number of pixels within a slice of video data; determine and store a data structure associating a plurality of input values with their reciprocal values; receive the video data to be coded, the video data comprising at least one slice divided into a plurality of blocks; determine a threshold value based upon the stored scaling parameter; for a block of the slice to be coded, in response to a determination that a number of remaining pixels in the slice is less than the threshold value, decrement the scaling parameter and determine a reduced threshold value based upon the decremented scaling parameter; and perform one or more fixed-point approximation operations to determine a target rate for the block, based upon a number of bits remaining in the slice and a reciprocal value associated with the number of remaining pixels scaled based upon the scaling factor, wherein the reciprocal value is determined using the stored data structure. determine and store a scaling parameter based upon a total number of pixels within a slice of video data; determine and store a data structure associating a plurality of input values with their reciprocal values; receive the video data to be coded, the video data comprising at least one slice divided into a plurality of blocks; determine a threshold value based upon the stored scaling parameter; for a block of the slice to be coded, in response to a determination that a number of remaining pixels in the slice is less than the threshold value, decrement the scaling parameter and determine a reduced threshold value based upon the decremented scaling parameter; and perform one or more fixed-point approximation operations to determine a target rate for the block, based upon a number of bits remaining in the slice and a reciprocal value associated with the number of remaining pixels scaled based upon the scaling factor, wherein the reciprocal value is determined using the stored data structure.