/* * H.265 video codec. * Copyright (c) 2013-2014 struktur AG, Dirk Farin * * This file is part of libde265. * * libde265 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * libde265 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with libde265. If not, see . */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #if HAVE_VIDEOGFX #include using namespace videogfx; #endif float ssim(const uint8_t* img1, const uint8_t* img2, int width, int height) { #if HAVE_VIDEOGFX Bitmap ref, coded; ref .Create(width, height); // reference image coded.Create(width, height); // coded image for (int y=0;y