1 2 /* 3 * Copyright © Microsoft Corporation 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice (including the next 13 * paragraph) shall be included in all copies or substantial portions of the 14 * Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 * IN THE SOFTWARE. 23 */ 24 25 #ifndef D3D12_VIDEO_ENC_HEVC_H 26 #define D3D12_VIDEO_ENC_HEVC_H 27 #include "d3d12_video_types.h" 28 29 bool 30 d3d12_video_encoder_update_current_encoder_config_state_hevc(struct d3d12_video_encoder *pD3D12Enc, 31 D3D12_VIDEO_SAMPLE srcTextureDesc, 32 struct pipe_picture_desc * picture); 33 void 34 d3d12_video_encoder_update_current_rate_control_hevc(struct d3d12_video_encoder *pD3D12Enc, 35 pipe_h265_enc_picture_desc *picture); 36 bool 37 d3d12_video_encoder_negotiate_current_hevc_slices_configuration(struct d3d12_video_encoder *pD3D12Enc, 38 pipe_h265_enc_picture_desc *picture); 39 bool 40 d3d12_video_encoder_update_hevc_gop_configuration(struct d3d12_video_encoder *pD3D12Enc, 41 pipe_h265_enc_picture_desc *picture); 42 D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE 43 d3d12_video_encoder_convert_hevc_motion_configuration(struct d3d12_video_encoder *pD3D12Enc, 44 pipe_h265_enc_picture_desc *picture); 45 D3D12_VIDEO_ENCODER_LEVELS_HEVC 46 d3d12_video_encoder_convert_level_hevc(uint32_t hevcSpecLevel); 47 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC 48 d3d12_video_encoder_convert_hevc_codec_configuration(struct d3d12_video_encoder *pD3D12Enc, 49 pipe_h265_enc_picture_desc *picture, 50 bool &is_supported); 51 void 52 d3d12_video_encoder_update_current_frame_pic_params_info_hevc(struct d3d12_video_encoder *pD3D12Enc, 53 struct pipe_video_buffer * srcTexture, 54 struct pipe_picture_desc * picture, 55 D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA &picParams, 56 bool &bUsedAsReference); 57 uint32_t 58 d3d12_video_encoder_build_codec_headers_hevc(struct d3d12_video_encoder *pD3D12Enc, 59 std::vector<uint64_t> &pWrittenCodecUnitsSizes); 60 bool 61 d3d12_video_encoder_isequal_slice_config_hevc( 62 D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE targetMode, 63 D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES targetConfig, 64 D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE otherMode, 65 D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES otherConfig); 66 67 #endif 68