A method for encoding a plurality of image frames comprising a first image frame and a second image frame , each image frame encoded using a first and a second encoder, the first encoder having a defined size of a first search window for block matching, the method comprising: dividing (S304) image data of the first image frame in a first direction being a horizontal or vertical direction to form a first and second portion of image data; encoding (S306) the first image frame by encoding (S202) the first portion of image data using the first encoder, and encoding (S204) the second portion of image data using the second encoder; dividing (S312) image data of the second image frame in the first direction to form a third and fourth portion of image data; encoding (S314) the second image frame by encoding (S212) the third portion of image data using the first encoder, and encoding (S214) the fourth portion of image data using the second encoder; characterised in that : a position of a boundary between the third and fourth portion of image data in the second image frame is offset in relation to a position of a boundary between the first and second portion of image data in the first image frame, such that a size of the third portion of image data is smaller compared to a size of the first portion of image data, wherein upon the first direction being a horizontal direction, the offset being half a height of the first search window, wherein the boundary is offset in a vertical direction; wherein upon the first direction being a vertical direction, the offset being half a width of the first search window, wherein the boundary is offset in a horizontal direction. dividing (S304) image data of the first image frame in a first direction being a horizontal or vertical direction to form a first and second portion of image data; encoding (S306) the first image frame by encoding (S202) the first portion of image data using the first encoder, and encoding (S204) the second portion of image data using the second encoder; dividing (S312) image data of the second image frame in the first direction to form a third and fourth portion of image data; encoding (S314) the second image frame by encoding (S212) the third portion of image data using the first encoder, and encoding (S214) the fourth portion of image data using the second encoder; characterised in that : a position of a boundary between the third and fourth portion of image data in the second image frame is offset in relation to a position of a boundary between the first and second portion of image data in the first image frame, such that a size of the third portion of image data is smaller compared to a size of the first portion of image data, wherein upon the first direction being a horizontal direction, the offset being half a height of the first search window, wherein the boundary is offset in a vertical direction; wherein upon the first direction being a vertical direction, the offset being half a width of the first search window, wherein the boundary is offset in a horizontal direction. wherein upon the first direction being a horizontal direction, the offset being half a height of the first search window, wherein the boundary is offset in a vertical direction; wherein upon the first direction being a vertical direction, the offset being half a width of the first search window, wherein the boundary is offset in a horizontal direction. <EOS>