A video coding method, comprising, when a coding frame rate drops below a predetermined threshold: buffering a plurality of input video frames generated by a camera, assigning weights to each buffered input frame based on a frame quality metric, coding a highest weighted frame, and discarding a plurality of lower-weighted frames from the buffer without coding, wherein the coding comprises, for each pixel block of the frame to be coded: performing a motion estimation search between the respective pixel block of the frame to be coded and a plurality of locally-stored reference frames, for each candidate reference frame identified by the search, determining a similarity measure between the respective pixel block to be coded and a matching pixel block from the respective candidate reference frame, a higher similarity measure indicating a higher degree of similarity and representing a higher quality match between pixel blocks, scaling the similarity measures according to the candidate reference frames' temporal locations, wherein scaling is performed according to a monotone decreasing function that transitions from a maximum value for the reference frame temporally closest to the input frame, to a minimum value for the reference frame temporally farthest from the input frame, and selecting a matching pixel block as a prediction reference for the pixel block to be coded according to the highest scaled similarity measure, and coding the input pixel block with reference to the prediction reference. buffering a plurality of input video frames generated by a camera, assigning weights to each buffered input frame based on a frame quality metric, coding a highest weighted frame, and discarding a plurality of lower-weighted frames from the buffer without coding, wherein the coding comprises, for each pixel block of the frame to be coded: performing a motion estimation search between the respective pixel block of the frame to be coded and a plurality of locally-stored reference frames, for each candidate reference frame identified by the search, determining a similarity measure between the respective pixel block to be coded and a matching pixel block from the respective candidate reference frame, a higher similarity measure indicating a higher degree of similarity and representing a higher quality match between pixel blocks, scaling the similarity measures according to the candidate reference frames' temporal locations, wherein scaling is performed according to a monotone decreasing function that transitions from a maximum value for the reference frame temporally closest to the input frame, to a minimum value for the reference frame temporally farthest from the input frame, and selecting a matching pixel block as a prediction reference for the pixel block to be coded according to the highest scaled similarity measure, and performing a motion estimation search between the respective pixel block of the frame to be coded and a plurality of locally-stored reference frames, for each candidate reference frame identified by the search, determining a similarity measure between the respective pixel block to be coded and a matching pixel block from the respective candidate reference frame, a higher similarity measure indicating a higher degree of similarity and representing a higher quality match between pixel blocks, scaling the similarity measures according to the candidate reference frames' temporal locations, wherein scaling is performed according to a monotone decreasing function that transitions from a maximum value for the reference frame temporally closest to the input frame, to a minimum value for the reference frame temporally farthest from the input frame, and selecting a matching pixel block as a prediction reference for the pixel block to be coded according to the highest scaled similarity measure, and coding the input pixel block with reference to the prediction reference.