conststruct tidss_scale_coefs *tidss_get_scale_coefs(struct device *dev,
u32 firinc, bool five_taps)
{ int i; int inc; staticconststruct { int mmin; int mmax; conststruct tidss_scale_coefs *coef3; conststruct tidss_scale_coefs *coef5; constchar *name;
} coefs[] = {
{ 27, 32, &coef3_m32, &coef5_m32, "M32" },
{ 23, 26, &coef3_m26, &coef5_m26, "M26" },
{ 20, 22, &coef3_m22, &coef5_m22, "M22" },
{ 17, 19, &coef3_m19, &coef5_m19, "M19" },
{ 15, 16, &coef3_m16, &coef5_m16, "M16" },
{ 14, 14, &coef3_m14, &coef5_m14, "M14" },
{ 13, 13, &coef3_m13, &coef5_m13, "M13" },
{ 12, 12, &coef3_m12, &coef5_m12, "M12" },
{ 11, 11, &coef3_m11, &coef5_m11, "M11" },
{ 10, 10, &coef3_m10, &coef5_m10, "M10" },
{ 9, 9, &coef3_m9, &coef5_m9, "M9" },
{ 4, 8, &coef3_m8, &coef5_m8, "M8" }, /* * When upscaling more than two times, blockiness and outlines * around the image are observed when M8 tables are used. M11, * M16 and M19 tables are used to prevent this.
*/
{ 3, 3, &coef3_m11, &coef5_m11, "M11" },
{ 2, 2, &coef3_m16, &coef5_m16, "M16" },
{ 0, 1, &coef3_m19, &coef5_m19, "M19" },
};
/* * inc is result of 0x200000 * in_size / out_size. This dividing * by 0x40000 scales it down to 8 * in_size / out_size. After * division the actual scaling factor is 8/inc.
*/
inc = firinc / 0x40000; for (i = 0; i < ARRAY_SIZE(coefs); ++i) { if (inc >= coefs[i].mmin && inc <= coefs[i].mmax) { if (five_taps) return coefs[i].coef5; else return coefs[i].coef3;
}
}
dev_err(dev, "%s: Coefficients not found for firinc 0x%08x, inc %d\n",
__func__, firinc, inc);
return NULL;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.