Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/aom/av1/encoder/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 20 kB image not shown  

Quelle  grain_test_vectors.h

  Sprache: C
 

/*
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

#ifndef AOM_AV1_ENCODER_GRAIN_TEST_VECTORS_H_
#define AOM_AV1_ENCODER_GRAIN_TEST_VECTORS_H_

/* Test vectors for emulation of different film grain types.
 * Note that bit depth would be derived from the bitstream and
 * not signaled in film grain metadata. The parameters are valid
 * for any bit depth.
 */


#if !CONFIG_REALTIME_ONLY
static aom_film_grain_t film_grain_test_vectors[16] = {
  /* Test 1 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      { { 160 },
        { 25136 },
        { 33144 },
        { 41160 },
        { 48168 },
        { 56136 },
        { 67128 },
        { 82144 },
        { 97152 },
        { 113144 },
        { 128176 },
        { 143168 },
        { 158176 },
        { 178184 } },
      14 /* num_points_y */,
      { { 160 },
        { 2064 },
        { 2888 },
        { 60104 },
        { 90136 },
        { 105160 },
        { 134168 },
        { 168208 } },
      8 /* num_cb_points */,
      { { 160 },
        { 2896 },
        { 5680 },
        { 6696 },
        { 80104 },
        { 10896 },
        { 122112 },
        { 137112 },
        { 169176 } },
      9 /* num_cr_points */,
      11 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 00, -58000, -76100, -430, -5182 },
      { 00, -49000, -3622, -300, -38739 },
      { 00, -47000, -3131, -250, -3213, -100 },
      8 /* ar_coeff_shift */,
      247 /* cb_mult */,
      192 /* cb_luma_mult */,
      18 /* cb_offset */,
      229 /* cr_mult */,
      192 /* cr_luma_mult */,
      54 /* cr_offset */,
      0 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /* chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 2 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      { { 096 }, { 25596 } },
      2 /* num_points_y */,
      { { 064 }, { 25564 } },
      2 /* num_cb_points */,
      { { 064 }, { 25564 } },
      2 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          000000000000,   0,
          00000000000127,
      },
      {
          000000000000,   0,
          00000000000127,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 3 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      { { 0192 }, { 255192 } },
      2 /* num_points_y */,
      { { 0128 }, { 255128 } },
      2 /* num_cb_points */,
      { { 0128 }, { 255128 } },
      2 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          4,   -72,  4,   12, -125,   -86,  8,   -19, -1619,
          -10, -217, -4258, -2,  -139,  14, -3667,  0,
      },
      {
          4,   -72,  4,   12, -125,   -86,  8,   -19, -1619,
          -10, -217, -4258, -2,  -139,  14, -3667,  0,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      1 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 4 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 160 },
          { 24137 },
          { 53146 },
          { 63155 },
          { 78155 },
          { 107150 },
          { 122147 },
          { 136147 },
          { 166153 },
      },
      9 /* num_points_y */,
      {
          { 160 },
          { 2072 },
          { 2782 },
          { 3391 },
          { 69121 },
          { 95143 },
          { 108154 },
          { 134169 },
          { 147177 },
      },
      9 /* num_cb_points */,
      {
          { 160 },
          { 2495 },
          { 5493 },
          { 6594 },
          { 7998 },
          { 109107 },
          { 124119 },
          { 139136 },
          { 169170 },
      },
      9 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          7,  -9,  24,   7, -127,  -1818, -30, -27, -42,
          13, -207, -18610755, -2,  -4, -9,  -22113,
      },
      {
          -3, -1, -4,  3,   -6,  -2,  3,  1,  -4, -10, -10, -5, -5,
          -3, -1, -13, -28, -25, -31, -6, -414, -6466,  0,
      },
      {
          0,  4, -313,  0,  1,   -30,  -3, -10, -68, -4, -2,
          -52, -3, -2062, -310,  -4, -1, -8,  -290,
      },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 5 */
  {
      1 /* apply_grain */,
      0 /* update_parameters */,
      { { 064 }, { 25564 } },
      2 /* num_points_y */,
      {
          { 096 },
          { 3290 },
          { 6483 },
          { 9676 },
          { 12868 },
          { 15959 },
          { 19148 },
          { 22334 },
          { 2550 },
      },
      9 /* num_cb_points */,
      {
          { 00 },
          { 3234 },
          { 6448 },
          { 9659 },
          { 12868 },
          { 15976 },
          { 19183 },
          { 22390 },
          { 25596 },
      },
      9 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          -22,  -57,   -64,   -2, -11,  -2,  0,  -22,
          -3, -513, -136,  -148,  -118, -36580,
      },
      {
          -2, -1, -314, -4, -1, -30, -17, -3172,
          0,  1,  0,  -750, -8, -222,  2, -4,  0,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      1063 /* random_seed */
  },
  /* Test 6 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 096 },
          { 2092 },
          { 3988 },
          { 5984 },
          { 7880 },
          { 9875 },
          { 11870 },
          { 13765 },
          { 15760 },
          { 17753 },
          { 19646 },
          { 21638 },
          { 23527 },
          { 2550 },
      },
      14 /* num_points_y */,
      { { 00 } },
      0 /* num_cb_points */,
      { { 00 } },
      0 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          0000000000000,
          000000000000,
      },
      {
          0000000000000,
          000000000000,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      2754 /* random_seed */
  },
  /* Test 7 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 00 },
          { 2027 },
          { 3938 },
          { 5946 },
          { 7853 },
          { 9860 },
          { 11865 },
          { 13770 },
          { 15775 },
          { 17780 },
          { 19684 },
          { 21688 },
          { 23592 },
          { 25596 },
      },
      14 /* num_points_y */,
      { { 00 }, { 2550 } },
      2 /* num_cb_points */,
      { { 00 }, { 2550 } },
      2 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          0000000000000,
          000000000000,
      },
      {
          0000000000000,
          000000000000,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 8 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      { { 096 }, { 25596 } },
      2 /* num_points_y */,
      { { 062 }, { 25562 } },
      2 /* num_cb_points */,
      { { 062 }, { 25562 } },
      2 /* num_cr_points */,
      11 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          0,  -2, -28,   5,  -11,   -15,  16,  -33, -9,  6,
          -1, -310, -47630,  -153,  11, -4275,  -69,
      },
      {
          1,  -1, -19,   5,  01,   -15,  15,  -32, -108,
          -2, -411, -46621, -163,  13, -4375,  -55,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 9 */
  {
      1 /* apply_grain */,
      0 /* update_parameters */,
      { { 048 }, { 25548 } },
      2 /* num_points_y */,
      { { 032 }, { 25532 } },
      2 /* num_cb_points */,
      { { 032 }, { 25532 } },
      2 /* num_cr_points */,
      10 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 10, -30, -20, -391, -241210360, -9, -24113 },
      { 000000000000127 },
      { 000000000000127 },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 10 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      { { 048 }, { 25548 } },
      2 /* num_points_y */,
      { { 032 }, { 25532 } },
      2 /* num_cb_points */,
      { { 032 }, { 25532 } },
      2 /* num_cr_points */,
      10 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 10, -30, -20, -391, -241210360, -9, -24113 },
      { -7, -6, -48, -222, -3, -4573, -11, -26, -52760 },
      { -7, -6, -48, -222, -3, -4573, -11, -26, -52760 },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 11 */
  {
      1 /* apply_grain */,
      0 /* update_parameters */,
      { { 032 }, { 25532 } },
      2 /* num_points_y */,
      {
          { 048 },
          { 3245 },
          { 6442 },
          { 9638 },
          { 12834 },
          { 15929 },
          { 19124 },
          { 22317 },
          { 2550 },
      },
      9 /* num_cb_points */,
      {
          { 00 },
          { 3217 },
          { 6424 },
          { 9629 },
          { 12834 },
          { 15938 },
          { 19142 },
          { 22345 },
          { 25548 },
      },
      9 /* num_cr_points */,
      10 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          7,  -9,  24,   7, -127,  -1818, -30, -27, -42,
          13, -207, -18610755, -2,  -4, -9,  -22113,
      },
      {
          -3, -1, -4,  3,   -6,  -2,  3,  1,  -4, -10, -10, -5, -5,
          -3, -1, -13, -28, -25, -31, -6, -414, -6466,  0,
      },
      {
          0,  4, -313,  0,  1,   -30,  -3, -10, -68, -4, -2,
          -52, -3, -2062, -310,  -4, -1, -8,  -290,
      },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      1357 /* random_seed */
  },
  /* Test 12 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 160 },
          { 2449 },
          { 3969 },
          { 4684 },
          { 5391 },
          { 63100 },
          { 78114 },
          { 92134 },
          { 164139 },
      },
      9 /* num_points_y */,
      {
          { 160 },
          { 2031 },
          { 2642 },
          { 3354 },
          { 4065 },
          { 4772 },
          { 5685 },
          { 84123 },
          { 152157 },
      },
      9 /* num_cb_points */,
      {
          { 160 },
          { 2514 },
          { 3933 },
          { 4740 },
          { 5447 },
          { 6462 },
          { 7976 },
          { 9483 },
          { 167101 },
      },
      9 /* num_cr_points */,
      10 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 00, -58000, -76100, -430, -5182 },
      { 00, -49000, -3622, -300, -38739 },
      { 00, -47000, -3131, -250, -3213, -100 },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      0 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 13 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 048 },
          { 2046 },
          { 3944 },
          { 5942 },
          { 7840 },
          { 9838 },
          { 11835 },
          { 13733 },
          { 15730 },
          { 17727 },
          { 19623 },
          { 21619 },
          { 23513 },
          { 2550 },
      },
      14 /* num_points_y */,
      { { 00 }, { 2550 } },
      0 /* num_cb_points */,
      { { 00 }, { 2550 } },
      0 /* num_cr_points */,
      10 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 10, -30, -20, -391, -241210360, -9, -24113 },
      { 0000000000000 },
      { 0000000000000 },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 14 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 00 },
          { 2013 },
          { 3919 },
          { 5923 },
          { 7827 },
          { 9830 },
          { 11833 },
          { 13735 },
          { 15738 },
          { 17740 },
          { 19642 },
          { 21644 },
          { 23546 },
          { 25548 },
      },
      14 /* num_points_y */,
      { { 00 }, { 2550 } },
      0 /* num_cb_points */,
      { { 00 }, { 2550 } },
      0 /* num_cr_points */,
      10 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 10, -30, -20, -391, -241210360, -9, -24113 },
      { 0000000000000 },
      { 0000000000000 },
      8 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      1 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 15 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      { { 096 }, { 25596 } },
      1 /* num_points_y */,
      { { 096 }, { 25596 } },
      0 /* num_cb_points */,
      { { 096 }, { 25596 } },
      0 /* num_cr_points */,
      11 /* scaling_shift */,
      2 /* ar_coeff_lag */,
      { 5, -15, -10, -190, -1265130, -5, -1256 },
      { 22, -24, -511, -1837, -20, -1539, -70 },
      { 23, -24, -5, -10, -1838, -20, -1539, -55 },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      1 /*chroma_scaling_from_luma*/,
      0 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
  /* Test 16 */
  {
      1 /* apply_grain */,
      1 /* update_parameters */,
      {
          { 160 },
          { 58126 },
          { 87120 },
          { 97122 },
          { 112125 },
          { 126131 },
          { 141139 },
          { 199153 },
      },
      8 /* num_points_y */,
      {
          { 160 },
          { 5968 },
          { 6676 },
          { 7382 },
          { 7985 },
          { 8686 },
          { 15195 },
          { 192101 },
      },
      8 /* num_cb_points */,
      {
          { 160 },
          { 5964 },
          { 8980 },
          { 9986 },
          { 11490 },
          { 12993 },
          { 14497 },
          { 20385 },
      },
      8 /* num_cr_points */,
      10 /* scaling_shift */,
      3 /* ar_coeff_lag */,
      {
          41,   30,   1,  -38,  -37,  -231, -25,
          0, -106, -17, -453365,  -5, -17866,
      },
      {
          0,  -2, -28,   5,  -11,   -15,  16,  -33, -9,  6,
          -1, -310, -47630,  -153,  11, -4275,  -69,
      },
      {
          1,  -1, -19,   5,  01,   -15,  15,  -32, -108,
          -2, -411, -46621, -163,  13, -4375,  -55,
      },
      7 /* ar_coeff_shift */,
      128 /* cb_mult */,
      192 /* cb_luma_mult */,
      256 /* cb_offset */,
      128 /* cr_mult */,
      192 /* cr_luma_mult */,
      256 /* cr_offset */,
      1 /* overlap_flag */,
      0 /* clip_to_restricted_range */,
      8 /* bit_depth */,
      0 /*chroma_scaling_from_luma*/,
      2 /* grain_scale_shift*/,
      45231 /* random_seed */
  },
};
#endif  // !CONFIG_REALTIME_ONLY
#endif  // AOM_AV1_ENCODER_GRAIN_TEST_VECTORS_H_

Messung V0.5 in Prozent
C=92 H=84 G=87

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-06) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.