Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  dispc_coefs.c   Sprache: unbekannt

 
// SPDX-License-Identifier: GPL-2.0-only
/*
 * linux/drivers/video/omap2/dss/dispc_coefs.c
 *
 * Copyright (C) 2011 Texas Instruments
 * Author: Chandrabhanu Mahapatra <cmahapatra@ti.com>
 */


#include <linux/kernel.h>
#include <video/omapfb_dss.h>

#include "dispc.h"

static const struct dispc_coef coef3_M8[8] = {
 { 0,  0128,  00 },
 { 0, -4123,  90 },
 { 0, -4108240 },
 { 0, -2,  87430 },
 { 064,  64,  00 },
 { 043,  87, -20 },
 { 024108, -40 },
 { 0,  9123, -40 },
};

static const struct dispc_coef coef3_M9[8] = {
 { 0,  6116,  60 },
 { 0,  0112160 },
 { 0, -2100300 },
 { 0, -2,  83470 },
 { 064,  64,  00 },
 { 047,  83, -20 },
 { 030100, -20 },
 { 016112,  00 },
};

static const struct dispc_coef coef3_M10[8] = {
 { 010108100 },
 { 0,  3104210 },
 { 0,  0,  94340 },
 { 0, -1,  80490 },
 { 064,  64,  00 },
 { 049,  80, -10 },
 { 034,  94,  00 },
 { 021104,  30 },
};

static const struct dispc_coef coef3_M11[8] = {
 { 014100140 },
 { 0,  6,  98240 },
 { 0,  2,  90360 },
 { 0,  0,  78500 },
 { 064,  64,  00 },
 { 050,  78,  00 },
 { 036,  90,  20 },
 { 024,  98,  60 },
};

static const struct dispc_coef coef3_M12[8] = {
 { 016,  96160 },
 { 0,  9,  93260 },
 { 0,  4,  86380 },
 { 0,  1,  76510 },
 { 064,  64,  00 },
 { 051,  76,  10 },
 { 038,  86,  40 },
 { 026,  93,  90 },
};

static const struct dispc_coef coef3_M13[8] = {
 { 018,  92180 },
 { 010,  90280 },
 { 0,  5,  83400 },
 { 0,  1,  75520 },
 { 064,  64,  00 },
 { 052,  75,  10 },
 { 040,  83,  50 },
 { 028,  90100 },
};

static const struct dispc_coef coef3_M14[8] = {
 { 02088200 },
 { 01286300 },
 { 0,  681410 },
 { 0,  274520 },
 { 06464,  00 },
 { 05274,  20 },
 { 04181,  60 },
 { 03086120 },
};

static const struct dispc_coef coef3_M16[8] = {
 { 02284220 },
 { 01482320 },
 { 0,  878420 },
 { 0,  372530 },
 { 06464,  00 },
 { 05372,  30 },
 { 04278,  80 },
 { 03282140 },
};

static const struct dispc_coef coef3_M19[8] = {
 { 02480240 },
 { 01679330 },
 { 0,  976430 },
 { 0,  470540 },
 { 06464,  00 },
 { 05470,  40 },
 { 04376,  90 },
 { 03379160 },
};

static const struct dispc_coef coef3_M22[8] = {
 { 02578250 },
 { 01777340 },
 { 01074440 },
 { 0,  569540 },
 { 06464,  00 },
 { 05469,  50 },
 { 04474100 },
 { 03477170 },
};

static const struct dispc_coef coef3_M26[8] = {
 { 02676260 },
 { 01974350 },
 { 01172450 },
 { 0,  569540 },
 { 06464,  00 },
 { 05469,  50 },
 { 04572110 },
 { 03574190 },
};

static const struct dispc_coef coef3_M32[8] = {
 { 02774270 },
 { 01973360 },
 { 01271450 },
 { 0,  668540 },
 { 06464,  00 },
 { 05468,  60 },
 { 04571120 },
 { 03673190 },
};

static const struct dispc_coef coef5_M8[8] = {
 {   0,   0128,   0,   0 },
 {  -2,  14125, -10,   1 },
 {  -6,  33114, -15,   2 },
 { -10,  55,  98, -16,   1 },
 {   0, -14,  78,  78, -14 },
 {   1, -16,  98,  55, -10 },
 {   2, -15114,  33,  -6 },
 {   1, -10125,  14,  -2 },
};

static const struct dispc_coef coef5_M9[8] = {
 {  -3,  10114,  10,  -3 },
 {  -6,  24111,   0,  -1 },
 {  -8,  40103,  -7,   0 },
 { -11,  58,  91, -11,   1 },
 {   0, -12,  76,  76, -12 },
 {   1, -11,  91,  58, -11 },
 {   0,  -7103,  40,  -8 },
 {  -1,   0111,  24,  -6 },
};

static const struct dispc_coef coef5_M10[8] = {
 {  -4,  18100,  18,  -4 },
 {  -6,  30,  99,   8,  -3 },
 {  -8,  44,  93,   0,  -1 },
 {  -9,  58,  84,  -5,   0 },
 {   0,  -8,  72,  72,  -8 },
 {   0,  -5,  84,  58,  -9 },
 {  -1,   0,  93,  44,  -8 },
 {  -3,   8,  99,  30,  -6 },
};

static const struct dispc_coef coef5_M11[8] = {
 {  -5,  23,  92,  23,  -5 },
 {  -6,  34,  90,  13,  -3 },
 {  -6,  45,  85,   6,  -2 },
 {  -6,  57,  78,   0,  -1 },
 {   0,  -4,  68,  68,  -4 },
 {  -1,   0,  78,  57,  -6 },
 {  -2,   6,  85,  45,  -6 },
 {  -3,  13,  90,  34,  -6 },
};

static const struct dispc_coef coef5_M12[8] = {
 {  -4,  26,  84,  26,  -4 },
 {  -5,  36,  82,  18,  -3 },
 {  -4,  46,  78,  10,  -2 },
 {  -3,  55,  72,   5,  -1 },
 {   0,   0,  64,  64,   0 },
 {  -1,   5,  72,  55,  -3 },
 {  -2,  10,  78,  46,  -4 },
 {  -3,  18,  82,  36,  -5 },
};

static const struct dispc_coef coef5_M13[8] = {
 {  -3,  28,  78,  28,  -3 },
 {  -3,  37,  76,  21,  -3 },
 {  -2,  45,  73,  14,  -2 },
 {   0,  53,  68,   8,  -1 },
 {   0,   3,  61,  61,   3 },
 {  -1,   8,  68,  53,   0 },
 {  -2,  14,  73,  45,  -2 },
 {  -3,  21,  76,  37,  -3 },
};

static const struct dispc_coef coef5_M14[8] = {
 {  -2,  30,  72,  30,  -2 },
 {  -1,  37,  71,  23,  -2 },
 {   0,  45,  69,  16,  -2 },
 {   3,  52,  64,  10,  -1 },
 {   0,   6,  58,  58,   6 },
 {  -1,  10,  64,  52,   3 },
 {  -2,  16,  69,  45,   0 },
 {  -2,  23,  71,  37,  -1 },
};

static const struct dispc_coef coef5_M16[8] = {
 {   0,  31,  66,  31,   0 },
 {   1,  38,  65,  25,  -1 },
 {   3,  44,  62,  20,  -1 },
 {   6,  49,  59,  14,   0 },
 {   0,  10,  54,  54,  10 },
 {   0,  14,  59,  49,   6 },
 {  -1,  20,  62,  44,   3 },
 {  -1,  25,  65,  38,   1 },
};

static const struct dispc_coef coef5_M19[8] = {
 {   3,  32,  58,  32,   3 },
 {   4,  38,  58,  27,   1 },
 {   7,  42,  55,  23,   1 },
 {  10,  46,  54,  18,   0 },
 {   0,  14,  50,  50,  14 },
 {   0,  18,  54,  46,  10 },
 {   1,  23,  55,  42,   7 },
 {   1,  27,  58,  38,   4 },
};

static const struct dispc_coef coef5_M22[8] = {
 {   4,  33,  54,  33,   4 },
 {   6,  37,  54,  28,   3 },
 {   9,  41,  53,  24,   1 },
 {  12,  45,  51,  20,   0 },
 {   0,  16,  48,  48,  16 },
 {   0,  20,  51,  45,  12 },
 {   1,  24,  53,  41,   9 },
 {   3,  28,  54,  37,   6 },
};

static const struct dispc_coef coef5_M26[8] = {
 {   6,  33,  50,  33,   6 },
 {   8,  36,  51,  29,   4 },
 {  11,  40,  50,  25,   2 },
 {  14,  43,  48,  22,   1 },
 {   0,  18,  46,  46,  18 },
 {   1,  22,  48,  43,  14 },
 {   2,  25,  50,  40,  11 },
 {   4,  29,  51,  36,   8 },
};

static const struct dispc_coef coef5_M32[8] = {
 {   7,  33,  48,  33,   7 },
 {  10,  36,  48,  29,   5 },
 {  13,  39,  47,  26,   3 },
 {  16,  42,  46,  23,   1 },
 {   0,  19,  45,  45,  19 },
 {   1,  23,  46,  42,  16 },
 {   3,  26,  47,  39,  13 },
 {   5,  29,  48,  36,  10 },
};

const struct dispc_coef *dispc_ovl_get_scale_coef(int inc, int five_taps)
{
 int i;
 static const struct {
  int Mmin;
  int Mmax;
  const struct dispc_coef *coef_3;
  const struct dispc_coef *coef_5;
 } coefs[] = {
  { 2732, coef3_M32, coef5_M32 },
  { 2326, coef3_M26, coef5_M26 },
  { 2022, coef3_M22, coef5_M22 },
  { 1719, coef3_M19, coef5_M19 },
  { 1516, coef3_M16, coef5_M16 },
  { 1414, coef3_M14, coef5_M14 },
  { 1313, coef3_M13, coef5_M13 },
  { 1212, coef3_M12, coef5_M12 },
  { 1111, coef3_M11, coef5_M11 },
  { 1010, coef3_M10, coef5_M10 },
  {  9,  9,  coef3_M9,  coef5_M9 },
  {  4,  8,  coef3_M8,  coef5_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 },
  {  2,  2, coef3_M16, coef5_M16 },
  {  0,  1, coef3_M19, coef5_M19 },
 };

 inc /= 128;
 for (i = 0; i < ARRAY_SIZE(coefs); ++i)
  if (inc >= coefs[i].Mmin && inc <= coefs[i].Mmax)
   return five_taps ? coefs[i].coef_5 : coefs[i].coef_3;
 return NULL;
}

Messung V0.5 in Prozent
C=96 H=91 G=93

[zur Elbe Produktseite wechseln0.17QuellennavigatorsAnalyse erneut starten2026-06-05]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....
    

Besucher

Besucher

Statistik
#Sources=277311
#Domains=752002