chromium/third_party/material_color_utilities/src/cpp/quantize/wu.cc

/*
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "cpp/quantize/wu.h"

#include <stdlib.h>

#include <cassert>
#include <cstdint>
#include <cstdio>
#include <vector>

#include "cpp/utils/utils.h"

namespace material_color_utilities {

struct Box {};

enum class Direction {};

constexpr int kIndexBits =;
constexpr int kIndexCount =;
constexpr int kTotalSize =;
constexpr int kMaxColors =;

IntArray;
DoubleArray;

int GetIndex(int r, int g, int b) {}

void ConstructHistogram(const std::vector<Argb>& pixels, IntArray& weights,
                        IntArray& m_r, IntArray& m_g, IntArray& m_b,
                        DoubleArray& moments) {}

void ComputeMoments(IntArray& weights, IntArray& m_r, IntArray& m_g,
                    IntArray& m_b, DoubleArray& moments) {}

int64_t Top(const Box& cube, const Direction direction, const int position,
            const IntArray& moment) {}

int64_t Bottom(const Box& cube, const Direction direction,
               const IntArray& moment) {}

int64_t Vol(const Box& cube, const IntArray& moment) {}

double Variance(const Box& cube, const IntArray& weights, const IntArray& m_r,
                const IntArray& m_g, const IntArray& m_b,
                const DoubleArray& moments) {}

double Maximize(const Box& cube, const Direction direction, const int first,
                const int last, int* cut, const int64_t whole_w,
                const int64_t whole_r, const int64_t whole_g,
                const int64_t whole_b, const IntArray& weights,
                const IntArray& m_r, const IntArray& m_g, const IntArray& m_b) {}

bool Cut(Box& box1, Box& box2, const IntArray& weights, const IntArray& m_r,
         const IntArray& m_g, const IntArray& m_b) {}

std::vector<Argb> QuantizeWu(const std::vector<Argb>& pixels,
                             uint16_t max_colors) {}
}  // namespace material_color_utilities