14a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh/*
24a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* Copyright (c) 2016, The Linux Foundation. All rights reserved.
34a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*
44a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* Redistribution and use in source and binary forms, with or without
54a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* modification, are permitted provided that the following conditions are
64a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* met:
74a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*   * Redistributions of source code must retain the above copyright
84a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*     notice, this list of conditions and the following disclaimer.
94a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*   * Redistributions in binary form must reproduce the above
104a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*     copyright notice, this list of conditions and the following
114a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*     disclaimer in the documentation and/or other materials provided
124a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*     with the distribution.
134a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*   * Neither the name of The Linux Foundation nor the names of its
144a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*     contributors may be used to endorse or promote products derived
154a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*     from this software without specific prior written permission.
164a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*
174a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
184a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
194a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
204a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
214a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
224a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
234a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
244a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
254a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
264a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
274a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
284a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*/
294a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
304a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#ifndef __FORMATS_H__
314a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#define __FORMATS_H__
324a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
334a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#include <core/layer_stack.h>
344a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
354a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanhnamespace sdm {
364a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
374a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanhbool IsUBWCFormat(LayerBufferFormat format);
384a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanhbool Is10BitFormat(LayerBufferFormat format);
394a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanhconst char *GetFormatString(const LayerBufferFormat &format);
404a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain VongsouvanhBufferLayout GetBufferLayout(LayerBufferFormat format);
414a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
424a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh}  // namespace sdm
434a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
444a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#endif  // __FORMATS_H__
454a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh
46