$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r83876 - in trunk: boost/gil/extension/toolbox/image_types libs/gil/toolbox/test
From: chhenning_at_[hidden]
Date: 2013-04-13 14:04:53
Author: chhenning
Date: 2013-04-13 14:04:51 EDT (Sat, 13 Apr 2013)
New Revision: 83876
URL: http://svn.boost.org/trac/boost/changeset/83876
Log:
Change to more appropriate image type name.
Added:
   trunk/boost/gil/extension/toolbox/image_types/subchroma_image.hpp
      - copied, changed from r83875, /trunk/boost/gil/extension/toolbox/image_types/subsampled_image.hpp
   trunk/libs/gil/toolbox/test/subchroma_image.cpp
      - copied, changed from r83875, /trunk/libs/gil/toolbox/test/subsampled_image.cpp
Removed:
   trunk/boost/gil/extension/toolbox/image_types/subsampled_image.hpp
   trunk/libs/gil/toolbox/test/subsampled_image.cpp
Text files modified: 
   trunk/boost/gil/extension/toolbox/image_types/subchroma_image.hpp |    68 ++++++++++++++++++++--------------------
   trunk/libs/gil/toolbox/test/subchroma_image.cpp                   |    12 +++---                                  
   2 files changed, 40 insertions(+), 40 deletions(-)
Copied: trunk/boost/gil/extension/toolbox/image_types/subchroma_image.hpp (from r83875, /trunk/boost/gil/extension/toolbox/image_types/subsampled_image.hpp)
==============================================================================
--- /trunk/boost/gil/extension/toolbox/image_types/subsampled_image.hpp	(original)
+++ trunk/boost/gil/extension/toolbox/image_types/subchroma_image.hpp	2013-04-13 14:04:51 EDT (Sat, 13 Apr 2013)
@@ -11,7 +11,7 @@
 #define BOOST_GIL_EXTENSION_TOOLBOX_IMAGE_TYPES_SUBSAMPLED_IMAGE_HPP
 
 ////////////////////////////////////////////////////////////////////////////////////////
-/// \file subsampled_image.hpp
+/// \file subchroma_image.hpp
 /// \brief Subsampled Image extension
 /// \author Christian Henning \n
 ///
@@ -26,17 +26,17 @@
 typedef boost::gil::point2< std::ptrdiff_t > point_t;
 
 ////////////////////////////////////////////////////////////////////////////////////////
-/// \class subsampled_image_deref_fn
+/// \class subchroma_image_deref_fn
 /// \ingroup PixelLocatorModel PixelBasedModel
 /// \brief Used for virtual_2D_locator
 ///
 ////////////////////////////////////////////////////////////////////////////////////////
 template< typename Locator >
-struct subsampled_image_deref_fn
+struct subchroma_image_deref_fn
 {
     typedef gray8_view_t::locator plane_locator_t;
 
-    typedef subsampled_image_deref_fn    const_t;
+    typedef subchroma_image_deref_fn    const_t;
     typedef typename Locator::value_type value_type;
     typedef value_type                   reference;
     typedef value_type                   const_reference;
@@ -46,10 +46,10 @@
     static const bool is_mutable = false;
 
     /// default constructor
-    subsampled_image_deref_fn() {}
+    subchroma_image_deref_fn() {}
 
     /// constructor
-    subsampled_image_deref_fn( const plane_locator_t&    y_locator
+    subchroma_image_deref_fn( const plane_locator_t&    y_locator
                              , const plane_locator_t&    v_locator
                              , const plane_locator_t&    u_locator
                              , const std::size_t ux_ssfactor
@@ -103,45 +103,45 @@
 
 
 ////////////////////////////////////////////////////////////////////////////////////////
-/// \class subsampled_image_locator_type
+/// \class subchroma_image_locator_type
 /// \ingroup PixelLocatorModel PixelBasedModel
 /// \brief 
 ///
 ////////////////////////////////////////////////////////////////////////////////////////
 template< typename Locator >
-struct subsampled_image_locator
+struct subchroma_image_locator
 {
-    typedef virtual_2d_locator< subsampled_image_deref_fn< Locator > // Deref
+    typedef virtual_2d_locator< subchroma_image_deref_fn< Locator > // Deref
                               , false                                // IsTransposed
                               > type;
 };
 
 
 ////////////////////////////////////////////////////////////////////////////////////////
-/// \class subsampled_image_view
+/// \class subchroma_image_view
 /// \ingroup ImageViewModel PixelBasedModel
 /// \brief A lightweight object that interprets a subsampled image.Models ImageViewConcept,PixelBasedConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept
 ///
 ////////////////////////////////////////////////////////////////////////////////////////
-template< typename Locator > // subsampled_image_locator< ... >::type
-class subsampled_image_view : public image_view< Locator >
+template< typename Locator > // subchroma_image_locator< ... >::type
+class subchroma_image_view : public image_view< Locator >
 {
 public:
 
     typedef typename Locator::deref_fn_t         deref_fn_t;
     typedef typename deref_fn_t::plane_locator_t plane_locator_t;
 
-    typedef subsampled_image_view const_t;
+    typedef subchroma_image_view const_t;
 
     typedef image_view< plane_locator_t > plane_view_t;
 
     /// default constructor
-    subsampled_image_view()
+    subchroma_image_view()
     : image_view< Locator >()
     {}
 
     /// constructor
-    subsampled_image_view( const point_t& y_dimensions
+    subchroma_image_view( const point_t& y_dimensions
                          , const point_t& v_dimensions
                          , const point_t& u_dimensions
                          , const Locator& locator
@@ -154,7 +154,7 @@
     
     /// copy constructor
     template< typename Subsampled_View >
-    subsampled_image_view( const Subsampled_View& v )
+    subchroma_image_view( const Subsampled_View& v )
     : image_view< locator_t >( v )
     {}
 
@@ -180,7 +180,7 @@
 
 private:
 
-    template< typename Locator > friend class subsampled_image_view;
+    template< typename Locator > friend class subchroma_image_view;
 
     point_t _y_dimensions;
     point_t _v_dimensions;
@@ -198,7 +198,7 @@
 template< typename Pixel
         , typename Allocator = std::allocator< unsigned char >
         >
-class subsampled_image
+class subchroma_image
 {
 public:
     
@@ -214,17 +214,17 @@
     typedef typename view_type_from_pixel< Pixel >::type pixel_view_t;
     typedef typename pixel_view_t::locator pixel_locator_t;
 
-    typedef typename subsampled_image_locator< pixel_locator_t >::type locator_t;
+    typedef typename subchroma_image_locator< pixel_locator_t >::type locator_t;
 
     typedef typename plane_image_t::coord_t x_coord_t;
     typedef typename plane_image_t::coord_t y_coord_t;
 
-    typedef subsampled_image_view< locator_t > view_t;
+    typedef subchroma_image_view< locator_t > view_t;
     typedef typename view_t::const_t           const_view_t;
 
 
     /// constructor
-    subsampled_image( const x_coord_t   y_width
+    subchroma_image( const x_coord_t   y_width
                     , const y_coord_t   y_height
                     , const std::size_t vx_ssfactor = 2
                     , const std::size_t vy_ssfactor = 2
@@ -256,7 +256,7 @@
              , const std::size_t uy_ssfactor
              )
     {
-        typedef subsampled_image_deref_fn< pixel_locator_t > defer_fn_t;
+        typedef subchroma_image_deref_fn< pixel_locator_t > defer_fn_t;
 
         defer_fn_t deref_fn( view( _y_plane ).xy_at( 0, 0 )
                            , view( _v_plane ).xy_at( 0, 0 )
@@ -290,36 +290,36 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
 /// \name view, const_view
-/// \brief Get an image view from an subsampled_image
+/// \brief Get an image view from an subchroma_image
 /// \ingroup ImageModel
 /// \brief Returns the non-constant-pixel view of an image
 /////////////////////////////////////////////////////////////////////////////////////////
 template< typename Pixel >
 inline
-const typename subsampled_image< Pixel >::view_t& view( subsampled_image< Pixel >& img )
+const typename subchroma_image< Pixel >::view_t& view( subchroma_image< Pixel >& img )
 {
     return img._view;
 }
 
 template< typename Pixel >
 inline
-const typename subsampled_image< Pixel >::const_view_t const_view( subsampled_image< Pixel >& img )
+const typename subchroma_image< Pixel >::const_view_t const_view( subchroma_image< Pixel >& img )
 {
-    return static_cast< const typename subsampled_image< Pixel >::const_view_t>( img._view );
+    return static_cast< const typename subchroma_image< Pixel >::const_view_t>( img._view );
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
 /// \ingroup ImageViewSTLAlgorithmsFillPixels
-/// \brief std::fill for subsampled_image views
+/// \brief std::fill for subchroma_image views
 /////////////////////////////////////////////////////////////////////////////////////////
 template< typename Locator
         , typename Pixel
         >
-void fill_pixels( const subsampled_image_view< Locator >& view
+void fill_pixels( const subchroma_image_view< Locator >& view
                 , const Pixel&                            value
                 )
 {
-    typedef typename subsampled_image<Pixel>::plane_view_t::value_type channel_t;
+    typedef typename subchroma_image<Pixel>::plane_view_t::value_type channel_t;
 
     fill_pixels( view.y_plane_view(), channel_t( at_c<0>( value )));
     fill_pixels( view.v_plane_view(), channel_t( at_c<1>( value )));
@@ -331,7 +331,7 @@
 /// \brief Creates a subsampled view from a raw memory
 /////////////////////////////////////////////////////////////////////////////////////////
 template< typename Pixel >
-typename subsampled_image< Pixel >::view_t subsampled_view( std::size_t    y_width
+typename subchroma_image< Pixel >::view_t subsampled_view( std::size_t    y_width
                                                           , std::size_t    y_height
                                                           , unsigned char* y_base
                                                           , std::size_t    vx_ssfactor = 2
@@ -346,7 +346,7 @@
     unsigned char* u_base = y_base + ( y_width  * y_height * y_channel_size );
     unsigned char* v_base = u_base + ( y_width / ux_ssfactor ) * ( y_height / uy_ssfactor ) * u_channel_size;
 
-    typedef subsampled_image< Pixel >::plane_view_t plane_view_t;
+    typedef subchroma_image< Pixel >::plane_view_t plane_view_t;
 
     plane_view_t y_plane = interleaved_view( y_width
                                            , y_height
@@ -366,7 +366,7 @@
                                            , y_width                            // rowsize_in_bytes
                                            );
 
-    typedef subsampled_image_deref_fn< typename subsampled_image< Pixel >::pixel_locator_t > defer_fn_t;
+    typedef subchroma_image_deref_fn< typename subchroma_image< Pixel >::pixel_locator_t > defer_fn_t;
     defer_fn_t deref_fn( y_plane.xy_at( 0, 0 )
                        , v_plane.xy_at( 0, 0 )
                        , u_plane.xy_at( 0, 0 )
@@ -377,13 +377,13 @@
                        );
     
 
-    typedef subsampled_image< Pixel >::locator_t locator_t;
+    typedef subchroma_image< Pixel >::locator_t locator_t;
     locator_t locator( point_t( 0, 0 ) // p
                      , point_t( 1, 1 ) // step
                      , deref_fn
                      );
 
-    typedef subsampled_image< Pixel >::view_t view_t;
+    typedef subchroma_image< Pixel >::view_t view_t;
     return view_t( point_t(               y_width,               y_height )
                  , point_t( y_width / vx_ssfactor, y_height / vy_ssfactor )
                  , point_t( y_width / ux_ssfactor, y_height / uy_ssfactor )
Deleted: trunk/boost/gil/extension/toolbox/image_types/subsampled_image.hpp
==============================================================================
--- trunk/boost/gil/extension/toolbox/image_types/subsampled_image.hpp	2013-04-13 14:04:51 EDT (Sat, 13 Apr 2013)
+++ (empty file)
@@ -1,397 +0,0 @@
-/*
-    Copyright 2013 Christian Henning
-    Use, modification and distribution are subject to the Boost Software License,
-    Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt).
-*/
-
-/*************************************************************************************************/
-
-#ifndef BOOST_GIL_EXTENSION_TOOLBOX_IMAGE_TYPES_SUBSAMPLED_IMAGE_HPP
-#define BOOST_GIL_EXTENSION_TOOLBOX_IMAGE_TYPES_SUBSAMPLED_IMAGE_HPP
-
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file subsampled_image.hpp
-/// \brief Subsampled Image extension
-/// \author Christian Henning \n
-///
-/// \date 2013 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
-#include <boost/gil/image.hpp>
-
-namespace boost{ namespace gil {
-
-typedef boost::gil::point2< std::ptrdiff_t > point_t;
-
-////////////////////////////////////////////////////////////////////////////////////////
-/// \class subsampled_image_deref_fn
-/// \ingroup PixelLocatorModel PixelBasedModel
-/// \brief Used for virtual_2D_locator
-///
-////////////////////////////////////////////////////////////////////////////////////////
-template< typename Locator >
-struct subsampled_image_deref_fn
-{
-    typedef gray8_view_t::locator plane_locator_t;
-
-    typedef subsampled_image_deref_fn    const_t;
-    typedef typename Locator::value_type value_type;
-    typedef value_type                   reference;
-    typedef value_type                   const_reference;
-    typedef point_t                      argument_type;
-    typedef reference                    result_type;
-
-    static const bool is_mutable = false;
-
-    /// default constructor
-    subsampled_image_deref_fn() {}
-
-    /// constructor
-    subsampled_image_deref_fn( const plane_locator_t&    y_locator
-                             , const plane_locator_t&    v_locator
-                             , const plane_locator_t&    u_locator
-                             , const std::size_t ux_ssfactor
-                             , const std::size_t uy_ssfactor
-                             , const std::size_t vx_ssfactor
-                             , const std::size_t vy_ssfactor
-                             )
-    : _y_locator  (   y_locator )
-    , _v_locator  (   v_locator )
-    , _u_locator  (   u_locator )
-    , _ux_ssfactor( ux_ssfactor )
-    , _uy_ssfactor( uy_ssfactor )
-    , _vx_ssfactor( vx_ssfactor )
-    , _vy_ssfactor( vy_ssfactor )
-    {}
-
-    /// operator()
-    typename result_type operator()( const point_t& p ) const
-    {
-        plane_locator_t y = _y_locator.xy_at( p );
-        plane_locator_t v = _v_locator.xy_at( p.x / _ux_ssfactor, p.y / _uy_ssfactor );
-        plane_locator_t u = _u_locator.xy_at( p.x / _vx_ssfactor, p.y / _vy_ssfactor );
-
-        return value_type( at_c<0>( *y )
-                         , at_c<0>( *v )
-                         , at_c<0>( *u )
-                         );
-    }
-
-    /// 
-    const plane_locator_t& y_locator() const { return _y_locator; }
-    const plane_locator_t& v_locator() const { return _v_locator; }
-    const plane_locator_t& u_locator() const { return _u_locator; }
-
-    const std::size_t ux_ssfactor() const { return ux_ssfactor; }
-    const std::size_t uy_ssfactor() const { return uy_ssfactor; }
-    const std::size_t vx_ssfactor() const { return vx_ssfactor; }
-    const std::size_t vy_ssfactor() const { return vy_ssfactor; }
-
-private:
-    
-    plane_locator_t _y_locator;
-    plane_locator_t _v_locator;
-    plane_locator_t _u_locator;
-
-    std::size_t _ux_ssfactor;
-    std::size_t _uy_ssfactor;
-    std::size_t _vx_ssfactor;
-    std::size_t _vy_ssfactor;
-};
-
-
-////////////////////////////////////////////////////////////////////////////////////////
-/// \class subsampled_image_locator_type
-/// \ingroup PixelLocatorModel PixelBasedModel
-/// \brief 
-///
-////////////////////////////////////////////////////////////////////////////////////////
-template< typename Locator >
-struct subsampled_image_locator
-{
-    typedef virtual_2d_locator< subsampled_image_deref_fn< Locator > // Deref
-                              , false                                // IsTransposed
-                              > type;
-};
-
-
-////////////////////////////////////////////////////////////////////////////////////////
-/// \class subsampled_image_view
-/// \ingroup ImageViewModel PixelBasedModel
-/// \brief A lightweight object that interprets a subsampled image.Models ImageViewConcept,PixelBasedConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept
-///
-////////////////////////////////////////////////////////////////////////////////////////
-template< typename Locator > // subsampled_image_locator< ... >::type
-class subsampled_image_view : public image_view< Locator >
-{
-public:
-
-    typedef typename Locator::deref_fn_t         deref_fn_t;
-    typedef typename deref_fn_t::plane_locator_t plane_locator_t;
-
-    typedef subsampled_image_view const_t;
-
-    typedef image_view< plane_locator_t > plane_view_t;
-
-    /// default constructor
-    subsampled_image_view()
-    : image_view< Locator >()
-    {}
-
-    /// constructor
-    subsampled_image_view( const point_t& y_dimensions
-                         , const point_t& v_dimensions
-                         , const point_t& u_dimensions
-                         , const Locator& locator
-                         )
-    : image_view< Locator >( y_dimensions, locator )
-    , _y_dimensions( y_dimensions )
-    , _v_dimensions( v_dimensions )
-    , _u_dimensions( u_dimensions )
-    {}
-    
-    /// copy constructor
-    template< typename Subsampled_View >
-    subsampled_image_view( const Subsampled_View& v )
-    : image_view< locator_t >( v )
-    {}
-
-    const point_t& v_ssfactors() const { return point_t( get_deref_fn().vx_ssfactor(), get_deref_fn().vx_ssfactor() ); }
-    const point_t& u_ssfactors() const { return point_t( get_deref_fn().ux_ssfactor(), get_deref_fn().ux_ssfactor() ); }
-
-    const point_t& y_dimension() const { return _y_dimensions; }
-    const point_t& v_dimension() const { return _v_dimensions; }
-    const point_t& u_dimension() const { return _u_dimensions; }
-
-    const plane_locator_t& y_plane() const { return get_deref_fn().y_locator(); }
-    const plane_locator_t& v_plane() const { return get_deref_fn().v_locator(); }
-    const plane_locator_t& u_plane() const { return get_deref_fn().u_locator(); }
-
-    const plane_view_t y_plane_view() const { return plane_view_t( _y_dimensions, y_plane() ); }
-    const plane_view_t v_plane_view() const { return plane_view_t( _v_dimensions, v_plane() ); }
-    const plane_view_t u_plane_view() const { return plane_view_t( _u_dimensions, u_plane() ); }
-
-
-private:
-
-    const deref_fn_t& get_deref_fn() const { return this->pixels().deref_fn(); }
-
-private:
-
-    template< typename Locator > friend class subsampled_image_view;
-
-    point_t _y_dimensions;
-    point_t _v_dimensions;
-    point_t _u_dimensions;
-};
-
-
-////////////////////////////////////////////////////////////////////////////////////////
-/// \ingroup ImageModel PixelBasedModel
-/// \brief container interface over image view. Models ImageConcept, PixelBasedConcept
-///
-/// A subsampled image holds a bunch of planes which don't need to have the same resolution.
-///
-////////////////////////////////////////////////////////////////////////////////////////
-template< typename Pixel
-        , typename Allocator = std::allocator< unsigned char >
-        >
-class subsampled_image
-{
-public:
-    
-    typedef typename channel_type< Pixel >::type channel_t;
-    typedef pixel< channel_t, gray_layout_t> pixel_t;
-
-    typedef image< pixel_t, false, Allocator > plane_image_t;
-
-    typedef typename plane_image_t::view_t plane_view_t;
-    typedef typename plane_image_t::const_view_t plane_const_view_t;
-    typedef typename plane_view_t::locator plane_locator_t;
-
-    typedef typename view_type_from_pixel< Pixel >::type pixel_view_t;
-    typedef typename pixel_view_t::locator pixel_locator_t;
-
-    typedef typename subsampled_image_locator< pixel_locator_t >::type locator_t;
-
-    typedef typename plane_image_t::coord_t x_coord_t;
-    typedef typename plane_image_t::coord_t y_coord_t;
-
-    typedef subsampled_image_view< locator_t > view_t;
-    typedef typename view_t::const_t           const_view_t;
-
-
-    /// constructor
-    subsampled_image( const x_coord_t   y_width
-                    , const y_coord_t   y_height
-                    , const std::size_t vx_ssfactor = 2
-                    , const std::size_t vy_ssfactor = 2
-                    , const std::size_t ux_ssfactor = 2
-                    , const std::size_t uy_ssfactor = 2
-                    )
-    : _y_plane(               y_width,               y_height, 0, Allocator() )
-    , _v_plane( y_width / vx_ssfactor, y_height / vy_ssfactor, 0, Allocator() )
-    , _u_plane( y_width / ux_ssfactor, y_height / uy_ssfactor, 0, Allocator() )
-    {
-        init( point_t( y_width, y_height )
-            , vx_ssfactor
-            , vy_ssfactor
-            , ux_ssfactor
-            , uy_ssfactor
-            );
-    }
-
-public:
-
-    view_t _view;
-
-private:
-
-    void init( const point_t&    y_dimensions
-             , const std::size_t vx_ssfactor
-             , const std::size_t vy_ssfactor
-             , const std::size_t ux_ssfactor
-             , const std::size_t uy_ssfactor
-             )
-    {
-        typedef subsampled_image_deref_fn< pixel_locator_t > defer_fn_t;
-
-        defer_fn_t deref_fn( view( _y_plane ).xy_at( 0, 0 )
-                           , view( _v_plane ).xy_at( 0, 0 )
-                           , view( _u_plane ).xy_at( 0, 0 )
-                           , vx_ssfactor
-                           , vy_ssfactor
-                           , ux_ssfactor
-                           , uy_ssfactor
-                           );
-
-        // init a virtual_2d_locator
-        locator_t locator( point_t( 0, 0 ) // p
-                         , point_t( 1, 1 ) // step
-                         , deref_fn
-                         );
-
-        _view = view_t( _y_plane.dimensions()
-                      , _v_plane.dimensions()
-                      , _u_plane.dimensions()
-                      , locator
-                      );
-    }
-    
-
-private:
-
-    plane_image_t _y_plane;
-    plane_image_t _v_plane;
-    plane_image_t _u_plane;
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////
-/// \name view, const_view
-/// \brief Get an image view from an subsampled_image
-/// \ingroup ImageModel
-/// \brief Returns the non-constant-pixel view of an image
-/////////////////////////////////////////////////////////////////////////////////////////
-template< typename Pixel >
-inline
-const typename subsampled_image< Pixel >::view_t& view( subsampled_image< Pixel >& img )
-{
-    return img._view;
-}
-
-template< typename Pixel >
-inline
-const typename subsampled_image< Pixel >::const_view_t const_view( subsampled_image< Pixel >& img )
-{
-    return static_cast< const typename subsampled_image< Pixel >::const_view_t>( img._view );
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-/// \ingroup ImageViewSTLAlgorithmsFillPixels
-/// \brief std::fill for subsampled_image views
-/////////////////////////////////////////////////////////////////////////////////////////
-template< typename Locator
-        , typename Pixel
-        >
-void fill_pixels( const subsampled_image_view< Locator >& view
-                , const Pixel&                            value
-                )
-{
-    typedef typename subsampled_image<Pixel>::plane_view_t::value_type channel_t;
-
-    fill_pixels( view.y_plane_view(), channel_t( at_c<0>( value )));
-    fill_pixels( view.v_plane_view(), channel_t( at_c<1>( value )));
-    fill_pixels( view.u_plane_view(), channel_t( at_c<2>( value )));
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-/// \ingroup ImageViewConstructors
-/// \brief Creates a subsampled view from a raw memory
-/////////////////////////////////////////////////////////////////////////////////////////
-template< typename Pixel >
-typename subsampled_image< Pixel >::view_t subsampled_view( std::size_t    y_width
-                                                          , std::size_t    y_height
-                                                          , unsigned char* y_base
-                                                          , std::size_t    vx_ssfactor = 2
-                                                          , std::size_t    vy_ssfactor = 2
-                                                          , std::size_t    ux_ssfactor = 2
-                                                          , std::size_t    uy_ssfactor = 2
-                                                          )
-{
-    std::size_t y_channel_size = 1;
-    std::size_t u_channel_size = 1;
-
-    unsigned char* u_base = y_base + ( y_width  * y_height * y_channel_size );
-    unsigned char* v_base = u_base + ( y_width / ux_ssfactor ) * ( y_height / uy_ssfactor ) * u_channel_size;
-
-    typedef subsampled_image< Pixel >::plane_view_t plane_view_t;
-
-    plane_view_t y_plane = interleaved_view( y_width
-                                           , y_height
-                                           , (plane_view_t::value_type*) y_base // pixels
-                                           , y_width                            // rowsize_in_bytes
-                                           );
-
-    plane_view_t v_plane = interleaved_view( y_width  / vx_ssfactor 
-                                           , y_height / vy_ssfactor
-                                           , (plane_view_t::value_type*) v_base // pixels
-                                           , y_width                            // rowsize_in_bytes
-                                           );
-
-    plane_view_t u_plane = interleaved_view( y_width  / ux_ssfactor
-                                           , y_height / uy_ssfactor
-                                           , (plane_view_t::value_type*) u_base // pixels
-                                           , y_width                            // rowsize_in_bytes
-                                           );
-
-    typedef subsampled_image_deref_fn< typename subsampled_image< Pixel >::pixel_locator_t > defer_fn_t;
-    defer_fn_t deref_fn( y_plane.xy_at( 0, 0 )
-                       , v_plane.xy_at( 0, 0 )
-                       , u_plane.xy_at( 0, 0 )
-                       , vx_ssfactor
-                       , vy_ssfactor
-                       , ux_ssfactor
-                       , uy_ssfactor
-                       );
-    
-
-    typedef subsampled_image< Pixel >::locator_t locator_t;
-    locator_t locator( point_t( 0, 0 ) // p
-                     , point_t( 1, 1 ) // step
-                     , deref_fn
-                     );
-
-    typedef subsampled_image< Pixel >::view_t view_t;
-    return view_t( point_t(               y_width,               y_height )
-                 , point_t( y_width / vx_ssfactor, y_height / vy_ssfactor )
-                 , point_t( y_width / ux_ssfactor, y_height / uy_ssfactor )
-                 , locator
-                 );
-}
-
-} // namespace gil
-} // namespace boost
-
-#endif // BOOST_GIL_EXTENSION_TOOLBOX_IMAGE_TYPES_SUBSAMPLED_IMAGE_HPP
\ No newline at end of file
Copied: trunk/libs/gil/toolbox/test/subchroma_image.cpp (from r83875, /trunk/libs/gil/toolbox/test/subsampled_image.cpp)
==============================================================================
--- /trunk/libs/gil/toolbox/test/subsampled_image.cpp	(original)
+++ trunk/libs/gil/toolbox/test/subchroma_image.cpp	2013-04-13 14:04:51 EDT (Sat, 13 Apr 2013)
@@ -3,23 +3,23 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-/// \brief Unit test for subsampled_image type.
+/// \brief Unit test for subchroma_image type.
 
 #include <boost/test/unit_test.hpp>
 
 #include <boost/gil/gil_all.hpp>
 
 #include <boost/gil/extension/toolbox/color_spaces/ycbcr.hpp>
-#include <boost/gil/extension/toolbox/image_types/subsampled_image.hpp>
+#include <boost/gil/extension/toolbox/image_types/subchroma_image.hpp>
 
 
 using namespace std;
 using namespace boost;
 using namespace gil;
 
-BOOST_AUTO_TEST_SUITE( subsampled_image_test_suite )
+BOOST_AUTO_TEST_SUITE( subchroma_image_test_suite )
 
-BOOST_AUTO_TEST_CASE( subsampled_image_test )
+BOOST_AUTO_TEST_CASE( subchroma_image_test )
 {
     {
         ycbcr_601_8_pixel_t a( 10, 20, 30 );
@@ -35,7 +35,7 @@
 
     {
         typedef rgb8_pixel_t pixel_t;
-        typedef subsampled_image< pixel_t > image_t;
+        typedef subchroma_image< pixel_t > image_t;
 
         image_t img( 640, 480 );
 
@@ -46,7 +46,7 @@
 
     {
         typedef ycbcr_601_8_pixel_t pixel_t;
-        typedef subsampled_image< pixel_t > image_t;
+        typedef subchroma_image< pixel_t > image_t;
 
         std::size_t y_width     = 640;
         std::size_t y_height    = 480;
Deleted: trunk/libs/gil/toolbox/test/subsampled_image.cpp
==============================================================================
--- trunk/libs/gil/toolbox/test/subsampled_image.cpp	2013-04-13 14:04:51 EDT (Sat, 13 Apr 2013)
+++ (empty file)
@@ -1,78 +0,0 @@
-// Copyright 2013 Christian Henning
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-/// \brief Unit test for subsampled_image type.
-
-#include <boost/test/unit_test.hpp>
-
-#include <boost/gil/gil_all.hpp>
-
-#include <boost/gil/extension/toolbox/color_spaces/ycbcr.hpp>
-#include <boost/gil/extension/toolbox/image_types/subsampled_image.hpp>
-
-
-using namespace std;
-using namespace boost;
-using namespace gil;
-
-BOOST_AUTO_TEST_SUITE( subsampled_image_test_suite )
-
-BOOST_AUTO_TEST_CASE( subsampled_image_test )
-{
-    {
-        ycbcr_601_8_pixel_t a( 10, 20, 30 );
-        rgb8_pixel_t b;
-        bgr8_pixel_t c;
-
-        color_convert( a, b );
-        color_convert( a, c );
-        BOOST_ASSERT( static_equal( b, c ));
-
-        color_convert( b, a );
-    }
-
-    {
-        typedef rgb8_pixel_t pixel_t;
-        typedef subsampled_image< pixel_t > image_t;
-
-        image_t img( 640, 480 );
-
-        fill_pixels( view( img )
-                   , pixel_t( 10, 20, 30 )
-                   );
-    }
-
-    {
-        typedef ycbcr_601_8_pixel_t pixel_t;
-        typedef subsampled_image< pixel_t > image_t;
-
-        std::size_t y_width     = 640;
-        std::size_t y_height    = 480;
-        std::size_t vx_ssfactor =   2;
-        std::size_t vy_ssfactor =   2;
-        std::size_t ux_ssfactor =   2;
-        std::size_t uy_ssfactor =   2;
-
-        std::size_t image_size = ( y_width * y_height )
-                               + ( y_width / vx_ssfactor ) * ( y_height / vy_ssfactor )
-                               + ( y_width / ux_ssfactor ) * ( y_height / uy_ssfactor );
-
-        vector< unsigned char > data( image_size );
-
-        image_t::view_t v = subsampled_view< pixel_t >( y_width
-                                                      , y_height
-                                                      , &data.front()
-                                                      , vx_ssfactor
-                                                      , vy_ssfactor
-                                                      , ux_ssfactor
-                                                      , uy_ssfactor
-                                                      );
-        rgb8_pixel_t p = *v.xy_at( 0, 0 );
-    }
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-