Merge "vp8_rd_pick_best_mbsegmentation code restructure"
[libvpx.git] / vp8 / common / vfwsetting.hpp
blob44869ecc75d9afee925d184ff06cf3ac3c267140
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 #if !defined(VFWSETTING_HPP)
13 #define VFWSETTING_HPP
14 //______________________________________________________________________________
16 // VFWSetting.hpp
19 #include "four_cc.hpp"
20 #include <iosfwd>
22 namespace vpxvp
25 //--------------------------------------
26 class VFWSetting
28 friend std::ostream& operator<<(std::ostream& os, const VFWSetting& vfws);
30 public:
32 enum Mode
34 m_setting,
35 m_config
38 enum
40 header_size = 8,
41 Size = 16
44 VFWSetting(four_cc fcc);
45 ~VFWSetting();
47 four_cc fcc() const;
48 Mode mode() const;
50 int setting() const;
51 int value() const;
52 void setting_value(int i_setting, int i_value); // Sets mode to m_setting
54 long size() const;
55 const void* data() const;
56 int data(const void* p_data, unsigned long ul_size);
58 private:
60 VFWSetting(const VFWSetting& vfws); // Not implemented
61 VFWSetting& operator=(const VFWSetting& vfws); // Not implemented
63 int extract_(const void* p_data, unsigned long ul_size);
64 void update_() const;
66 four_cc m_fcc;
67 Mode m_mode;
68 int m_i_setting;
69 int m_i_value;
71 mutable unsigned char m_p_data[Size];
74 } // namespace vpxvp
76 #endif // VFWSETTING_HPP