This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[TDA4M] MSC output is not NV12 but NV21



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)]

0000000001_640x256_lfr.zip