1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.renderscript.cts.refocus;
18 
19 /**
20  * Interface defining a depth transform that translates real depth values
21  * into an 8-bit quantized representation.
22  */
23 public interface DepthTransform {
24     /**
25      * @return The near depth value
26      */
getNear()27     public float getNear();
28 
29     /**
30      * @return The far depth value
31      */
getFar()32     public float getFar();
33 
34     /**
35      * @return The format of the transform
36      */
getFormat()37     public String getFormat();
38 
39     /**
40      * @return the quantized value that corresponds to the given depth value
41      */
quantize(float depth)42     public int quantize(float depth);
43 
44     /**
45      * @return the depth value that corresponds to the given quantized value
46      */
reconstruct(int value)47     public float reconstruct(int value);
48 }
49