X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fpixel_formats_test.cc;h=68d225e6efa36dc6b69a5b30f8319b7e6da74eaa;hb=2898a88b4554335439891d8198bed8c820c20396;hp=fb2278fdbba39e8125bd43955a928fa3763a015e;hpb=90933dc804de225df47897ddd3a19c5a60ec67e0;p=dcpomatic.git diff --git a/test/pixel_formats_test.cc b/test/pixel_formats_test.cc index fb2278fdb..68d225e6e 100644 --- a/test/pixel_formats_test.cc +++ b/test/pixel_formats_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +17,27 @@ */ +/** @file src/pixel_formats_test.cc + * @brief Make sure that Image::lines() and Image::bytes_per_pixel() return the right + * things for various pixel formats. + * + * @see test/image_test.cc + */ + +#include +#include +extern "C" { +#include +#include +} +#include "lib/image.h" + using std::list; using std::cout; +/** @struct Case + * @brief A test case for pixel_formats_test. + */ struct Case { Case (AVPixelFormat f, int c, int l0, int l1, int l2, float b0, float b1, float b2) @@ -63,7 +81,7 @@ BOOST_AUTO_TEST_CASE (pixel_formats_test) f->height = 480; f->format = static_cast (i->format); av_frame_get_buffer (f, true); - SimpleImage t (f); + Image t (f); BOOST_CHECK_EQUAL(t.components(), i->components); BOOST_CHECK_EQUAL(t.lines(0), i->lines[0]); BOOST_CHECK_EQUAL(t.lines(1), i->lines[1]);