Hi.
I used MSC for scaling such as below.
The result is not NV12 but NV21.
Can you check this issue?
I'm attaching coeff , scaling ratio, the source file and result file.
[scaling info]
[coeff]
void scale_set_coeff(tivx_vpac_msc_coefficients_t* coeff, uint32_t interpolation) { uint32_t i; uint32_t idx; uint32_t weight; idx = 0; coeff->single_phase[0][idx ++] = 0; coeff->single_phase[0][idx ++] = 0; coeff->single_phase[0][idx ++] = 256; coeff->single_phase[0][idx ++] = 0; coeff->single_phase[0][idx ++] = 0; idx = 0; coeff->single_phase[1][idx ++] = 0; coeff->single_phase[1][idx ++] = 0; coeff->single_phase[1][idx ++] = 256; coeff->single_phase[1][idx ++] = 0; coeff->single_phase[1][idx ++] = 0; if (VX_INTERPOLATION_BILINEAR == interpolation) { idx = 0; for (i = 0; i < 32; i++) { weight = i << 2; coeff->multi_phase[0][idx ++] = 0; coeff->multi_phase[0][idx ++] = 0; coeff->multi_phase[0][idx ++] = 256 - weight; coeff->multi_phase[0][idx ++] = weight; coeff->multi_phase[0][idx ++] = 0; } idx = 0; for (i = 0; i < 32; i++) { weight = (i + 32) << 2; coeff->multi_phase[1][idx ++] = 0; coeff->multi_phase[1][idx ++] = 0; coeff->multi_phase[1][idx ++] = 256 - weight; coeff->multi_phase[1][idx ++] = weight; coeff->multi_phase[1][idx ++] = 0; } idx = 0; for (i = 0; i < 32; i++) { weight = i << 2; coeff->multi_phase[2][idx ++] = 0; coeff->multi_phase[2][idx ++] = 0; coeff->multi_phase[2][idx ++] = 256 - weight; coeff->multi_phase[2][idx ++] = weight; coeff->multi_phase[2][idx ++] = 0; } idx = 0; for (i = 0; i < 32; i++) { weight = (i + 32) << 2; coeff->multi_phase[3][idx ++] = 0; coeff->multi_phase[3][idx ++] = 0; coeff->multi_phase[3][idx ++] = 256 - weight; coeff->multi_phase[3][idx ++] = weight; coeff->multi_phase[3][idx ++] = 0; } } else { /* STR_VX_INTERPOLATION_NEAREST_NEIGHBOR */ idx = 0; for (i = 0; i < 32; i++) { coeff->multi_phase[0][idx ++] = 0; coeff->multi_phase[0][idx ++] = 0; coeff->multi_phase[0][idx ++] = 256; coeff->multi_phase[0][idx ++] = 0; coeff->multi_phase[0][idx ++] = 0; } idx = 0; for (i = 0; i < 32; i++) { coeff->multi_phase[1][idx ++] = 0; coeff->multi_phase[1][idx ++] = 0; coeff->multi_phase[1][idx ++] = 0; coeff->multi_phase[1][idx ++] = 256; coeff->multi_phase[1][idx ++] = 0; } idx = 0; for (i = 0; i < 32; i++) { coeff->multi_phase[2][idx ++] = 0; coeff->multi_phase[2][idx ++] = 0; coeff->multi_phase[2][idx ++] = 256; coeff->multi_phase[2][idx ++] = 0; coeff->multi_phase[2][idx ++] = 0; } idx = 0; for (i = 0; i < 32; i++) { coeff->multi_phase[3][idx ++] = 0; coeff->multi_phase[3][idx ++] = 0; coeff->multi_phase[3][idx ++] = 0; coeff->multi_phase[3][idx ++] = 256; coeff->multi_phase[3][idx ++] = 0; } } }
[input file (2048x1280)]
0000000001_2048x1280_input.zip
[output file (640x256)]