A method of processing video formed of a plurality of image frames carried out at a display/playback device , the method comprising: determining , using one or more look up tables, a native pixel resolution of the video on the basis of at least the codec type of the video, the bit rate of the video and the frames per second of the video, the native pixel resolution of the video being the pixel resolution of the original frames of the video prior to any upscaling or downscaling of the original frames of the video by an encoder; and after the determining the native pixel resolution of the video, performing motion detection between successive frames in the video; wherein: if the determined native pixel resolution of the video is the same as the pixel resolution of the video as specified in a container which contains the video data, then the motion detection is performed using a mask having a size that depends on the pixel resolution of the video as specified in the container ; and if the determined native pixel resolution of the video is lower than the pixel resolution of the video as specified in the container which contains the video data, then the motion detection is performed using a mask having a size that depends on the native pixel resolution of the video and not on the pixel resolution of the video as specified in the container . determining , using one or more look up tables, a native pixel resolution of the video on the basis of at least the codec type of the video, the bit rate of the video and the frames per second of the video, the native pixel resolution of the video being the pixel resolution of the original frames of the video prior to any upscaling or downscaling of the original frames of the video by an encoder; and after the determining the native pixel resolution of the video, performing motion detection between successive frames in the video; wherein: if the determined native pixel resolution of the video is the same as the pixel resolution of the video as specified in a container which contains the video data, then the motion detection is performed using a mask having a size that depends on the pixel resolution of the video as specified in the container ; and if the determined native pixel resolution of the video is lower than the pixel resolution of the video as specified in the container which contains the video data, then the motion detection is performed using a mask having a size that depends on the native pixel resolution of the video and not on the pixel resolution of the video as specified in the container . if the determined native pixel resolution of the video is the same as the pixel resolution of the video as specified in a container which contains the video data, then the motion detection is performed using a mask having a size that depends on the pixel resolution of the video as specified in the container ; and if the determined native pixel resolution of the video is lower than the pixel resolution of the video as specified in the container which contains the video data, then the motion detection is performed using a mask having a size that depends on the native pixel resolution of the video and not on the pixel resolution of the video as specified in the container . <EOS>