In some implementations, the sub-block of the second component corresponds to four sub-blocks of the first component. The four sub-blocks have motion vectors MV0=(MV0x, MV0y), MV1=(MV1x, MV1y), MV2=(MV2x, MV2y) and MV3=(MV3x, MV3y) respectively. The method 1300 or 1400 includes calculating an intermediate set of motion vectors MV*=(MV*x, MV*y) as MV*x=Shift(MV0x+MV1x+MV2x+MV3x, 2) and MV*y=Shift(MVy0+MVy1+MVy2+MVy3,2), wherein Shift(x, s)=(x+off)>>s, wherein off and s are integers, and wherein >> represents a right shift operation. The method 1300 or 1400 also includes applying a factor to the intermediate set of motion vectors to obtain the derived motion vectors, wherein the factor is associated with the color format.
In some implementations, the sub-block of the second component corresponds to four sub-blocks of the first component. The four sub-blocks have motion vectors MV0=(MV0x, MV0y), MV1=(MV1x, MV1y), MV2=(MV2x, MV2y) and MV3=(MV3x, MV3y) respectively. The method 1300 or 1400 comprises calculating an intermediate set of motion vectors MV*=(MV*x, MV*y) as MV*x=SignShift(MV0x+MV1x+MV2x+MV3x, 2) and MV*y=SignShift(MV0y+MV1y+MV2y+MV3y, 2), wherein