annotate x265/source/encoder/search.h @ 0:772086c29cc7

Initial import.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 16 Nov 2016 11:16:33 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*****************************************************************************
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Copyright (C) 2013 x265 project
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 *
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * Authors: Steve Borho <steve@borho.org>
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 *
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 * (at your option) any later version.
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 *
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 * GNU General Public License for more details.
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 *
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 *
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 * This program is also available under a commercial proprietary license.
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 * For more information, contact us at license @ x265.com.
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 *****************************************************************************/
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 #ifndef X265_SEARCH_H
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 #define X265_SEARCH_H
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 #include "common.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 #include "predict.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 #include "quant.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 #include "bitcost.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 #include "framedata.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 #include "yuv.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 #include "threadpool.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #include "rdcost.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 #include "entropy.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 #include "motion.h"
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 #if DETAILED_CU_STATS
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 #define ProfileCUScopeNamed(name, cu, acc, count) \
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 m_stats[cu.m_encData->m_frameEncoderID].count++; \
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 ScopedElapsedTime name(m_stats[cu.m_encData->m_frameEncoderID].acc)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 #define ProfileCUScope(cu, acc, count) ProfileCUScopeNamed(timedScope, cu, acc, count)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 #define ProfileCounter(cu, count) m_stats[cu.m_encData->m_frameEncoderID].count++;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 #else
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 #define ProfileCUScopeNamed(name, cu, acc, count)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 #define ProfileCUScope(cu, acc, count)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 #define ProfileCounter(cu, count)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 #endif
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 namespace X265_NS {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 // private namespace
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54 class Entropy;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 struct ThreadLocalData;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 /* All the CABAC contexts that Analysis needs to keep track of at each depth
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 * and temp buffers for residual, coeff, and recon for use during residual
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 * quad-tree depth recursion */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 struct RQTData
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 Entropy cur; /* starting context for current CU */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 /* these are indexed by qtLayer (log2size - 2) so nominally 0=4x4, 1=8x8, 2=16x16, 3=32x32
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 * the coeffRQT and reconQtYuv are allocated to the max CU size at every depth. The parts
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 * which are reconstructed at each depth are valid. At the end, the transform depth table
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 * is walked and the coeff and recon at the final split depths are collected */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68 Entropy rqtRoot; /* residual quad-tree start context */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 Entropy rqtTemp; /* residual quad-tree temp context */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 Entropy rqtTest; /* residual quad-tree test context */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 coeff_t* coeffRQT[3]; /* coeff storage for entire CTU for each RQT layer */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 Yuv reconQtYuv; /* recon storage for entire CTU for each RQT layer (intra) */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 ShortYuv resiQtYuv; /* residual storage for entire CTU for each RQT layer (inter) */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 /* per-depth temp buffers for inter prediction */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 ShortYuv tmpResiYuv;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 Yuv tmpPredYuv;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 Yuv bidirPredYuv[2];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 struct MotionData
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83 MV mv;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84 MV mvp;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 int mvpIdx;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 int ref;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 uint32_t cost;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 int bits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 struct Mode
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 CUData cu;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 const Yuv* fencYuv;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 Yuv predYuv;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 Yuv reconYuv;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 Entropy contexts;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 enum { MAX_INTER_PARTS = 2 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101 MotionData bestME[MAX_INTER_PARTS][2];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 MV amvpCand[2][MAX_NUM_REF][AMVP_NUM_CANDS];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 // Neighbour MVs of the current partition. 5 spatial candidates and the
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 // temporal candidate.
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 InterNeighbourMV interNeighbours[6];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 uint64_t rdCost; // sum of partition (psy) RD costs (sse(fenc, recon) + lambda2 * bits)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 uint64_t sa8dCost; // sum of partition sa8d distortion costs (sa8d(fenc, pred) + lambda * bits)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 uint32_t sa8dBits; // signal bits used in sa8dCost calculation
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 uint32_t psyEnergy; // sum of partition psycho-visual energy difference
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 sse_ret_t resEnergy; // sum of partition residual energy after motion prediction
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 sse_ret_t lumaDistortion;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 sse_ret_t chromaDistortion;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 sse_ret_t distortion; // sum of partition SSE distortion
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 uint32_t totalBits; // sum of partition bits (mv + coeff)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 uint32_t mvBits; // Mv bits + Ref + block type (or intra mode)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 uint32_t coeffBits; // Texture bits (DCT Coeffs)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 void initCosts()
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 rdCost = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123 sa8dCost = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 sa8dBits = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125 psyEnergy = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126 resEnergy = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 lumaDistortion = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 chromaDistortion = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 distortion = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 totalBits = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 mvBits = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132 coeffBits = 0;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 void invalidate()
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137 /* set costs to invalid data, catch uninitialized re-use */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 rdCost = UINT64_MAX / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139 sa8dCost = UINT64_MAX / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 sa8dBits = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 psyEnergy = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 #if X265_DEPTH <= 10
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 resEnergy = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 lumaDistortion = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145 chromaDistortion = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
146 distortion = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
147 #else
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
148 resEnergy = UINT64_MAX / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 lumaDistortion = UINT64_MAX / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150 chromaDistortion = UINT64_MAX / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151 distortion = UINT64_MAX / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152 #endif
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153 totalBits = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 mvBits = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155 coeffBits = MAX_UINT / 2;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 bool ok() const
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160 #if X265_DEPTH <= 10
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 return !(rdCost >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
162 sa8dCost >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163 sa8dBits >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
164 psyEnergy >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 resEnergy >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
166 lumaDistortion >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
167 chromaDistortion >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168 distortion >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169 totalBits >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 mvBits >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
171 coeffBits >= MAX_UINT / 2);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172 #else
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
173 return !(rdCost >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 sa8dCost >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175 sa8dBits >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 psyEnergy >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 resEnergy >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 lumaDistortion >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 chromaDistortion >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 distortion >= UINT64_MAX / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181 totalBits >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182 mvBits >= MAX_UINT / 2 ||
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183 coeffBits >= MAX_UINT / 2);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184 #endif
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
185 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187 void addSubCosts(const Mode& subMode)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189 X265_CHECK(subMode.ok(), "sub-mode not initialized");
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191 rdCost += subMode.rdCost;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192 sa8dCost += subMode.sa8dCost;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 sa8dBits += subMode.sa8dBits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194 psyEnergy += subMode.psyEnergy;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
195 resEnergy += subMode.resEnergy;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
196 lumaDistortion += subMode.lumaDistortion;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 chromaDistortion += subMode.chromaDistortion;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198 distortion += subMode.distortion;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
199 totalBits += subMode.totalBits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
200 mvBits += subMode.mvBits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
201 coeffBits += subMode.coeffBits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
202 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
203 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
204
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
205 #if DETAILED_CU_STATS
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
206 /* This structure is intended for performance debugging and we make no attempt
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
207 * to handle dynamic range overflows. Care should be taken to avoid long encodes
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
208 * if you care about the accuracy of these elapsed times and counters. This
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
209 * profiling is orthogonal to PPA/VTune and can be enabled independently from
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
210 * either of them */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
211 struct CUStats
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
212 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
213 int64_t intraRDOElapsedTime[NUM_CU_DEPTH]; // elapsed worker time in intra RDO per CU depth
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
214 int64_t interRDOElapsedTime[NUM_CU_DEPTH]; // elapsed worker time in inter RDO per CU depth
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
215 int64_t intraAnalysisElapsedTime; // elapsed worker time in intra sa8d analysis
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
216 int64_t motionEstimationElapsedTime; // elapsed worker time in predInterSearch()
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
217 int64_t loopFilterElapsedTime; // elapsed worker time in deblock and SAO and PSNR/SSIM
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218 int64_t pmeTime; // elapsed worker time processing ME slave jobs
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
219 int64_t pmeBlockTime; // elapsed worker time blocked for pme batch completion
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
220 int64_t pmodeTime; // elapsed worker time processing pmode slave jobs
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
221 int64_t pmodeBlockTime; // elapsed worker time blocked for pmode batch completion
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
222 int64_t weightAnalyzeTime; // elapsed worker time analyzing reference weights
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
223 int64_t totalCTUTime; // elapsed worker time in compressCTU (includes pmode master)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
224
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
225 uint32_t skippedMotionReferences[NUM_CU_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 uint32_t totalMotionReferences[NUM_CU_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
227 uint32_t skippedIntraCU[NUM_CU_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228 uint32_t totalIntraCU[NUM_CU_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
229
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
230 uint64_t countIntraRDO[NUM_CU_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 uint64_t countInterRDO[NUM_CU_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 uint64_t countIntraAnalysis;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233 uint64_t countMotionEstimate;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234 uint64_t countLoopFilter;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235 uint64_t countPMETasks;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
236 uint64_t countPMEMasters;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237 uint64_t countPModeTasks;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238 uint64_t countPModeMasters;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239 uint64_t countWeightAnalyze;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
240 uint64_t totalCTUs;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
242 CUStats() { clear(); }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
244 void clear()
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
245 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
246 memset(this, 0, sizeof(*this));
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
249 void accumulate(CUStats& other)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 for (uint32_t i = 0; i <= g_maxCUDepth; i++)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253 intraRDOElapsedTime[i] += other.intraRDOElapsedTime[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
254 interRDOElapsedTime[i] += other.interRDOElapsedTime[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 countIntraRDO[i] += other.countIntraRDO[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
256 countInterRDO[i] += other.countInterRDO[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
257 skippedMotionReferences[i] += other.skippedMotionReferences[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
258 totalMotionReferences[i] += other.totalMotionReferences[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
259 skippedIntraCU[i] += other.skippedIntraCU[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
260 totalIntraCU[i] += other.totalIntraCU[i];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
261 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
262
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263 intraAnalysisElapsedTime += other.intraAnalysisElapsedTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 motionEstimationElapsedTime += other.motionEstimationElapsedTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265 loopFilterElapsedTime += other.loopFilterElapsedTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266 pmeTime += other.pmeTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
267 pmeBlockTime += other.pmeBlockTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268 pmodeTime += other.pmodeTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
269 pmodeBlockTime += other.pmodeBlockTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 weightAnalyzeTime += other.weightAnalyzeTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271 totalCTUTime += other.totalCTUTime;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 countIntraAnalysis += other.countIntraAnalysis;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274 countMotionEstimate += other.countMotionEstimate;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 countLoopFilter += other.countLoopFilter;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
276 countPMETasks += other.countPMETasks;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 countPMEMasters += other.countPMEMasters;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
278 countPModeTasks += other.countPModeTasks;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
279 countPModeMasters += other.countPModeMasters;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280 countWeightAnalyze += other.countWeightAnalyze;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281 totalCTUs += other.totalCTUs;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
283 other.clear();
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
284 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
286 #endif
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
287
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
288 inline int getTUBits(int idx, int numIdx)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
289 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290 return idx + (idx < numIdx - 1);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
291 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
292
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
293 class Search : public Predict
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
294 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
295 public:
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
296
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
297 static const int16_t zeroShort[MAX_CU_SIZE];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
298
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
299 MotionEstimate m_me;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
300 Quant m_quant;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
301 RDCost m_rdCost;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
302 const x265_param* m_param;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
303 Frame* m_frame;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
304 const Slice* m_slice;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
305
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
306 Entropy m_entropyCoder;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
307 RQTData m_rqt[NUM_FULL_DEPTH];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
308
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
309 uint8_t* m_qtTempCbf[3];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
310 uint8_t* m_qtTempTransformSkipFlag[3];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
311
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
312 pixel* m_fencScaled; /* 32x32 buffer for down-scaled version of 64x64 CU fenc */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
313 pixel* m_fencTransposed; /* 32x32 buffer for transposed copy of fenc */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
314 pixel* m_intraPred; /* 32x32 buffer for individual intra predictions */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
315 pixel* m_intraPredAngs; /* allocation for 33 consecutive (all angular) 32x32 intra predictions */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
316
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
317 coeff_t* m_tsCoeff; /* transform skip coeff 32x32 */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
318 int16_t* m_tsResidual; /* transform skip residual 32x32 */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
319 pixel* m_tsRecon; /* transform skip reconstructed pixels 32x32 */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
320
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
321 bool m_bFrameParallel;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
322 bool m_bEnableRDOQ;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
323 uint32_t m_numLayers;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
324 uint32_t m_refLagPixels;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
325
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
326 #if DETAILED_CU_STATS
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
327 /* Accumulate CU statistics separately for each frame encoder */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
328 CUStats m_stats[X265_MAX_FRAME_THREADS];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
329 #endif
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
330
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
331 Search();
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
332 ~Search();
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
333
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
334 bool initSearch(const x265_param& param, ScalingList& scalingList);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
335 int setLambdaFromQP(const CUData& ctu, int qp); /* returns real quant QP in valid spec range */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
336
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
337 // mark temp RD entropy contexts as uninitialized; useful for finding loads without stores
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
338 void invalidateContexts(int fromDepth);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
339
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
340 // full RD search of intra modes. if sharedModes is not NULL, it directly uses them
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
341 void checkIntra(Mode& intraMode, const CUGeom& cuGeom, PartSize partSize, uint8_t* sharedModes, uint8_t* sharedChromaModes);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
342
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
343 // select best intra mode using only sa8d costs, cannot measure NxN intra
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
344 void checkIntraInInter(Mode& intraMode, const CUGeom& cuGeom);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
345 // encode luma mode selected by checkIntraInInter, then pick and encode a chroma mode
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
346 void encodeIntraInInter(Mode& intraMode, const CUGeom& cuGeom);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
347
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
348 // estimation inter prediction (non-skip)
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
349 void predInterSearch(Mode& interMode, const CUGeom& cuGeom, bool bChromaMC, uint32_t masks[2]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
350
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
351 // encode residual and compute rd-cost for inter mode
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
352 void encodeResAndCalcRdInterCU(Mode& interMode, const CUGeom& cuGeom);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
353 void encodeResAndCalcRdSkipCU(Mode& interMode);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
354
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
355 // encode residual without rd-cost
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
356 void residualTransformQuantInter(Mode& mode, const CUGeom& cuGeom, uint32_t absPartIdx, uint32_t tuDepth, const uint32_t depthRange[2]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
357 void residualTransformQuantIntra(Mode& mode, const CUGeom& cuGeom, uint32_t absPartIdx, uint32_t tuDepth, const uint32_t depthRange[2]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
358 void residualQTIntraChroma(Mode& mode, const CUGeom& cuGeom, uint32_t absPartIdx, uint32_t tuDepth);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
359
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
360 // pick be chroma mode from available using just sa8d costs
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
361 void getBestIntraModeChroma(Mode& intraMode, const CUGeom& cuGeom);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
362
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
363 /* update CBF flags and QP values to be internally consistent */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
364 void checkDQP(Mode& mode, const CUGeom& cuGeom);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
365 void checkDQPForSplitPred(Mode& mode, const CUGeom& cuGeom);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
366
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
367 MV getLowresMV(const CUData& cu, const PredictionUnit& pu, int list, int ref);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
368
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
369 class PME : public BondedTaskGroup
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
370 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
371 public:
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
372
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
373 Search& master;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
374 Mode& mode;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
375 const CUGeom& cuGeom;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
376 const PredictionUnit& pu;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
377 int puIdx;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
378
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
379 struct {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
380 int ref[2][MAX_NUM_REF];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
381 int refCnt[2];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
382 } m_jobs;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
383
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
384 PME(Search& s, Mode& m, const CUGeom& g, const PredictionUnit& u, int p) : master(s), mode(m), cuGeom(g), pu(u), puIdx(p) {}
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
385
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
386 void processTasks(int workerThreadId);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
387
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
388 protected:
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
389
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
390 PME operator=(const PME&);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
391 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
392
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
393 void processPME(PME& pme, Search& slave);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
394 void singleMotionEstimation(Search& master, Mode& interMode, const PredictionUnit& pu, int part, int list, int ref);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
395
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
396 protected:
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
397
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
398 /* motion estimation distribution */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
399 ThreadLocalData* m_tld;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
400
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
401 uint32_t m_listSelBits[3];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
402 Lock m_meLock;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
403
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
404 void saveResidualQTData(CUData& cu, ShortYuv& resiYuv, uint32_t absPartIdx, uint32_t tuDepth);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
405
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
406 // RDO search of luma intra modes; result is fully encoded luma. luma distortion is returned
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
407 uint32_t estIntraPredQT(Mode &intraMode, const CUGeom& cuGeom, const uint32_t depthRange[2], uint8_t* sharedModes);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
408
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
409 // RDO select best chroma mode from luma; result is fully encode chroma. chroma distortion is returned
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
410 uint32_t estIntraPredChromaQT(Mode &intraMode, const CUGeom& cuGeom, uint8_t* sharedChromaModes);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
411
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
412 void codeSubdivCbfQTChroma(const CUData& cu, uint32_t tuDepth, uint32_t absPartIdx);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
413 void codeInterSubdivCbfQT(CUData& cu, uint32_t absPartIdx, const uint32_t tuDepth, const uint32_t depthRange[2]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
414 void codeCoeffQTChroma(const CUData& cu, uint32_t tuDepth, uint32_t absPartIdx, TextType ttype);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
415
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
416 struct Cost
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
417 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
418 uint64_t rdcost;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
419 uint32_t bits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
420 sse_ret_t distortion;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
421 uint32_t energy;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
422 Cost() { rdcost = 0; bits = 0; distortion = 0; energy = 0; }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
423 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
424
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
425 uint64_t estimateNullCbfCost(uint32_t &dist, uint32_t &psyEnergy, uint32_t tuDepth, TextType compId);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
426 void estimateResidualQT(Mode& mode, const CUGeom& cuGeom, uint32_t absPartIdx, uint32_t depth, ShortYuv& resiYuv, Cost& costs, const uint32_t depthRange[2]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
427
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
428 // generate prediction, generate residual and recon. if bAllowSplit, find optimal RQT splits
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
429 void codeIntraLumaQT(Mode& mode, const CUGeom& cuGeom, uint32_t tuDepth, uint32_t absPartIdx, bool bAllowSplit, Cost& costs, const uint32_t depthRange[2]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
430 void codeIntraLumaTSkip(Mode& mode, const CUGeom& cuGeom, uint32_t tuDepth, uint32_t absPartIdx, Cost& costs);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
431 void extractIntraResultQT(CUData& cu, Yuv& reconYuv, uint32_t tuDepth, uint32_t absPartIdx);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
432
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
433 // generate chroma prediction, generate residual and recon
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
434 uint32_t codeIntraChromaQt(Mode& mode, const CUGeom& cuGeom, uint32_t tuDepth, uint32_t absPartIdx, uint32_t& psyEnergy);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
435 uint32_t codeIntraChromaTSkip(Mode& mode, const CUGeom& cuGeom, uint32_t tuDepth, uint32_t tuDepthC, uint32_t absPartIdx, uint32_t& psyEnergy);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
436 void extractIntraResultChromaQT(CUData& cu, Yuv& reconYuv, uint32_t absPartIdx, uint32_t tuDepth);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
437
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
438 // reshuffle CBF flags after coding a pair of 4:2:2 chroma blocks
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
439 void offsetSubTUCBFs(CUData& cu, TextType ttype, uint32_t tuDepth, uint32_t absPartIdx);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
440
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
441 /* output of mergeEstimation, best merge candidate */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
442 struct MergeData
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
443 {
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
444 MVField mvField[2];
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
445 uint32_t dir;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
446 uint32_t index;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
447 uint32_t bits;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
448 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
449
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
450 /* inter/ME helper functions */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
451 int selectMVP(const CUData& cu, const PredictionUnit& pu, const MV amvp[AMVP_NUM_CANDS], int list, int ref);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
452 const MV& checkBestMVP(const MV amvpCand[2], const MV& mv, int& mvpIdx, uint32_t& outBits, uint32_t& outCost) const;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
453 void setSearchRange(const CUData& cu, const MV& mvp, int merange, MV& mvmin, MV& mvmax) const;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
454 uint32_t mergeEstimation(CUData& cu, const CUGeom& cuGeom, const PredictionUnit& pu, int puIdx, MergeData& m);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
455 static void getBlkBits(PartSize cuMode, bool bPSlice, int puIdx, uint32_t lastMode, uint32_t blockBit[3]);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
456
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
457 /* intra helper functions */
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
458 enum { MAX_RD_INTRA_MODES = 16 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
459 static void updateCandList(uint32_t mode, uint64_t cost, int maxCandCount, uint32_t* candModeList, uint64_t* candCostList);
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
460
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
461 // get most probable luma modes for CU part, and bit cost of all non mpm modes
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
462 uint32_t getIntraRemModeBits(CUData & cu, uint32_t absPartIdx, uint32_t mpmModes[3], uint64_t& mpms) const;
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
463
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
464 void updateModeCost(Mode& m) const { m.rdCost = m_rdCost.m_psyRd ? m_rdCost.calcPsyRdCost(m.distortion, m.totalBits, m.psyEnergy) : m_rdCost.calcRdCost(m.distortion, m.totalBits); }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
465 };
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
466 }
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
467
772086c29cc7 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
468 #endif // ifndef X265_SEARCH_H