コード例 #1
0
// Quantise in-place transformed coefficients (without LL subband prediction)
const Picture quantise_transform_np(const Picture& transform,
                                    const int qIndex,
                                    const Array1D& qMatrix) {
  Picture result(transform.format());
  result.y(quantise_transform_np(transform.y(), qIndex, qMatrix));
  result.c1(quantise_transform_np(transform.c1(), qIndex, qMatrix));
  result.c2(quantise_transform_np(transform.c2(), qIndex, qMatrix));
  return result;
}
コード例 #2
0
const Picture inverse_quantise_transform_np(const Picture& qCoeffs,
                                            const int qIndex,
                                            const Array1D& qMatrix) {
  Picture result(qCoeffs.format());
  result.y(inverse_quantise_transform_np(qCoeffs.y(), qIndex, qMatrix));
  result.c1(inverse_quantise_transform_np(qCoeffs.c1(), qIndex, qMatrix));
  result.c2(inverse_quantise_transform_np(qCoeffs.c2(), qIndex, qMatrix));
  return result;
}
コード例 #3
0
// Quantise in-place transformed coefficients of a whole picture as slices
// Using LL (DC) subband prediction
// Uses a quantisation matrix
const Picture quantise_transform(const Picture& transform,
                                 const Array2D& qIndices,
                                 const Array1D& qMatrix) {
  Picture result(transform.format());
  result.y(quantise_transform(transform.y(), qIndices, qMatrix));
  result.c1(quantise_transform(transform.c1(), qIndices, qMatrix));
  result.c2(quantise_transform(transform.c2(), qIndices, qMatrix));
  return result;
}