1d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu/*
2cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Copyright (c) 2014 Intel Corporation 
3cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika//
4cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Licensed under the Apache License, Version 2.0 (the "License");
5cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// you may not use this file except in compliance with the License.
6cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// You may obtain a copy of the License at
7cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika//
8cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika//      http://www.apache.org/licenses/LICENSE-2.0
9cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika//
10cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Unless required by applicable law or agreed to in writing, software
11cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// distributed under the License is distributed on an "AS IS" BASIS,
12cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// See the License for the specific language governing permissions and
14cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// limitations under the License.
15cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika*/
16d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#ifndef VIDEO_PAYLOAD_BUFFER_H
17d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#define VIDEO_PAYLOAD_BUFFER_H
18d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
1951e60f4b4281bb3de182641f9cfe63a7f99bef3bDan Liang#include <utils/Timers.h>
20d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiunamespace android {
21d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiunamespace intel {
22d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
23d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiustruct VideoPayloadBuffer {
24d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    // transform made by clients (clients to hwc)
25d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int client_transform;
26d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int metadata_transform;
27d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int rotated_width;
28d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int rotated_height;
29d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int surface_protected;
30d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int force_output_method;
31d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t rotated_buffer_handle;
32d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t renderStatus;
33d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    unsigned int used_by_widi;
34d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int bob_deinterlace;
356ede0b184b16ecfe103765f9ff8a62859b89d25aRobert Crabtree    int tiling;
36d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t width;
37d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t height;
38d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t luma_stride;
39d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t chroma_u_stride;
40d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t chroma_v_stride;
41d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t format;
42d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t khandle;
43d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    int64_t  timestamp;
44d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
45d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t rotate_luma_stride;
46d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t rotate_chroma_u_stride;
47d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    uint32_t rotate_chroma_v_stride;
4851e60f4b4281bb3de182641f9cfe63a7f99bef3bDan Liang
4951e60f4b4281bb3de182641f9cfe63a7f99bef3bDan Liang    nsecs_t hwc_timestamp;
5051e60f4b4281bb3de182641f9cfe63a7f99bef3bDan Liang    uint32_t layer_transform;
5151e60f4b4281bb3de182641f9cfe63a7f99bef3bDan Liang
52d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    void *native_window;
538ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng    uint32_t scaling_khandle;
548ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng    uint32_t scaling_width;
558ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng    uint32_t scaling_height;
568ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng
578ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng    uint32_t scaling_luma_stride;
588ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng    uint32_t scaling_chroma_u_stride;
598ed7a68409fe0d212a1fb92a0211ee83e54f3b4cLi Zeng    uint32_t scaling_chroma_v_stride;
606a0e0a894d5d1dfe4141358c75f9e8201f57f3beLi Zeng
616a0e0a894d5d1dfe4141358c75f9e8201f57f3beLi Zeng    uint32_t crop_width;
626a0e0a894d5d1dfe4141358c75f9e8201f57f3beLi Zeng    uint32_t crop_height;
636b19a2416bbb375b9620025533d85b60582ed013mahongpe
646b19a2416bbb375b9620025533d85b60582ed013mahongpe    uint32_t coded_width;
656b19a2416bbb375b9620025533d85b60582ed013mahongpe    uint32_t coded_height;
66d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu};
67d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
68d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
69d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu// force output method values
70d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiuenum {
71d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    FORCE_OUTPUT_INVALID = 0,
72d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    FORCE_OUTPUT_GPU,
73d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu    FORCE_OUTPUT_OVERLAY,
74148f6bf8c862a93abb86fdbc212ea18777284659Gu, Wangyi    FORCE_OUTPUT_SW_DECODE,
75d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu};
76d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
77d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
78d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu} // namespace intel
79d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu} // namespace android
80d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
81d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
82d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#endif // VIDEO_PAYLOAD_BUFFER_H
83d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
84d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu
85