1 /*
2  * Copyright © 2014 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  *
24  * Authors:
25  *     Zhao Yakui <yakui.zhao@intel.com>
26  *
27  */
28 
29 /*
30  * Copyright (c) 2010, The WebM Project authors. All rights reserved.
31  *
32  * An additional intellectual property rights grant can be found
33  * in the file LIBVPX_PATENTS.  All contributing project authors may
34  * be found in the LIBVPX_AUTHORS file.
35  *
36  * Redistribution and use in source and binary forms, with or without
37  * modification, are permitted provided that the following conditions are met:
38 
39  * Redistributions of source code must retain the above copyright
40  * notice, this list of conditions and the following disclaimer.
41  *
42  * Redistributions in binary form must reproduce the above copyright
43  * notice, this list of conditions and the following disclaimer in
44  * the documentation and/or other materials provided with the distribution.
45 
46  * Neither the name of Google, nor the WebM Project, nor the names
47  * of its contributors may be used to endorse or promote products
48  * derived from this software without specific prior written permission.
49  *
50  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
54  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
56  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
60  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61  *
62  */
63 
64 #ifndef __INTEL_HOSTVLD_VP9_CONTEXT_H__
65 #define __INTEL_HOSTVLD_VP9_CONTEXT_H__
66 
67 #include "intel_hybrid_common_vp9.h"
68 #include "intel_hybrid_hostvld_vp9_internal.h"
69 
70 typedef UINT8 PROBABILITY, *PPROBABILITY;
71 
72 VAStatus Intel_HostvldVp9_ResetContext(
73     PINTEL_HOSTVLD_VP9_FRAME_CONTEXT  pCtxTable,
74     PINTEL_HOSTVLD_VP9_FRAME_INFO     pFrameInfo);
75 
76 VAStatus Intel_HostvldVp9_UpdateContextTables(
77     PINTEL_HOSTVLD_VP9_FRAME_CONTEXT  pCtxTable,
78     PINTEL_HOSTVLD_VP9_FRAME_INFO     pFrameInfo);
79 
80 VAStatus Intel_HostvldVp9_GetCurrFrameContext(
81     PINTEL_HOSTVLD_VP9_FRAME_CONTEXT  pCtxTable,
82     PINTEL_HOSTVLD_VP9_FRAME_INFO     pFrameInfo);
83 
84 VAStatus Intel_HostvldVp9_SetupSegmentationProbs(
85     PINTEL_HOSTVLD_VP9_FRAME_CONTEXT pContext,
86     PUCHAR                              pSegTreeProb,
87     PUCHAR                              pSegPredProb);
88 
89 VAStatus Intel_HostvldVp9_ReadProbabilities(
90     PINTEL_HOSTVLD_VP9_FRAME_CONTEXT pContext,
91     PINTEL_HOSTVLD_VP9_FRAME_INFO    pFrameInfo,
92     PINTEL_HOSTVLD_VP9_BAC_ENGINE    pBacEngine);
93 
94 VAStatus Intel_HostvldVp9_AdaptProbabilities(
95     PINTEL_HOSTVLD_VP9_FRAME_STATE   pFrameState);
96 
97 VAStatus Intel_HostvldVp9_RefreshFrameContext(
98     PINTEL_HOSTVLD_VP9_FRAME_CONTEXT  pCtxTable,
99     PINTEL_HOSTVLD_VP9_FRAME_INFO     pFrameInfo);
100 
101 #endif // __INTEL_HOSTVLD_VP9_CONTEXT_H__
102