A method of transcoding a bitstream (FBI) containing video data in a first format (F1) into a bitstream (FB2) containing said video data in a second format (F2), the video data comprising frames (T1i, T2i), said frames being divided in the first format into first coding units (uc1) each covering a region of the frame and defining a first coding structure (SC1i) for each frame, and being divided in the second format (F2) into second coding units (uc2) defining a second coding structure (SC2i) for each frame, the method comprising:
- a bitstream decoding step providing decoded video data, data representative of the first coding structure (SC1i) of the frames and, for some or all of the first coding units (uc1), prediction data, the prediction data of at least one first coding unit (uc1) comprising a motion vector (VM), and
- a re-encoding step during which the decoded video data are encoded in the second format (F2),
- characterized in that during the re-encoding step, for at least one frame of the decoded video data:
- an intermediate coding structure (SCIi) is constructed, comprising intermediate coding units (uci) each constructed to correspond to the merging of one or more first coding units (uc1) covered by said intermediate coding unit when a first condition (C1) is satisfied, the first condition being that at least one dissimilarity metric (M) associated with the intermediate coding unit in question and determined from the motion vectors of said first coding units is less than a predetermined threshold (T), at least one intermediate coding unit (uci) corresponding to the merging of at least two first coding units (uc1),
- each of the intermediate coding units (uci) is assigned prediction data constructed from prediction data of the first coding unit or units merged to form said intermediate coding unit, and
- the decoded video data are re-encoded in the second format (F2) by constructing the second coding structure (uc2) based on the intermediate coding structure (SCIi).