1 /* 2 * 3 * Copyright 2010 Rockchip Electronics Co. LTD 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 #ifndef __H263D_SYNTAX__ 19 #define __H263D_SYNTAX__ 20 21 #include "dxva_syntax.h" 22 23 /*video vop specific*/ 24 typedef enum { 25 H263_INVALID_VOP = -1, 26 H263_I_VOP = 0, 27 H263_P_VOP = 1, 28 } H263VOPType; 29 30 /* H263PT2 Picture Parameter structure */ 31 typedef struct _DXVA_PicParams_H263 { 32 RK_U8 short_video_header; 33 RK_U8 vop_coding_type; 34 RK_U8 vop_quant; 35 RK_U16 wDecodedPictureIndex; 36 RK_U16 wDeblockedPictureIndex; 37 RK_U16 wForwardRefPictureIndex; 38 RK_U16 wBackwardRefPictureIndex; 39 RK_U16 vop_time_increment_resolution; 40 RK_U32 TRB[2]; 41 RK_U32 TRD[2]; 42 43 union { 44 struct { 45 RK_U16 unPicPostProc : 2; 46 RK_U16 interlaced : 1; 47 RK_U16 quant_type : 1; 48 RK_U16 quarter_sample : 1; 49 RK_U16 resync_marker_disable : 1; 50 RK_U16 data_partitioned : 1; 51 RK_U16 reversible_vlc : 1; 52 RK_U16 reduced_resolution_vop_enable : 1; 53 RK_U16 vop_coded : 1; 54 RK_U16 vop_rounding_type : 1; 55 RK_U16 intra_dc_vlc_thr : 3; 56 RK_U16 top_field_first : 1; 57 RK_U16 alternate_vertical_scan_flag : 1; 58 }; 59 RK_U16 wPicFlagBitFields; 60 }; 61 RK_U8 profile_and_level_indication; 62 RK_U8 video_object_layer_verid; 63 RK_U16 vop_width; 64 RK_U16 vop_height; 65 union { 66 struct { 67 RK_U16 sprite_enable : 2; 68 RK_U16 no_of_sprite_warping_points : 6; 69 RK_U16 sprite_warping_accuracy : 2; 70 }; 71 RK_U16 wSpriteBitFields; 72 }; 73 RK_S16 warping_mv[4][2]; 74 union { 75 struct { 76 RK_U8 vop_fcode_forward : 3; 77 RK_U8 vop_fcode_backward : 3; 78 }; 79 RK_U8 wFcodeBitFields; 80 }; 81 RK_U16 StatusReportFeedbackNumber; 82 RK_U16 Reserved16BitsA; 83 RK_U16 Reserved16BitsB; 84 85 // FIXME: added for rockchip hardware information 86 RK_U32 prev_coding_type; 87 RK_U32 header_bits; 88 } DXVA_PicParams_H263, *LPDXVA_PicParams_H263; 89 90 typedef struct h263d_dxva2_picture_context { 91 DXVA_PicParams_H263 pp; 92 93 // pointer and storage for buffer descriptor 94 DXVA2_DecodeBufferDesc *data[2]; 95 DXVA2_DecodeBufferDesc desc[2]; 96 } h263d_dxva2_picture_context_t; 97 98 #endif /*__H263D_SYNTAX__*/ 99