├── .gitignore ├── CHANGELOG.md ├── CMakeLists.txt ├── LICENSES ├── Apache-2.0 └── MIT ├── build ├── .gitignore ├── android │ ├── Android.mk │ ├── README.md │ ├── aarch64 │ │ ├── fix │ │ │ ├── libc.so │ │ │ └── readme.txt │ │ └── make-Android.bash │ ├── android.toolchain.cmake │ ├── arm │ │ └── make-Android.bash │ ├── env_setup.sh │ ├── ndk_links.md │ ├── update.sh │ └── x86 │ │ └── make-Android.bash ├── cmake │ └── version.in ├── linux │ ├── aarch64 │ │ ├── arm.linux.cross.cmake │ │ └── make-Makefiles.bash │ ├── arm │ │ ├── arm.linux.cross.cmake │ │ └── make-Makefiles.bash │ ├── opt_proc.sh │ ├── x86 │ │ └── sofia-3gr │ │ │ ├── make-Makefiles.bash │ │ │ └── sofia-3gr.linux.cross.cmake │ └── x86_64 │ │ └── make-Makefiles.bash ├── vc10-x86_64 │ ├── build-all.bat │ └── make-solutions.bat └── vc12-x86_64 │ ├── build-all.bat │ └── make-solutions.bat ├── debian ├── .gitignore ├── README.Debian ├── README.source ├── changelog ├── compat ├── control ├── copyright ├── docs ├── librockchip-mpp-dev.install ├── librockchip-mpp1.install ├── librockchip-vpu0.install ├── rockchip-mpp-demos.install ├── rules └── source │ └── format ├── doc ├── Rockchip_Developer_Guide_MPP_CN.md ├── Rockchip_Developer_Guide_MPP_EN.md ├── design │ ├── 1.mpp_design.txt │ ├── 2.kernel_driver.txt │ ├── 3.mpp_buffer.txt │ └── 4.mpp_task.txt ├── media │ ├── Figure01_MPP_system_framework.png │ ├── Figure02_Data_structure_used_in_MPI_interface.png │ ├── Figure03_Use_simple_interface_to_realize_video_decoding.png │ ├── Figure03_Use_simple_interface_to_realize_video_decoding_EN.png │ ├── Figure04_Normal_usage_of_MppBuffer.png │ ├── Figure04_Normal_usage_of_MppBuffer_EN.png │ ├── Figure05_Usage_of_MppBuffer_External_Import.png │ ├── Figure05_Usage_of_MppBuffer_External_Import_EN.png │ ├── Figure06_Important_parameter_description_of_MppPacket.png │ ├── Figure06_Important_parameter_description_of_MppPacket_EN.png │ ├── Figure07_Important_parameter_description_of_MppFrame.png │ ├── Figure07_Important_parameter_description_of_MppFrame_EN.png │ ├── Figure08_Use_MppTask_for_input_and_output.png │ ├── Figure08_Use_MppTask_for_input_and_output_EN.png │ ├── Figure09_Data_Types_and_Keyword_Types_Supported_by_MppTask.png │ ├── Figure09_Data_Types_and_Keyword_Types_Supported_by_MppTask_EN.png │ ├── Figure10_MppCtx_usage_process.png │ ├── Figure11_MPI_interface_range.png │ ├── Figure12_Decoder_multi_thread_usage.png │ ├── Figure12_Decoder_multi_thread_usage_EN.png │ ├── Figure12_Decoder_single_thread_usage.png │ ├── Figure12_Decoder_single_thread_usage_EN.png │ ├── Figure13_Schematic_diagram_of_pure_internal_allocation_mode.png │ ├── Figure14_Code_flow_of_decoder_image_memory_pure_internal_allocation_mode.png │ ├── Figure15_Semi-internal_allocation_mode_decoder_work_flow.png │ ├── Figure16_Schematic_diagram_of_pure_external_allocation_mode.png │ ├── Figure17_Pure_external_allocation_mode_decoder_work_flow.png │ ├── Figure18_Encoder_input_frame_memory_arrangement_1.png │ ├── Figure18_Encoder_input_frame_memory_arrangement_1_EN.png │ ├── Figure18_Encoder_input_frame_memory_arrangement_2.png │ ├── Figure18_Encoder_input_frame_memory_arrangement_2_EN.png │ └── Rockchip_Developer_Guide_MPP │ │ ├── MPP_H264Profile.png │ │ ├── MPP_MpiCmd_enumeration_type.png │ │ ├── MPP_MpiCmd_enumeration_type_related_to_MPP.png │ │ ├── MPP_MppCodingType.png │ │ ├── MPP_MppEncMirrorCfg.png │ │ ├── MPP_MppEncRcDropFrmMode.png │ │ ├── MPP_MppEncRcMode.png │ │ ├── MPP_MppEncRcPriority.png │ │ ├── MPP_MppEncRcSuperFrameMode.png │ │ ├── MPP_MppEncRotationCfg.png │ │ ├── MPP_MppEncSplitMode.png │ │ ├── MPP_MppFrameColorRange.png │ │ ├── MPP_MppFrameFormat.png │ │ ├── MPP_MppPacket_is_generated_by_copy_init.png │ │ ├── MPP_MppPacket_is_generated_by_copy_init_EN.png │ │ ├── MPP_MppPacket_is_generated_from_MppBuffer.png │ │ ├── MPP_MppPacket_is_generated_from_MppBuffer_EN.png │ │ ├── MPP_Split_mode_config.png │ │ ├── MPP_color_space_range.png │ │ ├── MPP_decode_log.png │ │ ├── MPP_encode_log.png │ │ ├── MPP_external_malloc_address_is_configured_to_MppPacket.png │ │ ├── MPP_external_malloc_address_is_configured_to_MppPacket_EN.png │ │ ├── MPP_image_colorspace_format_and_memory_arrangement.png │ │ ├── MPP_image_data_frame_field_properties.png │ │ ├── MPP_print_decode_help.png │ │ ├── MPP_print_encode_help.png │ │ ├── MPP_procedure_pseudo_code_of_external_import_usage.png │ │ ├── MPP_procedure_pseudo_code_of_external_import_usage_EN.png │ │ ├── MPP_procedure_pseudo_code_of_normal_usage.png │ │ └── MPP_procedure_pseudo_code_of_normal_usage_EN.png └── readme.txt ├── inc ├── mpp_buffer.h ├── mpp_compat.h ├── mpp_err.h ├── mpp_frame.h ├── mpp_log.h ├── mpp_log_def.h ├── mpp_meta.h ├── mpp_packet.h ├── mpp_rc_api.h ├── mpp_rc_defs.h ├── mpp_sys_cfg.h ├── mpp_sys_cfg_st.h ├── mpp_task.h ├── rk_hdr_meta_com.h ├── rk_mpi.h ├── rk_mpi_cmd.h ├── rk_mpp_cfg.h ├── rk_type.h ├── rk_vdec_cfg.h ├── rk_vdec_cmd.h ├── rk_venc_cfg.h ├── rk_venc_cmd.h ├── rk_venc_kcfg.h ├── rk_venc_rc.h ├── rk_venc_ref.h ├── vpu.h └── vpu_api.h ├── kmpp ├── CMakeLists.txt ├── base │ ├── CMakeLists.txt │ ├── inc │ │ ├── kmpp_frame.h │ │ ├── kmpp_frame_impl.h │ │ ├── kmpp_obj.h │ │ ├── kmpp_obj_func.h │ │ ├── kmpp_obj_helper.h │ │ └── kmpp_obj_impl.h │ ├── kmpp_frame.c │ ├── kmpp_obj.c │ ├── kmpp_venc_cfg.c │ └── test │ │ ├── CMakeLists.txt │ │ ├── kmpp_frame_test.c │ │ └── kmpp_obj_test.c ├── inc │ └── kmpp.h └── kmpp.c ├── merge_static_lib.sh ├── mpp ├── CMakeLists.txt ├── base │ ├── CMakeLists.txt │ ├── inc │ │ ├── mpp_2str.h │ │ ├── mpp_bitput.h │ │ ├── mpp_bitread.h │ │ ├── mpp_bitwrite.h │ │ ├── mpp_buf_slot.h │ │ ├── mpp_buffer_impl.h │ │ ├── mpp_cfg_io.h │ │ ├── mpp_cluster.h │ │ ├── mpp_dec_cb_param.h │ │ ├── mpp_enc_cb_param.h │ │ ├── mpp_enc_cfg_impl.h │ │ ├── mpp_enc_ref.h │ │ ├── mpp_enc_refs.h │ │ ├── mpp_frame_impl.h │ │ ├── mpp_meta_impl.h │ │ ├── mpp_packet_impl.h │ │ ├── mpp_task_impl.h │ │ └── mpp_trie.h │ ├── mpp_2str.c │ ├── mpp_bitput.c │ ├── mpp_bitread.c │ ├── mpp_bitwrite.c │ ├── mpp_buf_slot.cpp │ ├── mpp_buffer.cpp │ ├── mpp_buffer_impl.cpp │ ├── mpp_cfg.cpp │ ├── mpp_cfg_io.c │ ├── mpp_cluster.cpp │ ├── mpp_dec_cfg.cpp │ ├── mpp_dec_hdr_meta.c │ ├── mpp_enc_cfg.cpp │ ├── mpp_enc_ref.cpp │ ├── mpp_enc_refs.cpp │ ├── mpp_frame.cpp │ ├── mpp_meta.cpp │ ├── mpp_packet.cpp │ ├── mpp_sys_cfg.cpp │ ├── mpp_sys_cfg_st.cpp │ ├── mpp_task.cpp │ ├── mpp_task_impl.cpp │ ├── mpp_trie.c │ └── test │ │ ├── CMakeLists.txt │ │ ├── mpp_bit_read_test.c │ │ ├── mpp_bit_test.c │ │ ├── mpp_buffer_test.c │ │ ├── mpp_cfg_test.c │ │ ├── mpp_cluster_test.c │ │ ├── mpp_dec_cfg_test.c │ │ ├── mpp_enc_cfg_test.c │ │ ├── mpp_enc_ref_test.c │ │ ├── mpp_meta_test.c │ │ ├── mpp_packet_test.c │ │ ├── mpp_sys_cfg_st_test.c │ │ ├── mpp_sys_cfg_test.c │ │ ├── mpp_task_test.c │ │ └── mpp_trie_test.c ├── codec │ ├── CMakeLists.txt │ ├── dec │ │ ├── CMakeLists.txt │ │ ├── av1 │ │ │ ├── CMakeLists.txt │ │ │ ├── av1.h │ │ │ ├── av1_entropymode.c │ │ │ ├── av1_entropymode.h │ │ │ ├── av1d_api.c │ │ │ ├── av1d_cbs.c │ │ │ ├── av1d_cbs.h │ │ │ ├── av1d_codec.h │ │ │ ├── av1d_common.h │ │ │ ├── av1d_parser.c │ │ │ ├── av1d_parser.h │ │ │ ├── av1d_parser2_syntax.c │ │ │ └── av1d_probs.c │ │ ├── avs │ │ │ ├── CMakeLists.txt │ │ │ ├── avsd_api.c │ │ │ ├── avsd_parse.c │ │ │ └── avsd_parse.h │ │ ├── avs2 │ │ │ ├── CMakeLists.txt │ │ │ ├── avs2d_api.c │ │ │ ├── avs2d_dpb.c │ │ │ ├── avs2d_dpb.h │ │ │ ├── avs2d_global.h │ │ │ ├── avs2d_parse.c │ │ │ ├── avs2d_parse.h │ │ │ ├── avs2d_ps.c │ │ │ └── avs2d_ps.h │ │ ├── common │ │ │ ├── CMakeLists.txt │ │ │ ├── h2645d_sei.c │ │ │ └── h2645d_sei.h │ │ ├── dummy │ │ │ ├── CMakeLists.txt │ │ │ └── dummy_dec_api.c │ │ ├── h263 │ │ │ ├── CMakeLists.txt │ │ │ ├── h263d_api.c │ │ │ ├── h263d_parser.c │ │ │ └── h263d_parser.h │ │ ├── h264 │ │ │ ├── CMakeLists.txt │ │ │ ├── h264d_api.c │ │ │ ├── h264d_dpb.c │ │ │ ├── h264d_dpb.h │ │ │ ├── h264d_fill.c │ │ │ ├── h264d_fill.h │ │ │ ├── h264d_global.h │ │ │ ├── h264d_init.c │ │ │ ├── h264d_init.h │ │ │ ├── h264d_parse.c │ │ │ ├── h264d_parse.h │ │ │ ├── h264d_pps.c │ │ │ ├── h264d_pps.h │ │ │ ├── h264d_scalist.c │ │ │ ├── h264d_scalist.h │ │ │ ├── h264d_sei.c │ │ │ ├── h264d_sei.h │ │ │ ├── h264d_slice.c │ │ │ ├── h264d_slice.h │ │ │ ├── h264d_sps.c │ │ │ └── h264d_sps.h │ │ ├── h265 │ │ │ ├── CMakeLists.txt │ │ │ ├── h265d_codec.h │ │ │ ├── h265d_defs.h │ │ │ ├── h265d_parser.c │ │ │ ├── h265d_parser.h │ │ │ ├── h265d_parser2_syntax.c │ │ │ ├── h265d_ps.c │ │ │ ├── h265d_refs.c │ │ │ └── h265d_sei.c │ │ ├── jpeg │ │ │ ├── CMakeLists.txt │ │ │ ├── jpegd_parser.c │ │ │ └── jpegd_parser.h │ │ ├── m2v │ │ │ ├── CMakeLists.txt │ │ │ ├── m2vd_api.c │ │ │ ├── m2vd_codec.h │ │ │ ├── m2vd_com.h │ │ │ ├── m2vd_parser.c │ │ │ └── m2vd_parser.h │ │ ├── mpg4 │ │ │ ├── CMakeLists.txt │ │ │ ├── mpg4d_api.c │ │ │ ├── mpg4d_parser.c │ │ │ └── mpg4d_parser.h │ │ ├── vp8 │ │ │ ├── CMakeLists.txt │ │ │ ├── vp8d_api.c │ │ │ ├── vp8d_codec.h │ │ │ ├── vp8d_data.h │ │ │ ├── vp8d_parser.c │ │ │ └── vp8d_parser.h │ │ └── vp9 │ │ │ ├── CMakeLists.txt │ │ │ ├── vp9.h │ │ │ ├── vp9d_api.c │ │ │ ├── vp9d_codec.h │ │ │ ├── vp9d_parser.c │ │ │ ├── vp9d_parser.h │ │ │ ├── vp9d_parser2_syntax.c │ │ │ ├── vp9data.h │ │ │ ├── vpx_rac.c │ │ │ └── vpx_rac.h │ ├── enc │ │ ├── CMakeLists.txt │ │ ├── dummy │ │ │ ├── CMakeLists.txt │ │ │ └── dummy_enc_api.c │ │ ├── h264 │ │ │ ├── CMakeLists.txt │ │ │ ├── h264e_api_v2.c │ │ │ ├── h264e_debug.h │ │ │ ├── h264e_dpb.c │ │ │ ├── h264e_dpb.h │ │ │ ├── h264e_pps.c │ │ │ ├── h264e_pps.h │ │ │ ├── h264e_sei.c │ │ │ ├── h264e_sei.h │ │ │ ├── h264e_slice.c │ │ │ ├── h264e_slice.h │ │ │ ├── h264e_sps.c │ │ │ └── h264e_sps.h │ │ ├── h265 │ │ │ ├── CMakeLists.txt │ │ │ ├── h265e_api.c │ │ │ ├── h265e_codec.h │ │ │ ├── h265e_context_table.h │ │ │ ├── h265e_dpb.c │ │ │ ├── h265e_dpb.h │ │ │ ├── h265e_enctropy.c │ │ │ ├── h265e_enctropy.h │ │ │ ├── h265e_header_gen.c │ │ │ ├── h265e_header_gen.h │ │ │ ├── h265e_ps.c │ │ │ ├── h265e_ps.h │ │ │ ├── h265e_slice.c │ │ │ ├── h265e_slice.h │ │ │ ├── h265e_stream.c │ │ │ ├── h265e_stream.h │ │ │ └── h265e_syntax.c │ │ ├── jpeg │ │ │ ├── CMakeLists.txt │ │ │ ├── jpege_api_v2.c │ │ │ └── jpege_debug.h │ │ └── vp8 │ │ │ ├── CMakeLists.txt │ │ │ ├── vp8e_api_v2.c │ │ │ ├── vp8e_debug.h │ │ │ ├── vp8e_rc.c │ │ │ └── vp8e_rc.h │ ├── enc_impl.cpp │ ├── inc │ │ ├── av1d_api.h │ │ ├── avs2d_api.h │ │ ├── avsd_api.h │ │ ├── dummy_dec_api.h │ │ ├── dummy_enc_api.h │ │ ├── enc_impl.h │ │ ├── enc_impl_api.h │ │ ├── h263d_api.h │ │ ├── h264d_api.h │ │ ├── h264e_api_v2.h │ │ ├── h265d_api.h │ │ ├── h265e_api.h │ │ ├── jpegd_api.h │ │ ├── jpege_api_v2.h │ │ ├── m2vd_api.h │ │ ├── mpg4d_api.h │ │ ├── mpp_dec.h │ │ ├── mpp_dec_impl.h │ │ ├── mpp_dec_no_thread.h │ │ ├── mpp_dec_normal.h │ │ ├── mpp_enc.h │ │ ├── mpp_enc_impl.h │ │ ├── mpp_parser.h │ │ ├── mpp_rc.h │ │ ├── parser_api.h │ │ ├── rc.h │ │ ├── rc │ │ │ ├── rc_vepu.h │ │ │ └── rc_vepu540.h │ │ ├── rc_data.h │ │ ├── rc_data_base.h │ │ ├── rc_data_impl.h │ │ ├── rc_hal.h │ │ ├── vp8d_api.h │ │ ├── vp8e_api_v2.h │ │ └── vp9d_api.h │ ├── mpp_dec.cpp │ ├── mpp_dec_debug.h │ ├── mpp_dec_no_thread.cpp │ ├── mpp_dec_normal.cpp │ ├── mpp_enc_debug.h │ ├── mpp_enc_impl.cpp │ ├── mpp_enc_v2.cpp │ ├── mpp_parser.cpp │ ├── mpp_rc.cpp │ └── rc │ │ ├── CMakeLists.txt │ │ ├── h264e_rc.c │ │ ├── h264e_rc.h │ │ ├── h265e_rc.c │ │ ├── h265e_rc.h │ │ ├── jpege_rc.c │ │ ├── jpege_rc.h │ │ ├── rc.cpp │ │ ├── rc_base.cpp │ │ ├── rc_base.h │ │ ├── rc_ctx.h │ │ ├── rc_data.cpp │ │ ├── rc_data_base.cpp │ │ ├── rc_data_impl.cpp │ │ ├── rc_debug.h │ │ ├── rc_impl.cpp │ │ ├── rc_impl.h │ │ ├── rc_model_v2.c │ │ ├── rc_model_v2.h │ │ ├── rc_model_v2_smt.c │ │ ├── rc_model_v2_smt.h │ │ ├── test │ │ ├── CMakeLists.txt │ │ ├── rc_api_test.c │ │ └── rc_base_test.c │ │ ├── vp8e_rc.c │ │ └── vp8e_rc.h ├── codecs.cmake ├── common │ ├── av1d_syntax.h │ ├── avs2d_syntax.h │ ├── avsd_syntax.h │ ├── dxva_syntax.h │ ├── h263d_syntax.h │ ├── h264_syntax.h │ ├── h264d_syntax.h │ ├── h264e_syntax.h │ ├── h265_syntax.h │ ├── h265d_syntax.h │ ├── h265e_syntax.h │ ├── h265e_syntax_new.h │ ├── jpegd_syntax.h │ ├── jpege_syntax.h │ ├── m2vd_syntax.h │ ├── mpg4d_syntax.h │ ├── vp8d_syntax.h │ ├── vp8e_syntax.h │ └── vp9d_syntax.h ├── hal │ ├── CMakeLists.txt │ ├── common │ │ ├── CMakeLists.txt │ │ ├── av1 │ │ │ ├── CMakeLists.txt │ │ │ ├── av1d_common.h │ │ │ ├── film_grain_noise_table.c │ │ │ ├── film_grain_noise_table.h │ │ │ ├── hal_av1d_api_v2.c │ │ │ └── hal_av1d_common.h │ │ ├── h264 │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_h264e_api_v2.c │ │ │ ├── hal_h264e_debug.h │ │ │ ├── hal_h264e_stream_amend.c │ │ │ └── hal_h264e_stream_amend.h │ │ ├── h265 │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_h265e_api_v2.c │ │ │ ├── hal_h265e_debug.h │ │ │ ├── hal_h265e_stream_amend.c │ │ │ └── hal_h265e_stream_amend.h │ │ ├── hal_bufs.c │ │ ├── hal_bufs.h │ │ ├── hal_info.c │ │ ├── hal_info.h │ │ └── jpeg │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_jpege_api_v2.c │ │ │ ├── hal_jpege_debug.h │ │ │ ├── hal_jpege_hdr.c │ │ │ └── hal_jpege_hdr.h │ ├── dummy │ │ ├── CMakeLists.txt │ │ ├── hal_dummy_dec_api.c │ │ └── hal_dummy_enc_api.c │ ├── hal_task.cpp │ ├── inc │ │ ├── hal_av1d_api.h │ │ ├── hal_avs2d_api.h │ │ ├── hal_avsd_api.h │ │ ├── hal_dec_task.h │ │ ├── hal_dummy_dec_api.h │ │ ├── hal_dummy_enc_api.h │ │ ├── hal_enc_task.h │ │ ├── hal_h263d_api.h │ │ ├── hal_h264d_api.h │ │ ├── hal_h264e_api_v2.h │ │ ├── hal_h265d_api.h │ │ ├── hal_h265e_api_v2.h │ │ ├── hal_jpegd_api.h │ │ ├── hal_jpege_api_v2.h │ │ ├── hal_m2vd_api.h │ │ ├── hal_mpg4d_api.h │ │ ├── hal_task.h │ │ ├── hal_vp8d_api.h │ │ ├── hal_vp8e_api_v2.h │ │ ├── hal_vp9d_api.h │ │ ├── mpp_enc_hal.h │ │ └── mpp_hal.h │ ├── mpp_enc_hal.cpp │ ├── mpp_hal.cpp │ ├── rkdec │ │ ├── CMakeLists.txt │ │ ├── av1d │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_av1d_vdpu383.c │ │ │ └── hal_av1d_vdpu383.h │ │ ├── avs2d │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_avs2d_api.c │ │ │ ├── hal_avs2d_global.h │ │ │ ├── hal_avs2d_rkv.c │ │ │ ├── hal_avs2d_rkv.h │ │ │ ├── hal_avs2d_vdpu382.c │ │ │ ├── hal_avs2d_vdpu382.h │ │ │ ├── hal_avs2d_vdpu383.c │ │ │ └── hal_avs2d_vdpu383.h │ │ ├── avsd │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_avsd_api.c │ │ │ ├── hal_avsd_base.c │ │ │ ├── hal_avsd_base.h │ │ │ ├── hal_avsd_plus.c │ │ │ ├── hal_avsd_plus.h │ │ │ ├── hal_avsd_plus_reg.h │ │ │ ├── hal_avsd_vdpu1.c │ │ │ ├── hal_avsd_vdpu1.h │ │ │ ├── hal_avsd_vdpu1_reg.h │ │ │ ├── hal_avsd_vdpu2.c │ │ │ ├── hal_avsd_vdpu2.h │ │ │ └── hal_avsd_vdpu2_reg.h │ │ ├── h264d │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_h264d_api.c │ │ │ ├── hal_h264d_global.h │ │ │ ├── hal_h264d_rkv_reg.c │ │ │ ├── hal_h264d_rkv_reg.h │ │ │ ├── hal_h264d_vdpu1.c │ │ │ ├── hal_h264d_vdpu1.h │ │ │ ├── hal_h264d_vdpu1_reg.h │ │ │ ├── hal_h264d_vdpu2.c │ │ │ ├── hal_h264d_vdpu2.h │ │ │ ├── hal_h264d_vdpu2_reg.h │ │ │ ├── hal_h264d_vdpu34x.c │ │ │ ├── hal_h264d_vdpu34x.h │ │ │ ├── hal_h264d_vdpu382.c │ │ │ ├── hal_h264d_vdpu382.h │ │ │ ├── hal_h264d_vdpu383.c │ │ │ ├── hal_h264d_vdpu383.h │ │ │ ├── hal_h264d_vdpu384a.c │ │ │ ├── hal_h264d_vdpu384a.h │ │ │ ├── hal_h264d_vdpu_com.c │ │ │ └── hal_h264d_vdpu_com.h │ │ ├── h265d │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_h265d_api.c │ │ │ ├── hal_h265d_com.c │ │ │ ├── hal_h265d_com.h │ │ │ ├── hal_h265d_ctx.h │ │ │ ├── hal_h265d_debug.h │ │ │ ├── hal_h265d_rkv.c │ │ │ ├── hal_h265d_rkv.h │ │ │ ├── hal_h265d_rkv_reg.h │ │ │ ├── hal_h265d_vdpu34x.c │ │ │ ├── hal_h265d_vdpu34x.h │ │ │ ├── hal_h265d_vdpu382.c │ │ │ ├── hal_h265d_vdpu382.h │ │ │ ├── hal_h265d_vdpu383.c │ │ │ ├── hal_h265d_vdpu383.h │ │ │ ├── hal_h265d_vdpu384a.c │ │ │ └── hal_h265d_vdpu384a.h │ │ ├── inc │ │ │ ├── vdpu34x.h │ │ │ ├── vdpu34x_avs2d.h │ │ │ ├── vdpu34x_com.h │ │ │ ├── vdpu34x_h264d.h │ │ │ ├── vdpu34x_h265d.h │ │ │ ├── vdpu34x_vp9d.h │ │ │ ├── vdpu382.h │ │ │ ├── vdpu382_avs2d.h │ │ │ ├── vdpu382_com.h │ │ │ ├── vdpu382_h264d.h │ │ │ ├── vdpu382_h265d.h │ │ │ ├── vdpu382_vp9d.h │ │ │ ├── vdpu383.h │ │ │ ├── vdpu383_av1d.h │ │ │ ├── vdpu383_avs2d.h │ │ │ ├── vdpu383_com.h │ │ │ ├── vdpu383_h264d.h │ │ │ ├── vdpu383_h265d.h │ │ │ ├── vdpu383_vp9d.h │ │ │ ├── vdpu384a.h │ │ │ ├── vdpu384a_com.h │ │ │ ├── vdpu384a_h264d.h │ │ │ └── vdpu384a_h265d.h │ │ ├── vdpu34x_com.c │ │ ├── vdpu382_com.c │ │ ├── vdpu383_com.c │ │ ├── vdpu384a_com.c │ │ └── vp9d │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_vp9d_api.c │ │ │ ├── hal_vp9d_com.c │ │ │ ├── hal_vp9d_com.h │ │ │ ├── hal_vp9d_ctx.h │ │ │ ├── hal_vp9d_debug.h │ │ │ ├── hal_vp9d_rkv.c │ │ │ ├── hal_vp9d_rkv.h │ │ │ ├── hal_vp9d_rkv_reg.h │ │ │ ├── hal_vp9d_vdpu34x.c │ │ │ ├── hal_vp9d_vdpu34x.h │ │ │ ├── hal_vp9d_vdpu382.c │ │ │ ├── hal_vp9d_vdpu382.h │ │ │ ├── hal_vp9d_vdpu383.c │ │ │ └── hal_vp9d_vdpu383.h │ ├── rkenc │ │ ├── CMakeLists.txt │ │ ├── common │ │ │ ├── CMakeLists.txt │ │ │ ├── rkv_enc_def.h │ │ │ ├── vepu510_common.c │ │ │ ├── vepu510_common.h │ │ │ ├── vepu511_common.c │ │ │ ├── vepu511_common.h │ │ │ ├── vepu540c_common.c │ │ │ ├── vepu540c_common.h │ │ │ ├── vepu541_common.c │ │ │ ├── vepu541_common.h │ │ │ ├── vepu580_tune.c │ │ │ ├── vepu580_tune.h │ │ │ ├── vepu5xx.h │ │ │ ├── vepu5xx_common.c │ │ │ └── vepu5xx_common.h │ │ ├── h264e │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_h264e_vepu510.c │ │ │ ├── hal_h264e_vepu510.h │ │ │ ├── hal_h264e_vepu510_reg.h │ │ │ ├── hal_h264e_vepu510_tune.c │ │ │ ├── hal_h264e_vepu511.c │ │ │ ├── hal_h264e_vepu511.h │ │ │ ├── hal_h264e_vepu511_reg.h │ │ │ ├── hal_h264e_vepu540c.c │ │ │ ├── hal_h264e_vepu540c.h │ │ │ ├── hal_h264e_vepu540c_reg.h │ │ │ ├── hal_h264e_vepu541.c │ │ │ ├── hal_h264e_vepu541.h │ │ │ ├── hal_h264e_vepu541_reg.h │ │ │ ├── hal_h264e_vepu541_reg_l2.h │ │ │ ├── hal_h264e_vepu580.c │ │ │ ├── hal_h264e_vepu580.h │ │ │ ├── hal_h264e_vepu580_reg.h │ │ │ └── hal_h264e_vepu580_tune.c │ │ ├── h265e │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_h265e_vepu510.c │ │ │ ├── hal_h265e_vepu510.h │ │ │ ├── hal_h265e_vepu510_reg.h │ │ │ ├── hal_h265e_vepu510_tune.c │ │ │ ├── hal_h265e_vepu511.c │ │ │ ├── hal_h265e_vepu511.h │ │ │ ├── hal_h265e_vepu511_reg.h │ │ │ ├── hal_h265e_vepu540c.c │ │ │ ├── hal_h265e_vepu540c.h │ │ │ ├── hal_h265e_vepu540c_reg.h │ │ │ ├── hal_h265e_vepu541.c │ │ │ ├── hal_h265e_vepu541.h │ │ │ ├── hal_h265e_vepu541_reg.h │ │ │ ├── hal_h265e_vepu54x_reg_l2.h │ │ │ ├── hal_h265e_vepu580.c │ │ │ ├── hal_h265e_vepu580.h │ │ │ ├── hal_h265e_vepu580_reg.h │ │ │ └── hal_h265e_vepu580_tune.c │ │ └── jpege │ │ │ ├── CMakeLists.txt │ │ │ ├── hal_jpege_vepu511.c │ │ │ ├── hal_jpege_vepu511.h │ │ │ ├── hal_jpege_vepu511_reg.h │ │ │ ├── hal_jpege_vepu540c.c │ │ │ ├── hal_jpege_vepu540c.h │ │ │ ├── hal_jpege_vepu540c_reg.h │ │ │ ├── hal_jpege_vpu720.c │ │ │ ├── hal_jpege_vpu720.h │ │ │ └── hal_jpege_vpu720_reg.h │ └── vpu │ │ ├── CMakeLists.txt │ │ ├── av1d │ │ ├── CMakeLists.txt │ │ ├── hal_av1d_vdpu.c │ │ ├── hal_av1d_vdpu.h │ │ └── hal_av1d_vdpu_reg.h │ │ ├── common │ │ ├── CMakeLists.txt │ │ ├── vepu_common.c │ │ └── vepu_common.h │ │ ├── h263d │ │ ├── CMakeLists.txt │ │ ├── hal_h263d_api.c │ │ ├── hal_h263d_base.h │ │ ├── hal_h263d_vdpu1.c │ │ ├── hal_h263d_vdpu1.h │ │ ├── hal_h263d_vdpu1_reg.h │ │ ├── hal_h263d_vdpu2.c │ │ ├── hal_h263d_vdpu2.h │ │ └── hal_h263d_vdpu2_reg.h │ │ ├── h264e │ │ ├── CMakeLists.txt │ │ ├── hal_h264e_vepu1_reg_tbl.h │ │ ├── hal_h264e_vepu1_v2.c │ │ ├── hal_h264e_vepu1_v2.h │ │ ├── hal_h264e_vepu2_reg_tbl.h │ │ ├── hal_h264e_vepu2_v2.c │ │ ├── hal_h264e_vepu2_v2.h │ │ ├── hal_h264e_vepu_v2.c │ │ ├── hal_h264e_vepu_v2.h │ │ ├── hal_h264e_vpu_tbl.c │ │ ├── hal_h264e_vpu_tbl.h │ │ └── hal_h264e_vpu_tbl_v2.h │ │ ├── jpegd │ │ ├── CMakeLists.txt │ │ ├── hal_jpegd_api.c │ │ ├── hal_jpegd_base.h │ │ ├── hal_jpegd_common.c │ │ ├── hal_jpegd_common.h │ │ ├── hal_jpegd_rkv.c │ │ ├── hal_jpegd_rkv.h │ │ ├── hal_jpegd_rkv_reg.h │ │ ├── hal_jpegd_vdpu1.c │ │ ├── hal_jpegd_vdpu1.h │ │ ├── hal_jpegd_vdpu1_reg.h │ │ ├── hal_jpegd_vdpu2.c │ │ ├── hal_jpegd_vdpu2.h │ │ └── hal_jpegd_vdpu2_reg.h │ │ ├── jpege │ │ ├── CMakeLists.txt │ │ ├── hal_jpege_base.c │ │ ├── hal_jpege_base.h │ │ ├── hal_jpege_vepu1_v2.c │ │ ├── hal_jpege_vepu1_v2.h │ │ ├── hal_jpege_vepu2_v2.c │ │ └── hal_jpege_vepu2_v2.h │ │ ├── m2vd │ │ ├── CMakeLists.txt │ │ ├── hal_m2vd_api.c │ │ ├── hal_m2vd_base.h │ │ ├── hal_m2vd_vdpu1.c │ │ ├── hal_m2vd_vdpu1_reg.h │ │ ├── hal_m2vd_vdpu2.c │ │ ├── hal_m2vd_vdpu2_reg.h │ │ ├── hal_m2vd_vpu1.h │ │ └── hal_m2vd_vpu2.h │ │ ├── mpg4d │ │ ├── CMakeLists.txt │ │ ├── hal_m4vd_api.c │ │ ├── hal_m4vd_com.c │ │ ├── hal_m4vd_com.h │ │ ├── hal_m4vd_vdpu1.c │ │ ├── hal_m4vd_vdpu1.h │ │ ├── hal_m4vd_vdpu1_reg.h │ │ ├── hal_m4vd_vdpu2.c │ │ ├── hal_m4vd_vdpu2.h │ │ └── hal_m4vd_vdpu2_reg.h │ │ ├── vp8d │ │ ├── CMakeLists.txt │ │ ├── hal_vp8d_api.c │ │ ├── hal_vp8d_base.h │ │ ├── hal_vp8d_vdpu1.c │ │ ├── hal_vp8d_vdpu1.h │ │ ├── hal_vp8d_vdpu1_reg.h │ │ ├── hal_vp8d_vdpu2.c │ │ ├── hal_vp8d_vdpu2.h │ │ └── hal_vp8d_vdpu2_reg.h │ │ └── vp8e │ │ ├── CMakeLists.txt │ │ ├── hal_vp8e_api_v2.c │ │ ├── hal_vp8e_base.c │ │ ├── hal_vp8e_base.h │ │ ├── hal_vp8e_debug.h │ │ ├── hal_vp8e_entropy.c │ │ ├── hal_vp8e_entropy.h │ │ ├── hal_vp8e_putbit.c │ │ ├── hal_vp8e_putbit.h │ │ ├── hal_vp8e_table.c │ │ ├── hal_vp8e_table.h │ │ ├── hal_vp8e_vepu1_reg.h │ │ ├── hal_vp8e_vepu1_v2.c │ │ ├── hal_vp8e_vepu1_v2.h │ │ ├── hal_vp8e_vepu2_reg.h │ │ ├── hal_vp8e_vepu2_v2.c │ │ └── hal_vp8e_vepu2_v2.h ├── inc │ ├── mpi_impl.h │ ├── mpp.h │ ├── mpp_cfg.h │ ├── mpp_dec_cfg.h │ ├── mpp_enc_cfg.h │ ├── mpp_impl.h │ ├── mpp_info.h │ └── mpp_internal.h ├── legacy │ ├── CMakeLists.txt │ ├── ppOp.cpp │ ├── ppOp.h │ ├── rk_list.cpp │ ├── rk_list.h │ ├── vpu.c │ ├── vpu_api.cpp │ ├── vpu_api_legacy.cpp │ ├── vpu_api_legacy.h │ ├── vpu_api_mlvec.cpp │ ├── vpu_api_mlvec.h │ ├── vpu_mem_legacy.c │ └── vpu_mem_legacy.h ├── mpi.cpp ├── mpp.cpp ├── mpp_impl.cpp ├── mpp_info.cpp ├── vproc.cmake └── vproc │ ├── CMakeLists.txt │ ├── iep │ ├── CMakeLists.txt │ ├── iep.cpp │ ├── iep.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── iep_dei.cfg │ │ └── iep_test.cpp │ ├── iep2 │ ├── CMakeLists.txt │ ├── iep2.c │ ├── iep2.h │ ├── iep2_ff.c │ ├── iep2_ff.h │ ├── iep2_gmv.c │ ├── iep2_gmv.h │ ├── iep2_osd.c │ ├── iep2_osd.h │ ├── iep2_pd.c │ ├── iep2_pd.h │ ├── iep2_roi.c │ ├── iep2_roi.h │ └── test │ │ ├── CMakeLists.txt │ │ └── iep2_test.c │ ├── inc │ ├── hwpq_vdpp_proc_api.h │ ├── iep2_api.h │ ├── iep_api.h │ ├── iep_common.h │ ├── mpp_dec_vproc.h │ ├── rga_api.h │ └── vdpp_api.h │ ├── mpp_dec_vproc.cpp │ ├── mpp_vproc_dev.cpp │ ├── rga │ ├── CMakeLists.txt │ ├── rga.cpp │ ├── rga.h │ └── test │ │ ├── CMakeLists.txt │ │ └── rga_test.cpp │ └── vdpp │ ├── CMakeLists.txt │ ├── hwpq_debug.h │ ├── hwpq_vdpp_proc.cpp │ ├── test │ ├── CMakeLists.txt │ ├── hwpq_test.cpp │ └── vdpp_test.c │ ├── vdpp.c │ ├── vdpp.h │ ├── vdpp2.c │ ├── vdpp2.h │ ├── vdpp2_reg.h │ ├── vdpp_api.c │ ├── vdpp_common.c │ ├── vdpp_common.h │ └── vdpp_reg.h ├── osal ├── CMakeLists.txt ├── allocator │ ├── allocator_dma_heap.c │ ├── allocator_dma_heap.h │ ├── allocator_drm.c │ ├── allocator_drm.h │ ├── allocator_ext_dma.c │ ├── allocator_ext_dma.h │ ├── allocator_ion.c │ ├── allocator_ion.h │ ├── allocator_std.c │ ├── allocator_std.h │ └── ion.h ├── android │ ├── os_env.c │ ├── os_log.c │ └── os_mem.c ├── driver │ ├── inc │ │ ├── mpp_device_debug.h │ │ ├── mpp_service_impl.h │ │ └── mpp_vcodec_client.h │ ├── mpp_device.c │ ├── mpp_server.cpp │ ├── mpp_service.c │ ├── mpp_vcodec_client.c │ └── vcodec_service.c ├── inc │ ├── mpp_allocator.h │ ├── mpp_callback.h │ ├── mpp_common.h │ ├── mpp_compat_impl.h │ ├── mpp_debug.h │ ├── mpp_dev_defs.h │ ├── mpp_device.h │ ├── mpp_dmabuf.h │ ├── mpp_env.h │ ├── mpp_eventfd.h │ ├── mpp_hash.h │ ├── mpp_list.h │ ├── mpp_lock.h │ ├── mpp_mem.h │ ├── mpp_mem_pool.h │ ├── mpp_platform.h │ ├── mpp_queue.h │ ├── mpp_runtime.h │ ├── mpp_server.h │ ├── mpp_service.h │ ├── mpp_service_api.h │ ├── mpp_singleton.h │ ├── mpp_soc.h │ ├── mpp_thread.h │ ├── mpp_time.h │ ├── mpp_trace.h │ ├── osal_2str.h │ ├── vcodec_service.h │ └── vcodec_service_api.h ├── linux │ ├── dma-buf.h │ ├── drm.h │ ├── drm_mode.h │ ├── os_env.c │ ├── os_log.cpp │ └── os_mem.c ├── mpp_allocator.cpp ├── mpp_allocator_api.h ├── mpp_callback.cpp ├── mpp_common.cpp ├── mpp_compat.cpp ├── mpp_dmabuf.cpp ├── mpp_env.cpp ├── mpp_eventfd.cpp ├── mpp_list.cpp ├── mpp_lock.cpp ├── mpp_log.cpp ├── mpp_mem.cpp ├── mpp_mem_pool.cpp ├── mpp_platform.cpp ├── mpp_queue.cpp ├── mpp_runtime.cpp ├── mpp_singleton.c ├── mpp_soc.cpp ├── mpp_thread.cpp ├── mpp_time.cpp ├── mpp_trace.cpp ├── os_env.h ├── os_log.h ├── os_mem.h ├── osal_2str.c ├── test │ ├── CMakeLists.txt │ ├── mpp_dmabuf_test.c │ ├── mpp_env_test.c │ ├── mpp_eventfd_test.c │ ├── mpp_log_test.c │ ├── mpp_mem_pool_test.c │ ├── mpp_mem_test.c │ ├── mpp_platform_test.c │ ├── mpp_runtime_test.c │ ├── mpp_thread_test.c │ ├── mpp_time_test.c │ └── mpp_trace_test.c └── windows │ ├── os_env.c │ ├── os_log.c │ ├── os_mem.c │ ├── pthread │ ├── dll │ │ ├── x64 │ │ │ ├── pthreadGC2.dll │ │ │ └── pthreadVC2.dll │ │ └── x86 │ │ │ ├── pthreadGC2.dll │ │ │ ├── pthreadGCE2.dll │ │ │ ├── pthreadVC2.dll │ │ │ ├── pthreadVCE2.dll │ │ │ └── pthreadVSE2.dll │ ├── inc │ │ ├── pthread.h │ │ ├── sched.h │ │ └── semaphore.h │ └── lib │ │ ├── x64 │ │ └── pthreadVC2.lib │ │ └── x86 │ │ ├── pthreadVC2.lib │ │ ├── pthreadVCE2.lib │ │ └── pthreadVSE2.lib │ └── stdint.h ├── pkgconfig ├── rockchip_mpp.pc.cmake └── rockchip_vpu.pc.cmake ├── readme.txt ├── test ├── CMakeLists.txt ├── README.md ├── mpi_dec_mt_test.c ├── mpi_dec_multi_test.c ├── mpi_dec_nt_test.c ├── mpi_dec_test.c ├── mpi_enc_mt_test.cpp ├── mpi_enc_test.c ├── mpi_rc.cfg ├── mpi_rc2_test.c ├── mpp_event_trigger.c ├── mpp_event_trigger.h ├── mpp_info_test.c ├── mpp_parse_cfg.c ├── mpp_parse_cfg.h └── vpu_api_test.c ├── tools ├── AStyle.exe ├── TextEncoding.exe ├── astyle ├── astylerc ├── changelog.sh ├── hooks │ └── pre-commit ├── mpp_astyle.bat ├── mpp_astyle.sh ├── mpp_doxyfile ├── resolution_test.sh └── yuvplay └── utils ├── CMakeLists.txt ├── camera_source.c ├── camera_source.h ├── dictionary.c ├── dictionary.h ├── iniparser.c ├── iniparser.h ├── mpi_dec_utils.c ├── mpi_dec_utils.h ├── mpi_enc_utils.c ├── mpi_enc_utils.h ├── mpp_enc_roi_utils.c ├── mpp_enc_roi_utils.h ├── mpp_opt.c ├── mpp_opt.h ├── utils.c └── utils.h /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # cache files 3 | # 4 | *~ 5 | *.swp 6 | *.gc?? 7 | 8 | # 9 | # gnu global files 10 | # 11 | GPATH 12 | GRTAGS 13 | GSYMS 14 | GTAGS 15 | ID 16 | 17 | # 18 | # GNU Autotools 19 | # 20 | aclocal.m4 21 | autom4te.cache 22 | config.h 23 | config.h.in 24 | config.h-new 25 | config.log 26 | config.status 27 | config.guess 28 | config.sub 29 | config.rpath 30 | configure 31 | libtool 32 | stamp-h 33 | stamp-h.in 34 | stamp-h1 35 | ltmain.sh 36 | missing 37 | mkinstalldirs 38 | compile 39 | install-sh 40 | depcomp 41 | autoregen.sh 42 | ABOUT-NLS 43 | /INSTALL 44 | _stdint.h 45 | .dirstamp 46 | /m4 47 | .deps 48 | .libs 49 | *.lo 50 | *.la 51 | *.o 52 | Makefile.in 53 | Makefile 54 | /m4 55 | tmp-orc.c 56 | *orc.h 57 | 58 | # 59 | # VS 60 | # 61 | Build 62 | *.user 63 | *.suo 64 | *.ipch 65 | *.sdf 66 | *.opensdf 67 | *.DS_Store 68 | 69 | /test-driver 70 | *.log 71 | *.trs 72 | 73 | /subprojects 74 | 75 | # 76 | # Building cache 77 | # 78 | /build 79 | /mpp/version.h 80 | 81 | # 82 | # Debian 83 | # 84 | /obj-arm-linux-gnueabihf/ 85 | /obj-aarch64-linux-gnu/ 86 | 87 | # 88 | # VSCode 89 | # 90 | .vscode/ 91 | .code-workspace 92 | -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- 1 | !*.bash 2 | !*.sh 3 | -------------------------------------------------------------------------------- /build/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := libvpu 5 | LOCAL_MODULE_TAGS := optional 6 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 7 | LOCAL_MODULE_STEM := $(LOCAL_MODULE) 8 | LOCAL_MODULE_SUFFIX := .so 9 | LOCAL_SRC_FILES := $(TOP)/mpp/legacy/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) 10 | include $(BUILD_PREBUILT) 11 | 12 | include $(CLEAR_VARS) 13 | LOCAL_MODULE := libmpp 14 | LOCAL_MODULE_TAGS := optional 15 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 16 | LOCAL_MODULE_STEM := $(LOCAL_MODULE) 17 | LOCAL_MODULE_SUFFIX := .so 18 | LOCAL_SRC_FILES := $(TOP)/mpp/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) 19 | include $(BUILD_PREBUILT) 20 | 21 | -------------------------------------------------------------------------------- /build/android/aarch64/fix/libc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/build/android/aarch64/fix/libc.so -------------------------------------------------------------------------------- /build/android/aarch64/fix/readme.txt: -------------------------------------------------------------------------------- 1 | NOTE: Google original ndk libc.so is lack of some symbol and it will cause error 2 | as follows: 3 | 4 | undefined reference to `__system_property_get' 5 | 6 | Please use the libc.so in this directory to fix this issue. 7 | 8 | Backup original libc.so in ndk first. Then Put lib.so to: 9 | path_to_ndk/platforms/android-21/arch-arm64/usr/lib/ 10 | -------------------------------------------------------------------------------- /build/android/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | adb root 3 | adb remount 4 | 5 | #BASE_PATH=/system 6 | BASE_PATH=/vendor 7 | #BASE_PATH=/oem/usr 8 | 9 | BIN_PATH=${BASE_PATH}/bin/ 10 | LIB_PATH=${BASE_PATH}/lib/ 11 | 12 | push_file() { 13 | if [ -f $1 ]; then 14 | adb push $1 $2 15 | fi 16 | } 17 | 18 | push_file ./mpp/libmpp.so ${LIB_PATH} 19 | push_file ./mpp/legacy/libvpu.so ${LIB_PATH} 20 | push_file ./test/mpi_dec_test ${BIN_PATH} 21 | push_file ./test/mpi_enc_test ${BIN_PATH} 22 | push_file ./test/vpu_api_test ${BIN_PATH} 23 | push_file ./test/mpp_info_test ${BIN_PATH} 24 | -------------------------------------------------------------------------------- /build/linux/aarch64/arm.linux.cross.cmake: -------------------------------------------------------------------------------- 1 | SET(CMAKE_SYSTEM_NAME Linux) 2 | SET(CMAKE_C_COMPILER "${TOOLCHAIN}gcc") 3 | SET(CMAKE_CXX_COMPILER "${TOOLCHAIN}g++") 4 | SET(CMAKE_SYSTEM_PROCESSOR "armv8-a") 5 | 6 | add_definitions(-fPIC) 7 | add_definitions(-DARMLINUX) 8 | add_definitions(-Dlinux) 9 | -------------------------------------------------------------------------------- /build/linux/arm/arm.linux.cross.cmake: -------------------------------------------------------------------------------- 1 | SET(CMAKE_SYSTEM_NAME Linux) 2 | SET(CMAKE_C_COMPILER "${TOOLCHAIN}gcc") 3 | SET(CMAKE_CXX_COMPILER "${TOOLCHAIN}g++") 4 | SET(CMAKE_SYSTEM_PROCESSOR "armv7-a") 5 | #SET(CMAKE_SYSTEM_PROCESSOR "armv7-a_hardfp") 6 | 7 | add_definitions(-fPIC) 8 | add_definitions(-DARMLINUX) 9 | add_definitions(-Dlinux) 10 | -------------------------------------------------------------------------------- /build/linux/x86/sofia-3gr/make-Makefiles.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Run this from within a bash shell 3 | cmake -G "Unix Makefiles" \ 4 | -DCMAKE_TOOLCHAIN_FILE=./sofia-3gr.linux.cross.cmake \ 5 | -DRKPLATFORM=ON \ 6 | ../../../../ && ccmake ../../../../ 7 | -------------------------------------------------------------------------------- /build/linux/x86/sofia-3gr/sofia-3gr.linux.cross.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 2.6.3 ) 2 | 3 | SET(CMAKE_SYSTEM_NAME Linux) 4 | add_definitions(-fPIC) 5 | add_definitions(-DSOFIA_3GR_LINUX) 6 | include_directories(osal) 7 | -------------------------------------------------------------------------------- /build/linux/x86_64/make-Makefiles.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Run this from within a bash shell 3 | # x86_64 is for simulation do not enable RK platform 4 | 5 | set +e 6 | 7 | cmake -G "Unix Makefiles" \ 8 | -DCMAKE_BUILD_TYPE=debug \ 9 | -DRKPLATFORM=OFF \ 10 | ../../../ 11 | 12 | cmake --build . -j 13 | -------------------------------------------------------------------------------- /build/vc10-x86_64/build-all.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%VS100COMNTOOLS%" == "" ( 3 | msg "%username%" "Visual Studio 12 not detected" 4 | exit 1 5 | ) 6 | if not exist rk_mpp.sln ( 7 | call make-solutions.bat 8 | ) 9 | if exist rk_mpp.sln ( 10 | call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" 11 | rem MSBuild /property:Configuration="Release" rk_mpp.sln 12 | MSBuild /property:Configuration="Debug" rk_mpp.sln 13 | rem MSBuild /property:Configuration="RelWithDebInfo" rk_mpp.sln 14 | ) -------------------------------------------------------------------------------- /build/vc10-x86_64/make-solutions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: 3 | :: run this batch file to create a Visual Studio solution file for this project. 4 | :: See the cmake documentation for other generator targets 5 | :: 6 | cmake -G "Visual Studio 10 Win64" ../../ && cmake-gui ../../ 7 | 8 | ::pause on 9 | -------------------------------------------------------------------------------- /build/vc12-x86_64/build-all.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%VS120COMNTOOLS%" == "" ( 3 | msg "%username%" "Visual Studio 12 not detected" 4 | exit 1 5 | ) 6 | if not exist rk_mpp.sln ( 7 | call make-solutions.bat 8 | ) 9 | if exist rk_mpp.sln ( 10 | call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" 11 | rem MSBuild /property:Configuration="Release" rk_mpp.sln 12 | MSBuild /property:Configuration="Debug" rk_mpp.sln 13 | rem MSBuild /property:Configuration="RelWithDebInfo" rk_mpp.sln 14 | ) -------------------------------------------------------------------------------- /build/vc12-x86_64/make-solutions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: 3 | :: run this batch file to create a Visual Studio solution file for this project. 4 | :: See the cmake documentation for other generator targets 5 | :: 6 | cmake -G "Visual Studio 12 Win64" ../../ && cmake-gui ../../ 7 | 8 | ::pause on 9 | -------------------------------------------------------------------------------- /debian/.gitignore: -------------------------------------------------------------------------------- 1 | /.debhelper/ 2 | /debhelper-build-stamp 3 | /files 4 | /librockchip-mpp-dev.substvars 5 | /librockchip-mpp-dev/ 6 | /librockchip-mpp-static.substvars 7 | /librockchip-mpp-static/ 8 | /librockchip-mpp1.substvars 9 | /librockchip-mpp1/ 10 | /rockchip-mpp-demos.substvars 11 | /rockchip-mpp-demos/ 12 | /librockchip-vpu0.substvars 13 | /librockchip-vpu0/ 14 | /tmp/ 15 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | mpp for Debian 2 | -------------- 3 | 4 | 5 | 6 | -- Randy Li Wed, 03 Aug 2016 08:14:14 +0000 7 | -------------------------------------------------------------------------------- /debian/README.source: -------------------------------------------------------------------------------- 1 | mpp for Debian 2 | -------------- 3 | 4 | 6 | 7 | 8 | 9 | -- Randy Li Wed, 03 Aug 2016 08:14:14 +0000 10 | 11 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: mpp 2 | Priority: optional 3 | Maintainer: Randy Li 4 | Build-Depends: debhelper (>= 10), cmake, dh-exec 5 | Standards-Version: 3.9.5 6 | Section: libs 7 | Homepage: http://www.rock-chips.com 8 | #Vcs-Git: git://anonscm.debian.org/collab-maint/mpp.git 9 | #Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/mpp.git;a=summary 10 | 11 | Package: librockchip-mpp-dev 12 | Section: libdevel 13 | Architecture: any 14 | Depends: librockchip-mpp1 (= ${binary:Version}), ${misc:Depends} 15 | Description: Media Process Platform 16 | 17 | Package: librockchip-mpp1 18 | Architecture: any 19 | Depends: ${shlibs:Depends}, ${misc:Depends} 20 | Description: Media Process Platform 21 | 22 | Package: librockchip-vpu0 23 | Architecture: any 24 | Depends: ${shlibs:Depends}, ${misc:Depends} 25 | Description: Media Process Platform 26 | 27 | Package: rockchip-mpp-demos 28 | Architecture: any 29 | Depends: librockchip-mpp1 (= ${binary:Version}), librockchip-vpu0 (= ${binary:Version}), ${misc:Depends} 30 | Description: Media Process Platform Demos 31 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | readme.txt 2 | readme.txt 3 | -------------------------------------------------------------------------------- /debian/librockchip-mpp-dev.install: -------------------------------------------------------------------------------- 1 | #! /usr/bin/dh-exec 2 | usr/include/* 3 | usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/* 4 | -------------------------------------------------------------------------------- /debian/librockchip-mpp1.install: -------------------------------------------------------------------------------- 1 | #! /usr/bin/dh-exec 2 | usr/lib/${DEB_HOST_MULTIARCH}/librockchip_mpp.so 3 | usr/lib/${DEB_HOST_MULTIARCH}/librockchip_mpp.so.* 4 | -------------------------------------------------------------------------------- /debian/librockchip-vpu0.install: -------------------------------------------------------------------------------- 1 | #! /usr/bin/dh-exec 2 | usr/lib/${DEB_HOST_MULTIARCH}/librockchip_vpu.so 3 | usr/lib/${DEB_HOST_MULTIARCH}/librockchip_vpu.so.* 4 | -------------------------------------------------------------------------------- /debian/rockchip-mpp-demos.install: -------------------------------------------------------------------------------- 1 | #! /usr/bin/dh-exec 2 | usr/bin/* 3 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #DH_VERBOSE = 1 5 | 6 | # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* 7 | DPKG_EXPORT_BUILDFLAGS = 1 8 | include /usr/share/dpkg/default.mk 9 | 10 | # see FEATURE AREAS in dpkg-buildflags(1) 11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all 12 | 13 | # see ENVIRONMENT in dpkg-buildflags(1) 14 | # package maintainers to append CFLAGS 15 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic 16 | # package maintainers to append LDFLAGS 17 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 18 | 19 | ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) 20 | export CMAKE_TOOLCHAIN_FILE=/etc/dpkg-cross/cmake/CMakeCross.txt 21 | endif 22 | 23 | # main packaging script based on dh7 syntax 24 | %: 25 | dh $@ --parallel --buildsystem=cmake 26 | 27 | # debmake generated override targets 28 | # This is example for Cmake (See http://bugs.debian.org/641051 ) 29 | override_dh_auto_configure: 30 | dh_auto_configure -- \ 31 | -DCMAKE_BUILD_TYPE=Release \ 32 | -DARM_MIX_32_64=ON 33 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /doc/media/Figure01_MPP_system_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure01_MPP_system_framework.png -------------------------------------------------------------------------------- /doc/media/Figure02_Data_structure_used_in_MPI_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure02_Data_structure_used_in_MPI_interface.png -------------------------------------------------------------------------------- /doc/media/Figure03_Use_simple_interface_to_realize_video_decoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure03_Use_simple_interface_to_realize_video_decoding.png -------------------------------------------------------------------------------- /doc/media/Figure03_Use_simple_interface_to_realize_video_decoding_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure03_Use_simple_interface_to_realize_video_decoding_EN.png -------------------------------------------------------------------------------- /doc/media/Figure04_Normal_usage_of_MppBuffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure04_Normal_usage_of_MppBuffer.png -------------------------------------------------------------------------------- /doc/media/Figure04_Normal_usage_of_MppBuffer_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure04_Normal_usage_of_MppBuffer_EN.png -------------------------------------------------------------------------------- /doc/media/Figure05_Usage_of_MppBuffer_External_Import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure05_Usage_of_MppBuffer_External_Import.png -------------------------------------------------------------------------------- /doc/media/Figure05_Usage_of_MppBuffer_External_Import_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure05_Usage_of_MppBuffer_External_Import_EN.png -------------------------------------------------------------------------------- /doc/media/Figure06_Important_parameter_description_of_MppPacket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure06_Important_parameter_description_of_MppPacket.png -------------------------------------------------------------------------------- /doc/media/Figure06_Important_parameter_description_of_MppPacket_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure06_Important_parameter_description_of_MppPacket_EN.png -------------------------------------------------------------------------------- /doc/media/Figure07_Important_parameter_description_of_MppFrame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure07_Important_parameter_description_of_MppFrame.png -------------------------------------------------------------------------------- /doc/media/Figure07_Important_parameter_description_of_MppFrame_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure07_Important_parameter_description_of_MppFrame_EN.png -------------------------------------------------------------------------------- /doc/media/Figure08_Use_MppTask_for_input_and_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure08_Use_MppTask_for_input_and_output.png -------------------------------------------------------------------------------- /doc/media/Figure08_Use_MppTask_for_input_and_output_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure08_Use_MppTask_for_input_and_output_EN.png -------------------------------------------------------------------------------- /doc/media/Figure09_Data_Types_and_Keyword_Types_Supported_by_MppTask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure09_Data_Types_and_Keyword_Types_Supported_by_MppTask.png -------------------------------------------------------------------------------- /doc/media/Figure09_Data_Types_and_Keyword_Types_Supported_by_MppTask_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure09_Data_Types_and_Keyword_Types_Supported_by_MppTask_EN.png -------------------------------------------------------------------------------- /doc/media/Figure10_MppCtx_usage_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure10_MppCtx_usage_process.png -------------------------------------------------------------------------------- /doc/media/Figure11_MPI_interface_range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure11_MPI_interface_range.png -------------------------------------------------------------------------------- /doc/media/Figure12_Decoder_multi_thread_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure12_Decoder_multi_thread_usage.png -------------------------------------------------------------------------------- /doc/media/Figure12_Decoder_multi_thread_usage_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure12_Decoder_multi_thread_usage_EN.png -------------------------------------------------------------------------------- /doc/media/Figure12_Decoder_single_thread_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure12_Decoder_single_thread_usage.png -------------------------------------------------------------------------------- /doc/media/Figure12_Decoder_single_thread_usage_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure12_Decoder_single_thread_usage_EN.png -------------------------------------------------------------------------------- /doc/media/Figure13_Schematic_diagram_of_pure_internal_allocation_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure13_Schematic_diagram_of_pure_internal_allocation_mode.png -------------------------------------------------------------------------------- /doc/media/Figure14_Code_flow_of_decoder_image_memory_pure_internal_allocation_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure14_Code_flow_of_decoder_image_memory_pure_internal_allocation_mode.png -------------------------------------------------------------------------------- /doc/media/Figure15_Semi-internal_allocation_mode_decoder_work_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure15_Semi-internal_allocation_mode_decoder_work_flow.png -------------------------------------------------------------------------------- /doc/media/Figure16_Schematic_diagram_of_pure_external_allocation_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure16_Schematic_diagram_of_pure_external_allocation_mode.png -------------------------------------------------------------------------------- /doc/media/Figure17_Pure_external_allocation_mode_decoder_work_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure17_Pure_external_allocation_mode_decoder_work_flow.png -------------------------------------------------------------------------------- /doc/media/Figure18_Encoder_input_frame_memory_arrangement_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure18_Encoder_input_frame_memory_arrangement_1.png -------------------------------------------------------------------------------- /doc/media/Figure18_Encoder_input_frame_memory_arrangement_1_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure18_Encoder_input_frame_memory_arrangement_1_EN.png -------------------------------------------------------------------------------- /doc/media/Figure18_Encoder_input_frame_memory_arrangement_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure18_Encoder_input_frame_memory_arrangement_2.png -------------------------------------------------------------------------------- /doc/media/Figure18_Encoder_input_frame_memory_arrangement_2_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Figure18_Encoder_input_frame_memory_arrangement_2_EN.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_H264Profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_H264Profile.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MpiCmd_enumeration_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MpiCmd_enumeration_type.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MpiCmd_enumeration_type_related_to_MPP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MpiCmd_enumeration_type_related_to_MPP.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppCodingType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppCodingType.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncMirrorCfg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncMirrorCfg.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcDropFrmMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcDropFrmMode.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcMode.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcPriority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcPriority.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcSuperFrameMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRcSuperFrameMode.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRotationCfg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncRotationCfg.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncSplitMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppEncSplitMode.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppFrameColorRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppFrameColorRange.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppFrameFormat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppFrameFormat.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_by_copy_init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_by_copy_init.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_by_copy_init_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_by_copy_init_EN.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_from_MppBuffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_from_MppBuffer.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_from_MppBuffer_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_MppPacket_is_generated_from_MppBuffer_EN.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_Split_mode_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_Split_mode_config.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_color_space_range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_color_space_range.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_decode_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_decode_log.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_encode_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_encode_log.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_external_malloc_address_is_configured_to_MppPacket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_external_malloc_address_is_configured_to_MppPacket.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_external_malloc_address_is_configured_to_MppPacket_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_external_malloc_address_is_configured_to_MppPacket_EN.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_image_colorspace_format_and_memory_arrangement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_image_colorspace_format_and_memory_arrangement.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_image_data_frame_field_properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_image_data_frame_field_properties.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_print_decode_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_print_decode_help.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_print_encode_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_print_encode_help.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_external_import_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_external_import_usage.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_external_import_usage_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_external_import_usage_EN.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_normal_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_normal_usage.png -------------------------------------------------------------------------------- /doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_normal_usage_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/doc/media/Rockchip_Developer_Guide_MPP/MPP_procedure_pseudo_code_of_normal_usage_EN.png -------------------------------------------------------------------------------- /doc/readme.txt: -------------------------------------------------------------------------------- 1 | Media Process Platform document directory description 2 | 3 | Mpp document is separated into two parts: 4 | 5 | 1. Mpp user guide and user manual for library user 6 | This part contains information about how to use mpp and external study resource 7 | besides source code. 8 | 9 | 2. Mpp design document for developer 10 | This part contains information about design principle, module design and other 11 | information which will benefit developer further understand. 12 | 13 | -------------------------------------------------------------------------------- /kmpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add include directory 5 | # ---------------------------------------------------------------------------- 6 | include_directories(${PROJECT_SOURCE_DIR}/mpp/codec/inc) 7 | include_directories(${PROJECT_SOURCE_DIR}/osal/driver/inc) 8 | 9 | # ---------------------------------------------------------------------------- 10 | # add kmpp base component 11 | # ---------------------------------------------------------------------------- 12 | add_subdirectory(base) 13 | 14 | # ---------------------------------------------------------------------------- 15 | # add kmpp implement 16 | # ---------------------------------------------------------------------------- 17 | set (KMPP_SRC 18 | kmpp.c 19 | ) 20 | 21 | add_library(kmpp OBJECT ${KMPP_SRC}) 22 | set_target_properties(kmpp PROPERTIES FOLDER "kmpp") 23 | 24 | -------------------------------------------------------------------------------- /kmpp/base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add kmpp basic components 5 | # ---------------------------------------------------------------------------- 6 | add_library(kmpp_base OBJECT 7 | kmpp_obj.c 8 | kmpp_frame.c 9 | kmpp_venc_cfg.c 10 | ) 11 | 12 | set_target_properties(kmpp_base PROPERTIES FOLDER "kmpp/base") 13 | 14 | # unit test 15 | add_subdirectory(test) 16 | -------------------------------------------------------------------------------- /kmpp/base/kmpp_frame.c: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2025 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #define MODULE_TAG "kmpp_frame" 7 | 8 | #include "kmpp_frame_impl.h" 9 | 10 | #define KMPP_OBJ_NAME kmpp_frame 11 | #define KMPP_OBJ_INTF_TYPE KmppFrame 12 | #define KMPP_OBJ_IMPL_TYPE KmppFrameImpl 13 | #define KMPP_OBJ_ENTRY_TABLE KMPP_FRAME_ENTRY_TABLE 14 | #define KMPP_OBJ_STRUCT_TABLE KMPP_FRAME_STRUCT_TABLE 15 | #include "kmpp_obj_helper.h" 16 | -------------------------------------------------------------------------------- /kmpp/base/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # kmpp/base built-in unit test case 4 | # ---------------------------------------------------------------------------- 5 | # macro for adding osal sub-module unit test 6 | macro(add_kmpp_base_test module) 7 | set(test_name ${module}_test) 8 | string(TOUPPER ${test_name} test_tag) 9 | #message(STATUS "moduule : ${module}") 10 | #message(STATUS "test_name : ${test_name}") 11 | #message(STATUS "test_tag : ${test_tag}") 12 | 13 | option(${test_tag} "Build base ${module} unit test" ${BUILD_TEST}) 14 | if(${test_tag}) 15 | add_executable(${test_name} ${test_name}.c) 16 | target_link_libraries(${test_name} ${MPP_SHARED}) 17 | set_target_properties(${test_name} PROPERTIES FOLDER "osal/test") 18 | add_test(NAME ${test_name} COMMAND ${test_name}) 19 | endif() 20 | endmacro() 21 | 22 | # kmpp object unit test 23 | add_kmpp_base_test(kmpp_obj) 24 | 25 | # kmpp frame unit test 26 | add_kmpp_base_test(kmpp_frame) 27 | -------------------------------------------------------------------------------- /merge_static_lib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd $1 4 | rm -rf mpp/lib'$2$'.a 5 | 6 | SCRIPT=$'CREATE mpp/lib'$2$'.a\n' 7 | SCRIPT=$SCRIPT$(find . -name '*.a' -exec echo 'ADDLIB {}' \;) 8 | SCRIPT=$SCRIPT$'\nSAVE\nEND\n' 9 | 10 | ar -M <<< $SCRIPT -------------------------------------------------------------------------------- /mpp/base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add mpp basic components 5 | # ---------------------------------------------------------------------------- 6 | add_library(mpp_base OBJECT 7 | mpp_enc_refs.cpp 8 | mpp_enc_ref.cpp 9 | mpp_enc_cfg.cpp 10 | mpp_dec_cfg.cpp 11 | mpp_sys_cfg.cpp 12 | mpp_sys_cfg_st.cpp 13 | mpp_cluster.cpp 14 | mpp_buf_slot.cpp 15 | mpp_buffer_impl.cpp 16 | mpp_buffer.cpp 17 | mpp_packet.cpp 18 | mpp_frame.cpp 19 | mpp_task_impl.cpp 20 | mpp_task.cpp 21 | mpp_meta.cpp 22 | mpp_trie.c 23 | mpp_bitwrite.c 24 | mpp_bitread.c 25 | mpp_bitput.c 26 | mpp_cfg_io.c 27 | mpp_cfg.cpp 28 | mpp_2str.c 29 | mpp_dec_hdr_meta.c 30 | ) 31 | 32 | set_target_properties(mpp_base PROPERTIES FOLDER "mpp/base") 33 | 34 | #target_link_libraries(mpp_base osal) 35 | 36 | # unit test 37 | add_subdirectory(test) 38 | -------------------------------------------------------------------------------- /mpp/base/inc/mpp_enc_cfg_impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_ENC_CFG_IMPL_H__ 18 | #define __MPP_ENC_CFG_IMPL_H__ 19 | 20 | #include "mpp_enc_cfg.h" 21 | 22 | extern RK_U8 uuid_refresh_cfg[16]; 23 | 24 | typedef struct MppEncCfgImpl_t { 25 | RK_S32 size; 26 | MppEncCfgSet cfg; 27 | } MppEncCfgImpl; 28 | 29 | #endif /*__MPP_ENC_CFG_IMPL_H__*/ 30 | -------------------------------------------------------------------------------- /mpp/codec/dec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | add_subdirectory(dummy) 4 | 5 | add_subdirectory(common) 6 | 7 | if( HAVE_AVSD ) 8 | add_subdirectory(avs) 9 | endif() 10 | 11 | if( HAVE_AVS2D ) 12 | add_subdirectory(avs2) 13 | endif() 14 | 15 | if( HAVE_H263D ) 16 | add_subdirectory(h263) 17 | endif() 18 | 19 | if( HAVE_H264D ) 20 | add_subdirectory(h264) 21 | endif() 22 | 23 | if( HAVE_H265D ) 24 | add_subdirectory(h265) 25 | endif() 26 | 27 | if( HAVE_MPEG2D ) 28 | add_subdirectory(m2v) 29 | endif() 30 | 31 | if( HAVE_MPEG4D ) 32 | add_subdirectory(mpg4) 33 | endif() 34 | 35 | if( HAVE_VP8D ) 36 | add_subdirectory(vp8) 37 | endif() 38 | 39 | if( HAVE_VP9D ) 40 | add_subdirectory(vp9) 41 | endif() 42 | 43 | if( HAVE_JPEGD ) 44 | add_subdirectory(jpeg) 45 | endif() 46 | 47 | if( HAVE_AV1D ) 48 | add_subdirectory(av1) 49 | endif() 50 | -------------------------------------------------------------------------------- /mpp/codec/dec/av1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # av1 decoder api 5 | set(AV1_D_API 6 | ../../inc/av1d_api.h 7 | ) 8 | 9 | # AV1 decoder header 10 | set(AV1D_HDR 11 | ) 12 | 13 | # av1 decoder sourse 14 | set(AV1D_SRC 15 | av1d_api.c 16 | av1d_parser.c 17 | av1d_parser2_syntax.c 18 | av1d_cbs.c 19 | av1d_probs.c 20 | av1_entropymode.c 21 | ) 22 | 23 | add_library(${CODEC_AV1D} STATIC 24 | ${AV1D_API} 25 | ${AV1D_HDR} 26 | ${AV1D_SRC} 27 | ) 28 | 29 | target_link_libraries(${CODEC_AV1D} mpp_base) 30 | set_target_properties(${CODEC_AV1D} PROPERTIES FOLDER "mpp/codec") 31 | -------------------------------------------------------------------------------- /mpp/codec/dec/avs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # avs decoder api 5 | set(AVSD_API 6 | 7 | ) 8 | set(AVSD_COMMON 9 | 10 | ) 11 | 12 | # avs decoder header 13 | set(AVSD_HDR 14 | avsd_parse.h 15 | ) 16 | 17 | # avs decoder sourse 18 | set(AVSD_SRC 19 | avsd_api.c 20 | avsd_parse.c 21 | ) 22 | 23 | add_library(codec_avsd STATIC 24 | ${AVSD_API} 25 | ${AVSD_COMMON} 26 | ${AVSD_HDR} 27 | ${AVSD_SRC} 28 | ) 29 | 30 | target_link_libraries(codec_avsd mpp_base) 31 | set_target_properties(codec_avsd PROPERTIES FOLDER "mpp/codec") -------------------------------------------------------------------------------- /mpp/codec/dec/avs2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # avs2 decoder api 5 | set(AVS2D_API 6 | 7 | ) 8 | set(AVS2D_COMMON 9 | 10 | ) 11 | 12 | # avs2 decoder header 13 | set(AVS2D_HDR 14 | avs2d_global.h 15 | avs2d_parse.h 16 | avs2d_ps.h 17 | avs2d_dpb.h 18 | ) 19 | 20 | # avs2 decoder sourse 21 | set(AVS2D_SRC 22 | avs2d_api.c 23 | avs2d_parse.c 24 | avs2d_ps.c 25 | avs2d_dpb.c 26 | ) 27 | 28 | add_library(codec_avs2d STATIC 29 | ${AVS2D_API} 30 | ${AVS2D_COMMON} 31 | ${AVS2D_HDR} 32 | ${AVS2D_SRC} 33 | ) 34 | 35 | target_link_libraries(codec_avs2d mpp_base) 36 | set_target_properties(codec_avs2d PROPERTIES FOLDER "mpp/codec") -------------------------------------------------------------------------------- /mpp/codec/dec/avs2/avs2d_ps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __AVS2D_PS_H__ 18 | #define __AVS2D_PS_H__ 19 | 20 | #include "avs2d_global.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | MPP_RET avs2d_parse_sequence_header(Avs2dCtx_t *p_dec); 27 | MPP_RET avs2d_parse_picture_header(Avs2dCtx_t *p_dec, RK_U32 startcode); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /*__AVS2D_PS_H__*/ 34 | -------------------------------------------------------------------------------- /mpp/codec/dec/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | set(DEC_COMMON_HDR 5 | h2645d_sei.h 6 | ) 7 | 8 | # h264 decoder sourse 9 | set(DEC_COMMON_SRC 10 | h2645d_sei.c 11 | ) 12 | 13 | 14 | set(DEC_COMMON dec_common) 15 | 16 | add_library(${DEC_COMMON} STATIC 17 | ${DEC_COMMON_HDR} 18 | ${DEC_COMMON_SRC} 19 | ) 20 | 21 | target_link_libraries(${DEC_COMMON} mpp_base) 22 | set_target_properties(${DEC_COMMON} PROPERTIES FOLDER "mpp/codec/dec/common") 23 | 24 | -------------------------------------------------------------------------------- /mpp/codec/dec/common/h2645d_sei.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2023 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef _H2645D_SEI_H_ 7 | #define _H2645D_SEI_H_ 8 | 9 | #include "rk_type.h" 10 | #include "mpp_err.h" 11 | #include "mpp_bitread.h" 12 | 13 | typedef struct SEI_Recovery_Point_t { 14 | RK_U32 valid_flag; // Whether this SEI is valid or not 15 | RK_S32 recovery_frame_cnt; // H.264: recovery_frame_cnt; H.265: recovery_poc_cnt 16 | RK_S32 first_frm_id; // The frame_num or poc of the frame associated with this SEI 17 | RK_U32 first_frm_valid; // The frame associated with this SEI is valid or not 18 | RK_S32 recovery_pic_id; // first_frm_id + recovery_frame_cnt; 19 | } RecoveryPoint; 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | MPP_RET check_encoder_sei_info(BitReadCtx_t *gb, RK_S32 payload_size, RK_U32 *is_match); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | //======================================== 32 | #endif /* end of _H2645D_SEI_H_ */ -------------------------------------------------------------------------------- /mpp/codec/dec/dummy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # dummy decoder api 4 | set(DUMMY_API 5 | ../../inc/dummy_dec_api.h 6 | ) 7 | 8 | # dummy decoder header 9 | set(DUMMY_HDR 10 | ) 11 | 12 | # dummy decoder sourse 13 | set(DUMMY_SRC 14 | dummy_dec_api.c 15 | ) 16 | 17 | add_library(codec_dummy_dec STATIC 18 | ${DUMMY_API} 19 | ${DUMMY_HDR} 20 | ${DUMMY_SRC} 21 | ) 22 | 23 | set_target_properties(codec_dummy_dec PROPERTIES FOLDER "mpp/codec") 24 | 25 | -------------------------------------------------------------------------------- /mpp/codec/dec/h263/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | set(H263D_PARSER_HDR 3 | h263d_parser.h 4 | ) 5 | 6 | set(H263D_PARSER_SRC 7 | h263d_api.c 8 | h263d_parser.c 9 | ) 10 | 11 | add_library(${CODEC_H263D} STATIC 12 | ${H263D_PARSER_SRC} ${H263D_PARSER_HDR} 13 | ) 14 | 15 | set_target_properties(${CODEC_H263D} PROPERTIES FOLDER "mpp/codec") 16 | 17 | target_link_libraries(${CODEC_H263D} mpp_base) 18 | -------------------------------------------------------------------------------- /mpp/codec/dec/h264/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../common) 4 | 5 | # h264 decoder api 6 | set(H264D_API 7 | ) 8 | 9 | set(H264D_COMMON 10 | ) 11 | 12 | # h264 decoder header 13 | set(H264D_HDR 14 | h264d_global.h 15 | h264d_parse.h 16 | h264d_slice.h 17 | h264d_sps.h 18 | h264d_pps.h 19 | h264d_scalist.h 20 | h264d_sei.h 21 | h264d_dpb.h 22 | h264d_init.h 23 | h264d_fill.h 24 | ) 25 | 26 | # h264 decoder sourse 27 | set(H264D_SRC 28 | h264d_api.c 29 | h264d_parse.c 30 | h264d_slice.c 31 | h264d_sps.c 32 | h264d_pps.c 33 | h264d_scalist.c 34 | h264d_sei.c 35 | h264d_dpb.c 36 | h264d_init.c 37 | h264d_fill.c 38 | ) 39 | 40 | 41 | add_library(${CODEC_H264D} STATIC 42 | ${H264D_API} 43 | ${H264D_COMMON} 44 | ${H264D_HDR} 45 | ${H264D_SRC} 46 | ) 47 | 48 | target_link_libraries(${CODEC_H264D} dec_common mpp_base) 49 | set_target_properties(${CODEC_H264D} PROPERTIES FOLDER "mpp/codec") 50 | 51 | -------------------------------------------------------------------------------- /mpp/codec/dec/h264/h264d_pps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 _H264D_PPS_H_ 19 | #define _H264D_PPS_H_ 20 | 21 | #include "rk_type.h" 22 | #include "mpp_err.h" 23 | #include "h264d_global.h" 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | MPP_RET process_pps(H264_SLICE_t *currSlice); 31 | MPP_RET activate_pps(H264dVideoCtx_t *p_Vid, H264_PPS_t *pps); 32 | MPP_RET process_prefix(H264_SLICE_t *currSlice); 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | //======================================== 38 | #endif /* end of _H264D_PPS_H_ */ 39 | 40 | -------------------------------------------------------------------------------- /mpp/codec/dec/h264/h264d_sei.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 _H264D_SEI_H_ 19 | #define _H264D_SEI_H_ 20 | 21 | #include "rk_type.h" 22 | #include "mpp_err.h" 23 | #include "h264d_global.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | MPP_RET process_sei(H264_SLICE_t *currSlice); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | //======================================== 36 | #endif /* end of _H264D_SEI_H_ */ 37 | 38 | -------------------------------------------------------------------------------- /mpp/codec/dec/h264/h264d_slice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 __H264D_SLICE_H__ 19 | #define __H264D_SLICE_H__ 20 | 21 | #include "rk_type.h" 22 | #include "mpp_err.h" 23 | #include "h264d_global.h" 24 | 25 | 26 | 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | MPP_RET process_slice(H264_SLICE_t *currSlice); 33 | 34 | MPP_RET reset_cur_slice(H264dCurCtx_t *p_Cur, H264_SLICE_t *p); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | //======================================== 41 | #endif /* end of __H264D_SLICE_H__ */ 42 | 43 | -------------------------------------------------------------------------------- /mpp/codec/dec/h265/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(../common) 3 | 4 | set(H265D_PARSER_HDR 5 | h265d_defs.h 6 | h265d_parser.h 7 | h265d_codec.h 8 | ) 9 | 10 | set(H265D_PARSER_SRC 11 | h265d_parser.c 12 | h265d_ps.c 13 | h265d_refs.c 14 | h265d_sei.c 15 | h265d_parser2_syntax.c 16 | ) 17 | 18 | add_library(${CODEC_H265D} STATIC 19 | ${H265D_PARSER_SRC} 20 | ${H265D_PARSER_HDR} 21 | ) 22 | 23 | set_target_properties(${CODEC_H265D} PROPERTIES FOLDER "mpp/codec") 24 | target_link_libraries(${CODEC_H265D} dec_common mpp_base) 25 | -------------------------------------------------------------------------------- /mpp/codec/dec/jpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | set(JPEGD_PARSER_HDR 3 | jpegd_parser.h 4 | ) 5 | 6 | set(JPEGD_PARSER_SRC 7 | jpegd_parser.c 8 | ) 9 | 10 | add_library(${CODEC_JPEGD} STATIC 11 | ${JPEGD_PARSER_SRC} 12 | ${JPEGD_PARSER_HDR} 13 | ) 14 | 15 | set_target_properties(${CODEC_JPEGD} PROPERTIES FOLDER "mpp/codec") 16 | target_link_libraries(${CODEC_JPEGD} mpp_base) 17 | add_definitions(-D_GNU_SOURCE) 18 | 19 | #add_subdirectory(test) 20 | -------------------------------------------------------------------------------- /mpp/codec/dec/m2v/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # m2v decoder api 5 | set(M2VD_API 6 | ../../inc/m2vd_api.h 7 | ) 8 | 9 | set(M2VD_COMMON 10 | ) 11 | 12 | # m2v decoder header 13 | set(M2VD_HDR 14 | m2vd_parser.h 15 | m2vd_codec.h 16 | m2vd_com.h 17 | ) 18 | 19 | # m2v decoder source 20 | set(M2VD_SRC 21 | m2vd_api.c 22 | m2vd_parser.c 23 | ) 24 | 25 | add_library(${CODEC_MPEG2D} STATIC 26 | ${M2VD_API} 27 | ${M2VD_COMMON} 28 | ${M2VD_HDR} 29 | ${M2VD_SRC} 30 | ) 31 | 32 | target_link_libraries(${CODEC_MPEG2D} mpp_base) 33 | set_target_properties(${CODEC_MPEG2D} PROPERTIES FOLDER "mpp/codec") 34 | -------------------------------------------------------------------------------- /mpp/codec/dec/m2v/m2vd_codec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __M2VD_CODEC_H__ 18 | #define __M2VD_CODEC_H__ 19 | 20 | #include "mpp_common.h" 21 | 22 | typedef struct M2VDContext_t { 23 | void *parse_ctx; 24 | 25 | } M2VDContext; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /mpp/codec/dec/mpg4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | set(MPG4D_PARSER_HDR 3 | mpg4d_parser.h 4 | ) 5 | 6 | set(MPG4D_PARSER_SRC 7 | mpg4d_api.c 8 | mpg4d_parser.c 9 | ) 10 | 11 | add_library(${CODEC_MPEG4D} STATIC 12 | ${MPG4D_PARSER_SRC} 13 | ${MPG4D_PARSER_HDR} 14 | ) 15 | 16 | set_target_properties(${CODEC_MPEG4D} PROPERTIES FOLDER "mpp/codec") 17 | target_link_libraries(${CODEC_MPEG4D} mpp_base) 18 | -------------------------------------------------------------------------------- /mpp/codec/dec/vp8/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | #vp8 decoder api 5 | set(VP8D_API 6 | ../../inc/vp8d_api.h 7 | ) 8 | 9 | #vp8 decoder header 10 | set(VP8D_HDR 11 | vp8d_parser.h 12 | vp8d_codec.h 13 | ) 14 | 15 | #vp8 decoder source 16 | set(VP8D_SRC 17 | vp8d_api.c 18 | vp8d_parser.c 19 | ) 20 | 21 | add_library(${CODEC_VP8D} STATIC 22 | ${VP8D_API} 23 | ${VP8D_HDR} 24 | ${VP8D_SRC} 25 | ) 26 | 27 | target_link_libraries(${CODEC_VP8D} mpp_base) 28 | set_target_properties(${CODEC_VP8D} PROPERTIES FOLDER "mpp/codec") 29 | -------------------------------------------------------------------------------- /mpp/codec/dec/vp8/vp8d_codec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 __VP8D_CODEC_H__ 19 | #define __VP8D_CODEC_H__ 20 | 21 | typedef struct VP8DContext_t { 22 | void *parse_ctx; 23 | 24 | } VP8DContext; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /mpp/codec/dec/vp9/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # vp9 decoder api 5 | set(VP9_D_API 6 | ../../inc/vp9d_api.h 7 | ) 8 | 9 | # vp9 decoder header 10 | set(VP9D_HDR 11 | ) 12 | 13 | # vp9 decoder sourse 14 | set(VP9D_SRC 15 | vp9d_api.c 16 | vp9d_parser.c 17 | vpx_rac.c 18 | vp9d_parser2_syntax.c 19 | ) 20 | 21 | add_library(${CODEC_VP9D} STATIC 22 | ${VP9D_API} 23 | ${VP9D_HDR} 24 | ${VP9D_SRC} 25 | ) 26 | 27 | target_link_libraries(${CODEC_VP9D} mpp_base) 28 | set_target_properties(${CODEC_VP9D} PROPERTIES FOLDER "mpp/codec") 29 | -------------------------------------------------------------------------------- /mpp/codec/enc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | add_subdirectory(dummy) 4 | 5 | if(HAVE_H264E) 6 | add_subdirectory(h264) 7 | endif() 8 | 9 | if(HAVE_JPEGE) 10 | add_subdirectory(jpeg) 11 | endif() 12 | 13 | if(HAVE_H265E) 14 | add_subdirectory(h265) 15 | endif() 16 | 17 | if(HAVE_VP8E) 18 | add_subdirectory(vp8) 19 | endif() 20 | 21 | -------------------------------------------------------------------------------- /mpp/codec/enc/dummy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # dummy decoder api 4 | set(DUMMY_API 5 | ../../inc/dummy_enc_api.h 6 | ) 7 | 8 | # dummy decoder header 9 | set(DUMMY_HDR 10 | ) 11 | 12 | # dummy decoder sourse 13 | set(DUMMY_SRC 14 | dummy_enc_api.c 15 | ) 16 | 17 | add_library(codec_dummy_enc STATIC 18 | ${DUMMY_API} 19 | ${DUMMY_HDR} 20 | ${DUMMY_SRC} 21 | ) 22 | 23 | set_target_properties(codec_dummy_enc PROPERTIES FOLDER "mpp/codec") 24 | 25 | -------------------------------------------------------------------------------- /mpp/codec/enc/dummy/dummy_enc_api.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 | #define MODULE_TAG "dummy_enc_api" 18 | 19 | #include "dummy_enc_api.h" 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /mpp/codec/enc/h264/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(include) 4 | 5 | # h264 encoder api 6 | set(H264E_API 7 | h264e_api_v2.c 8 | ) 9 | set(H264E_COMMON 10 | ) 11 | 12 | # h264 encoder header 13 | set(H264E_HDR 14 | ) 15 | 16 | # h264 encoder sourse 17 | set(H264E_SRC 18 | h264e_sps.c 19 | h264e_pps.c 20 | h264e_sei.c 21 | h264e_dpb.c 22 | h264e_slice.c 23 | ) 24 | 25 | 26 | add_library(${CODEC_H264E} STATIC 27 | ${H264E_API} 28 | ${H264E_COMMON} 29 | ${H264E_HDR} 30 | ${H264E_SRC} 31 | ) 32 | 33 | target_link_libraries(${CODEC_H264E} mpp_rc enc_rc mpp_base) 34 | set_target_properties(${CODEC_H264E} PROPERTIES FOLDER "mpp/codec") 35 | -------------------------------------------------------------------------------- /mpp/codec/enc/h264/h264e_sei.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __H264E_SEI_H__ 18 | #define __H264E_SEI_H__ 19 | 20 | #include "mpp_packet.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | MPP_RET h264e_sei_recovery_point_to_packet(MppPacket packet, RK_S32 *len, RK_U32 recovery_frame_cnt); 27 | MPP_RET h264e_sei_to_packet(MppPacket packet, RK_S32 *len, RK_S32 type, 28 | RK_U8 uuid[16], const void *data, RK_S32 size); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* __H264E_SEI_H__ */ 35 | -------------------------------------------------------------------------------- /mpp/codec/enc/h265/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | add_library(${CODEC_H265E} STATIC 5 | h265e_api.c 6 | h265e_dpb.c 7 | h265e_ps.c 8 | h265e_slice.c 9 | h265e_header_gen.c 10 | h265e_stream.c 11 | h265e_syntax.c 12 | h265e_enctropy.c 13 | ) 14 | 15 | target_link_libraries(${CODEC_H265E} mpp_base) 16 | set_target_properties(${CODEC_H265E} PROPERTIES FOLDER "mpp/codec") 17 | -------------------------------------------------------------------------------- /mpp/codec/enc/h265/h265e_ps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __H265E_PS_H__ 18 | #define __H265E_PS_H__ 19 | 20 | #include "h265e_slice.h" 21 | #include "h265e_codec.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | MPP_RET h265e_set_sps(H265eCtx *ctx, H265eSps *sps, H265eVps *vps); 28 | MPP_RET h265e_set_pps(H265eCtx *ctx, H265ePps *pps, H265eSps *sps); 29 | MPP_RET h265e_set_vps(H265eCtx *ctx, H265eVps *vps); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /mpp/codec/enc/jpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | add_library(${CODEC_JPEGE} STATIC 5 | jpege_api_v2.c 6 | ) 7 | 8 | target_link_libraries(${CODEC_JPEGE} mpp_base) 9 | set_target_properties(${CODEC_JPEGE} PROPERTIES FOLDER "mpp/codec") 10 | -------------------------------------------------------------------------------- /mpp/codec/enc/vp8/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(.) 2 | 3 | set(VP8E_API 4 | ) 5 | set(VP8E_COMMON 6 | ) 7 | set(VP8E_HDR 8 | vp8e_debug.h 9 | vp8e_rc.h) 10 | set(VP8E_SRC 11 | vp8e_api_v2.c 12 | vp8e_rc.c) 13 | 14 | add_library(codec_vp8e STATIC 15 | ${VP8E_API} 16 | ${VP8E_COMMON} 17 | ${VP8E_HDR} 18 | ${VP8E_SRC} 19 | ) 20 | 21 | target_link_libraries(codec_vp8e mpp_base) 22 | set_target_properties(codec_vp8e PROPERTIES FOLDER "mpp/codec") 23 | -------------------------------------------------------------------------------- /mpp/codec/enc/vp8/vp8e_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __VP8E_RC_H__ 18 | #define __VP8E_RC_H__ 19 | 20 | #include "mpp_enc_cfg.h" 21 | #include "vp8e_syntax.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | MPP_RET vp8e_init_rc(Vp8eRc *rc, MppEncCfgSet *cfg); 28 | MPP_RET vp8e_update_rc_cfg(Vp8eRc *rc, MppEncRcCfg *cfg); 29 | MPP_RET vp8e_before_pic_rc(Vp8eRc *rc); 30 | MPP_RET vp8e_after_pic_rc(Vp8eRc *rc, RK_S32 bitcnt); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif //__VP8E_RC_H__ 38 | -------------------------------------------------------------------------------- /mpp/codec/inc/avs2d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __AVS2D_API_H__ 18 | #define __AVS2D_API_H__ 19 | 20 | #include "parser_api.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const ParserApi api_avs2d_parser; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__AVS2D_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/codec/inc/avsd_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __AVSD_API_H__ 18 | #define __AVSD_API_H__ 19 | 20 | #include "parser_api.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const ParserApi api_avsd_parser; 27 | extern const ParserApi api_avsd_plus_parser; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /*__AVSD_API_H__*/ 34 | -------------------------------------------------------------------------------- /mpp/codec/inc/dummy_enc_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __DUMMY_ENC_API_H__ 18 | #define __DUMMY_ENC_API_H__ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif /*__DUMMY_ENC_API_H__*/ 30 | -------------------------------------------------------------------------------- /mpp/codec/inc/h263d_api.h: -------------------------------------------------------------------------------- 1 | #ifndef __H263D_API_H__ 2 | #define __H263D_API_H__ 3 | 4 | #include "parser_api.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | extern const ParserApi api_h263d_parser; 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /mpp/codec/inc/h264e_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __H264E_API_V2_H__ 18 | #define __H264E_API_V2_H__ 19 | 20 | #include "enc_impl_api.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const EncImplApi api_h264e; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __H264E_API_V2_H__ */ 33 | -------------------------------------------------------------------------------- /mpp/codec/inc/h265e_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __H265E_API_H__ 18 | #define __H265E_API_H__ 19 | 20 | #include "enc_impl_api.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const EncImplApi api_h265e; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__H265E_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/codec/inc/jpegd_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __JPEGD_API_H__ 18 | #define __JPEGD_API_H__ 19 | #include "parser_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const ParserApi api_jpegd_parser; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /*__JPEGD_API_H__*/ 32 | -------------------------------------------------------------------------------- /mpp/codec/inc/jpege_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __JPEGE_API_V2_H__ 17 | #define __JPEGE_API_V2_H__ 18 | 19 | #include "enc_impl_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const EncImplApi api_jpege; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* __JPEGE_API_V2_H__ */ 32 | -------------------------------------------------------------------------------- /mpp/codec/inc/m2vd_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __M2VD_API_H__ 18 | #define __M2VD_API_H__ 19 | 20 | #include "parser_api.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const ParserApi api_m2vd_parser; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /mpp/codec/inc/mpg4d_api.h: -------------------------------------------------------------------------------- 1 | #ifndef __MPG4D_API_H__ 2 | #define __MPG4D_API_H__ 3 | 4 | #include "parser_api.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | extern const ParserApi api_mpg4d_parser; 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /mpp/codec/inc/mpp_dec_no_thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_DEC_NO_THREAD_H__ 18 | #define __MPP_DEC_NO_THREAD_H__ 19 | 20 | #include "mpp_dec_impl.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern MppDecModeApi dec_api_no_thread; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__MPP_DEC_NO_THREAD_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/codec/inc/mpp_dec_normal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_DEC_NORMAL_H__ 18 | #define __MPP_DEC_NORMAL_H__ 19 | 20 | #include "mpp_dec_impl.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern MppDecModeApi dec_api_normal; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__MPP_DEC_NORMAL_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/codec/inc/vp8d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __VP8D_API_H__ 18 | #define __VP8D_API_H__ 19 | 20 | #include "parser_api.h" 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | extern const ParserApi api_vp8d_parser; 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /*__VP8D_API_H__*/ -------------------------------------------------------------------------------- /mpp/codec/inc/vp8e_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __VP8E_API_V2_H__ 18 | #define __VP8E_API_V2_H__ 19 | 20 | #include "enc_impl_api.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const EncImplApi api_vp8e; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__VP8E_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/codec/rc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | include_directories(.) 4 | 5 | # ---------------------------------------------------------------------------- 6 | # add mpp rate control function 7 | # ---------------------------------------------------------------------------- 8 | add_library(enc_rc STATIC 9 | h264e_rc.c 10 | h265e_rc.c 11 | jpege_rc.c 12 | vp8e_rc.c 13 | rc_model_v2_smt.c 14 | rc_model_v2.c 15 | rc_data_base.cpp 16 | rc_data_impl.cpp 17 | rc_data.cpp 18 | rc_impl.cpp 19 | rc.cpp 20 | rc_base.cpp 21 | ) 22 | 23 | target_link_libraries(enc_rc mpp_rc) 24 | 25 | add_subdirectory(test) 26 | -------------------------------------------------------------------------------- /mpp/codec/rc/h264e_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Rockchip Electronics Co. LTD 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 | #ifndef __H264E_RC_H__ 17 | #define __H264E_RC_H__ 18 | 19 | #include "mpp_rc_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const RcImplApi default_h264e; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* __H264E_RC_H__ */ 32 | -------------------------------------------------------------------------------- /mpp/codec/rc/h265e_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Rockchip Electronics Co. LTD 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 | #ifndef __H265E_RC_H__ 17 | #define __H265E_RC_H__ 18 | 19 | #include "mpp_rc_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const RcImplApi default_h265e; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* __H265E_RC_H__ */ 32 | -------------------------------------------------------------------------------- /mpp/codec/rc/jpege_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Rockchip Electronics Co. LTD 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 | #ifndef __JPEGE_RC_H__ 17 | #define __JPEGE_RC_H__ 18 | 19 | #include "mpp_rc_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const RcImplApi default_jpege; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* __JPEGE_RC_H__ */ 32 | -------------------------------------------------------------------------------- /mpp/codec/rc/rc_model_v2_smt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Rockchip Electronics Co. LTD 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 | #ifndef __RC_MODEL_V2_SMT_H__ 17 | #define __RC_MODEL_V2_SMT_H__ 18 | 19 | #include "mpp_rc_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const RcImplApi smt_h264e; 26 | extern const RcImplApi smt_h265e; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __RC_MODEL_V2_SMT_H__ */ 33 | -------------------------------------------------------------------------------- /mpp/codec/rc/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # rate control built-in unit test case 4 | # ---------------------------------------------------------------------------- 5 | 6 | include_directories(..) 7 | 8 | # macro for adding osal sub-module unit test 9 | macro(add_mpp_rc_test module) 10 | set(test_name ${module}_test) 11 | string(TOUPPER ${test_name} test_tag) 12 | 13 | option(${test_tag} "Build rc ${module} unit test" ${BUILD_TEST}) 14 | if(${test_tag}) 15 | add_executable(${test_name} ${test_name}.c) 16 | target_link_libraries(${test_name} ${MPP_SHARED} ${ASAN_LIB}) 17 | set_target_properties(${test_name} PROPERTIES FOLDER "osal/test") 18 | add_test(NAME ${test_name} COMMAND ${test_name}) 19 | endif() 20 | endmacro() 21 | 22 | # mpp rc unit test 23 | add_mpp_rc_test(rc_base) 24 | 25 | # mpp rc api test 26 | add_mpp_rc_test(rc_api) 27 | -------------------------------------------------------------------------------- /mpp/codec/rc/vp8e_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Rockchip Electronics Co. LTD 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 | #ifndef __VP8E_RC_H__ 17 | #define __VP8E_RC_H__ 18 | 19 | #include "mpp_rc_api.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | extern const RcImplApi default_vp8e; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* __VP8E_RC_H__ */ 32 | -------------------------------------------------------------------------------- /mpp/common/h265e_syntax.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __H265E_SYNTAX_H__ 18 | #define __H265E_SYNTAX_H__ 19 | 20 | typedef struct H265eSyntax_t { 21 | RK_S32 idr_request; 22 | // RK_S32 eos; 23 | } H265eSyntax; 24 | 25 | typedef struct H265eFeedback_t { 26 | RK_U32 bs_size; 27 | RK_U32 enc_pic_cnt; 28 | RK_U32 pic_type; 29 | RK_U32 avg_ctu_qp; 30 | RK_U32 gop_idx; 31 | RK_U32 poc; 32 | RK_U32 src_idx; 33 | RK_U32 status; 34 | } H265eFeedback; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /mpp/hal/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # ---------------------------------------------------------------------------- 5 | # add hal common file 6 | # ---------------------------------------------------------------------------- 7 | add_library(hal_common STATIC 8 | hal_info.c 9 | hal_bufs.c 10 | ) 11 | 12 | target_link_libraries(hal_common mpp_base) 13 | set_target_properties(hal_common PROPERTIES FOLDER "mpp/hal/common") 14 | 15 | add_subdirectory(h264) 16 | add_subdirectory(h265) 17 | add_subdirectory(jpeg) 18 | add_subdirectory(av1) 19 | -------------------------------------------------------------------------------- /mpp/hal/common/av1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(../../rkdec/av1d/) 3 | include_directories(../../rkdec/inc/) 4 | include_directories(../../vpu/av1d/) 5 | 6 | # hal h264 header 7 | set(HAL_AV1D_HDR 8 | hal_av1d_common.h 9 | ) 10 | 11 | # hal av1 decoder common 12 | set(HAL_AV1D_COM_SRC 13 | film_grain_noise_table.c 14 | ) 15 | 16 | add_library(hal_av1d_com STATIC 17 | ${HAL_AV1D_HDR} 18 | ${HAL_AV1D_COM_SRC} 19 | ) 20 | 21 | target_link_libraries(hal_av1d_com mpp_base) 22 | set_target_properties(hal_av1d_com PROPERTIES FOLDER "mpp/hal") 23 | 24 | # hal av1 decoder sourse 25 | set(HAL_AV1D_SRC 26 | hal_av1d_api_v2.c 27 | ) 28 | 29 | add_library(${HAL_AV1D} STATIC 30 | ${HAL_AV1D_HDR} 31 | ${HAL_AV1D_SRC} 32 | ) 33 | 34 | target_link_libraries(${HAL_AV1D} hal_av1d_rkv hal_av1d_vpu mpp_base) 35 | set_target_properties(${HAL_AV1D} PROPERTIES FOLDER "mpp/hal") 36 | -------------------------------------------------------------------------------- /mpp/hal/common/h264/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../../rkenc/common/) 4 | include_directories(../../rkenc/h264e/) 5 | include_directories(../../vpu/h264e/) 6 | include_directories(../../../codec/enc/h264/) 7 | 8 | # hal h264 header 9 | set(HAL_H264E_HDR 10 | ) 11 | 12 | # hal h264 encoder common 13 | set(HAL_H264E_COM_SRC 14 | hal_h264e_stream_amend.c 15 | ) 16 | 17 | add_library(hal_h264e_com STATIC 18 | ${HAL_H264E_HDR} 19 | ${HAL_H264E_COM_SRC} 20 | ) 21 | 22 | target_link_libraries(hal_h264e_com mpp_base) 23 | set_target_properties(hal_h264e_com PROPERTIES FOLDER "mpp/hal") 24 | 25 | # hal h264 encoder sourse 26 | set(HAL_H264E_SRC 27 | hal_h264e_api_v2.c 28 | ) 29 | 30 | add_library(hal_h264e STATIC 31 | ${HAL_H264E_HDR} 32 | ${HAL_H264E_SRC} 33 | ) 34 | 35 | target_link_libraries(hal_h264e hal_h264e_rkv hal_h264e_vpu mpp_base) 36 | set_target_properties(hal_h264e PROPERTIES FOLDER "mpp/hal") 37 | -------------------------------------------------------------------------------- /mpp/hal/common/h265/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../../rkenc/h265e/) 4 | include_directories(../../rkenc/common/) 5 | 6 | # hal h265 header 7 | set(HAL_H265E_HDR 8 | ) 9 | 10 | # hal h265 encoder common 11 | set(HAL_H265E_COM_SRC 12 | hal_h265e_stream_amend.c 13 | ) 14 | 15 | add_library(hal_h265e_com STATIC 16 | ${HAL_H265E_HDR} 17 | ${HAL_H265E_COM_SRC} 18 | ) 19 | 20 | target_link_libraries(hal_h265e_com hal_h265e_vepu541 mpp_base) 21 | set_target_properties(hal_h265e_com PROPERTIES FOLDER "mpp/hal") 22 | 23 | # hal h265 encoder sourse 24 | set(HAL_H265E_SRC 25 | hal_h265e_api_v2.c 26 | ) 27 | 28 | add_library(hal_h265e STATIC 29 | ${HAL_H265E_HDR} 30 | ${HAL_H265E_SRC} 31 | ) 32 | 33 | set_target_properties(hal_h265e PROPERTIES FOLDER "mpp/hal") 34 | 35 | target_link_libraries(hal_h265e hal_h265e_vepu541 mpp_base) 36 | -------------------------------------------------------------------------------- /mpp/hal/common/h265/hal_h265e_stream_amend.c: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #include "hal_h265e_stream_amend.h" 7 | 8 | #include "mpp_common.h" 9 | #include "mpp_log.h" 10 | 11 | MPP_RET hal_h265e_amend_temporal_id(HalEncTask *enc_task, RK_U32 strm_size) 12 | { 13 | MPP_RET ret = MPP_OK; 14 | H265eSyntax_new *syn = (H265eSyntax_new *)enc_task->syntax.data; 15 | RK_U32 offset = mpp_packet_get_length(enc_task->packet); 16 | RK_U8 *stream_ptr = (RK_U8 *)(mpp_buffer_get_ptr(enc_task->output) + offset); 17 | 18 | if (strm_size < 5) { 19 | mpp_err("Stream size is too small, maybe there is hw encoder error!"); 20 | return MPP_NOK; 21 | } 22 | 23 | if (syn->sp.temporal_id) 24 | stream_ptr[5] = (stream_ptr[5] & 0xf8) | ((syn->sp.temporal_id + 1) & 0x7); 25 | 26 | return ret; 27 | } -------------------------------------------------------------------------------- /mpp/hal/common/h265/hal_h265e_stream_amend.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H265E_STREAM_AMEND_H__ 7 | #define __HAL_H265E_STREAM_AMEND_H__ 8 | 9 | #include "hal_enc_task.h" 10 | #include "h265e_syntax_new.h" 11 | 12 | MPP_RET hal_h265e_amend_temporal_id(HalEncTask *enc_task, RK_U32 strm_size); 13 | 14 | #endif /* __HAL_H265E_STREAM_AMEND_H__ */ -------------------------------------------------------------------------------- /mpp/hal/common/jpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../../rkenc/common/) 4 | include_directories(../../rkenc/jpege/) 5 | include_directories(../../vpu/jpege/) 6 | 7 | # hal h264 header 8 | set(HAL_JPEGE_HDR 9 | ) 10 | 11 | # hal h264 encoder common 12 | set(HAL_JPEGE_SRC 13 | hal_jpege_hdr.c 14 | ) 15 | 16 | add_library(hal_jpege_com STATIC 17 | ${HAL_JPEGE_HDR} 18 | ${HAL_JPEGE_SRC} 19 | ) 20 | 21 | target_link_libraries(hal_jpege_com mpp_base) 22 | set_target_properties(hal_jpege_com PROPERTIES FOLDER "mpp/hal") 23 | 24 | # hal h264 encoder sourse 25 | set(HAL_JPEGE_SRC 26 | hal_jpege_api_v2.c 27 | ) 28 | 29 | add_library(hal_jpege STATIC 30 | ${HAL_JPEGE_HDR} 31 | ${HAL_JPEGE_SRC} 32 | ) 33 | 34 | target_link_libraries(hal_jpege hal_jpege_rkv hal_jpege_vpu mpp_base) 35 | set_target_properties(hal_jpege PROPERTIES FOLDER "mpp/hal") 36 | -------------------------------------------------------------------------------- /mpp/hal/dummy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # hal dummy decoder api 4 | set(HAL_DUMMY_API 5 | ../inc/hal_dummy_dec_api.h 6 | ../inc/hal_dummy_enc_api.h 7 | ) 8 | 9 | # hal dummy header 10 | set(HAL_DUMMY_HDR 11 | ) 12 | 13 | # hal dummy decoder sourse 14 | set(HAL_DUMMY_SRC 15 | hal_dummy_dec_api.c 16 | hal_dummy_enc_api.c 17 | ) 18 | 19 | add_library(hal_dummy STATIC 20 | ${HAL_DUMMY_API} 21 | ${HAL_DUMMY_HDR} 22 | ${HAL_DUMMY_SRC} 23 | ) 24 | 25 | set_target_properties(hal_dummy PROPERTIES FOLDER "mpp/hal") 26 | 27 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_av1d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_AV1D_API_H__ 18 | #define __HAL_AV1D_API_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_api_av1d; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_H265D_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_avs2d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_AVS2D_API_H__ 18 | #define __HAL_AVS2D_API_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_api_avs2d; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_AVS2D_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_avsd_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_AVSD_API_H__ 18 | #define __HAL_AVSD_API_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_api_avsd; 27 | extern const MppHalApi hal_api_avsd_plus; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /*__HAL_AVSD_API_H__*/ 34 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_dummy_dec_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 | 19 | #ifndef __HAL_DUMMY_DEC_API_H__ 20 | #define __HAL_DUMMY_DEC_API_H__ 21 | 22 | #include "mpp_hal.h" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | extern const MppHalApi hal_api_dummy_dec; 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /*__HAL_DUMMY_DEC_API_H__*/ 35 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_dummy_enc_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 | 19 | #ifndef __HAL_DUMMY_ENC_API_H__ 20 | #define __HAL_DUMMY_ENC_API_H__ 21 | 22 | #include "mpp_hal.h" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | extern const MppHalApi hal_api_dummy_enc; 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /*__HAL_DUMMY_ENC_API_H__*/ 35 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_h263d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2016 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 __HAL_H263D_API_H__ 19 | #define __HAL_H263D_API_H__ 20 | 21 | #include "mpp_hal.h" 22 | 23 | #define H263D_HAL_DBG_REG_PUT (0x00000001) 24 | #define H263D_HAL_DBG_REG_GET (0x00000002) 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | extern RK_U32 h263d_hal_debug; 31 | 32 | extern const MppHalApi hal_api_h263d; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /*__HAL_H263D_API_H__*/ 39 | 40 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_h264d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 | 19 | #ifndef __HAL_H264D_API_H__ 20 | #define __HAL_H264D_API_H__ 21 | 22 | #include "rk_type.h" 23 | #include "mpp_err.h" 24 | #include "mpp_hal.h" 25 | 26 | 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | extern const MppHalApi hal_api_h264d; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /*__HAL_H264D_API_H__*/ 39 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_h264e_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264E_API_V2_H__ 18 | #define __HAL_H264E_API_V2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppEncHalApi hal_api_h264e_v2; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __HAL_H264E_API_V2_H__ */ 33 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_h265d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265D_API_H__ 18 | #define __HAL_H265D_API_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_api_h265d; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_H265D_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_h265e_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265E_API_H__ 18 | #define __HAL_H265E_API_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppEncHalApi hal_api_h265e_v2; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_H265E_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_jpege_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_JPEGE_API_V2_H__ 18 | #define __HAL_JPEGE_API_V2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppEncHalApi hal_api_jpege_v2; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_JPEGE_API_V2_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_mpg4d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * * 3 | * * Copyright 2016 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 | /* 19 | * @file hal_vpu_mpg4d_api.h 20 | * @brief 21 | * @author gzl(lance.gao@rock-chips.com) 22 | 23 | * @version 1.0.0 24 | * @history 25 | * 2016.04.11 : Create 26 | */ 27 | 28 | #ifndef __HAL_MPEG4D_API_H__ 29 | #define __HAL_MPEG4D_API_H__ 30 | 31 | #include "mpp_hal.h" 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | extern const MppHalApi hal_api_mpg4d; 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /*__HAL_MPEG4D_API_H__*/ 44 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_vp8d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 | 19 | #ifndef __HAL_VP8D_API_H__ 20 | #define __HAL_VP8D_API_H__ 21 | 22 | #include "mpp_hal.h" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | extern const MppHalApi hal_api_vp8d; 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /*__HAL_VP8D_API_H__*/ 35 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_vp8e_api_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP8E_API_V2_H__ 18 | #define __HAL_VP8E_API_V2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_api_vp8e_v2; 23 | 24 | #endif /* __HAL_VP8E_API_H__ */ 25 | -------------------------------------------------------------------------------- /mpp/hal/inc/hal_vp9d_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP9D_API_H__ 18 | #define __HAL_VP9D_API_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_api_vp9d; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_VP9D_API_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(inc) 3 | 4 | add_library(vdpu34x_com STATIC vdpu34x_com.c vdpu382_com.c) 5 | add_library(vdpu383_com STATIC vdpu383_com.c) 6 | add_library(vdpu384a_com STATIC vdpu384a_com.c) 7 | 8 | if( HAVE_AVSD ) 9 | add_subdirectory(avsd) 10 | endif() 11 | 12 | if( HAVE_AVS2D ) 13 | add_subdirectory(avs2d) 14 | endif() 15 | 16 | if( HAVE_H264D ) 17 | add_subdirectory(h264d) 18 | endif() 19 | 20 | if( HAVE_H265D ) 21 | add_subdirectory(h265d) 22 | endif() 23 | 24 | if( HAVE_VP9D ) 25 | add_subdirectory(vp9d) 26 | endif() 27 | 28 | if( HAVE_AV1D ) 29 | add_subdirectory(av1d) 30 | endif() -------------------------------------------------------------------------------- /mpp/hal/rkdec/av1d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal av1 reg 3 | 4 | include_directories(../../common/av1) 5 | 6 | set(HAL_AV1D_HDR 7 | ../../common/av1/hal_av1d_common.h 8 | ) 9 | 10 | set(HAL_AV1D_SRC 11 | hal_av1d_vdpu383.c 12 | ) 13 | 14 | add_library(hal_av1d_rkv STATIC 15 | ${HAL_AV1D_SRC} 16 | ${HAL_AV1D_HDR} 17 | ) 18 | 19 | set_target_properties(hal_av1d_rkv PROPERTIES FOLDER "mpp/hal") 20 | target_link_libraries(hal_av1d_rkv mpp_base) 21 | 22 | #add_subdirectory(test) 23 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/av1d/hal_av1d_vdpu383.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_AV1D_VDPU383_H__ 7 | #define __HAL_AV1D_VDPU383_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu383.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_av1d_vdpu383; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* __HAL_AV1D_VDPU383_H__ */ 23 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/avs2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # hal avs2 decoder api 4 | set(HAL_AVS2D_API 5 | ) 6 | 7 | # hal avs2 header 8 | set(HAL_AVS2D_HDR 9 | hal_avs2d_global.h 10 | hal_avs2d_rkv.h 11 | ) 12 | 13 | # hal avs2 decoder sourse 14 | set(HAL_AVS2D_SRC 15 | hal_avs2d_rkv.c 16 | hal_avs2d_vdpu382.c 17 | hal_avs2d_vdpu383.c 18 | hal_avs2d_api.c 19 | ) 20 | 21 | add_library(hal_avs2d STATIC 22 | ${HAL_AVS2D_API} 23 | ${HAL_AVS2D_HDR} 24 | ${HAL_AVS2D_SRC} 25 | ) 26 | 27 | target_link_libraries(hal_avs2d mpp_base vdpu383_com) 28 | set_target_properties(hal_avs2d PROPERTIES FOLDER "mpp/hal") 29 | 30 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/avs2d/hal_avs2d_rkv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_AVS2D_RKV_H__ 18 | #define __HAL_AVS2D_RKV_H__ 19 | 20 | #include "mpp_device.h" 21 | 22 | #include "parser_api.h" 23 | #include "hal_avs2d_api.h" 24 | #include "hal_avs2d_global.h" 25 | #include "avs2d_syntax.h" 26 | #include "vdpu34x.h" 27 | 28 | #define AVS2D_REGISTERS (278) 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | extern const MppHalApi hal_avs2d_rkvdpu; 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif /*__HAL_AVS2D_RKV_H__*/ 41 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/avs2d/hal_avs2d_vdpu382.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_AVS2D_VDPU382_H__ 18 | #define __HAL_AVS2D_VDPU382_H__ 19 | 20 | #include "mpp_device.h" 21 | 22 | #include "parser_api.h" 23 | #include "hal_avs2d_api.h" 24 | #include "hal_avs2d_global.h" 25 | #include "avs2d_syntax.h" 26 | #include "vdpu382.h" 27 | 28 | #define AVS2D_REGISTERS (278) 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | extern const MppHalApi hal_avs2d_vdpu382; 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif /*__HAL_AVS2D_VDPU382_H__*/ 41 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/avs2d/hal_avs2d_vdpu383.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_AVS2D_VDPU383_H__ 7 | #define __HAL_AVS2D_VDPU383_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu383.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_avs2d_vdpu383; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /*__HAL_AVS2D_RKV_H__*/ 23 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/avsd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # hal avs decoder api 4 | set(HAL_AVSD_API 5 | ) 6 | 7 | # hal avs header 8 | set(HAL_AVSD_HDR 9 | hal_avsd_base.h 10 | hal_avsd_vdpu1.h 11 | hal_avsd_vdpu2.h 12 | hal_avsd_plus.h 13 | hal_avsd_vdpu1_reg.h 14 | hal_avsd_vdpu2_reg.h 15 | hal_avsd_plus_reg.h 16 | ) 17 | 18 | # hal avs decoder sourse 19 | set(HAL_AVSD_SRC 20 | hal_avsd_api.c 21 | hal_avsd_base.c 22 | hal_avsd_vdpu1.c 23 | hal_avsd_vdpu2.c 24 | hal_avsd_plus.c 25 | ) 26 | 27 | add_library(hal_avsd STATIC 28 | ${HAL_AVSD_API} 29 | ${HAL_AVSD_HDR} 30 | ${HAL_AVSD_SRC} 31 | ) 32 | 33 | target_link_libraries(hal_avsd mpp_base) 34 | set_target_properties(hal_avsd PROPERTIES FOLDER "mpp/hal") 35 | 36 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # hal h264 decoder sourse 4 | set(HAL_H264D_SRC 5 | hal_h264d_api.c 6 | hal_h264d_vdpu34x.c 7 | hal_h264d_vdpu382.c 8 | hal_h264d_vdpu383.c 9 | hal_h264d_vdpu384a.c 10 | hal_h264d_rkv_reg.c 11 | hal_h264d_vdpu2.c 12 | hal_h264d_vdpu1.c 13 | hal_h264d_vdpu_com.c 14 | ) 15 | 16 | add_library(hal_h264d STATIC ${HAL_H264D_SRC}) 17 | 18 | target_link_libraries(hal_h264d vdpu34x_com vdpu383_com vdpu384a_com mpp_base mpp_hal) 19 | set_target_properties(hal_h264d PROPERTIES FOLDER "mpp/hal") 20 | 21 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/hal_h264d_vdpu1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 __HAL_H264D_VDPU1_REG_H__ 19 | #define __HAL_H264D_VDPU1_REG_H__ 20 | 21 | #include "mpp_hal.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_h264d_vdpu1; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /*__HAL_H264D_VDPU1_REG_H__*/ 34 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/hal_h264d_vdpu2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 __HAL_H264D_VDPU2_REG_H__ 19 | #define __HAL_H264D_VDPU2_REG_H__ 20 | 21 | #include "mpp_hal.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_h264d_vdpu2; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /*__HAL_H264D_VDPU2_REG_H__*/ 34 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/hal_h264d_vdpu34x.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264D_VDPU34X_H__ 18 | #define __HAL_H264D_VDPU34X_H__ 19 | 20 | #include "mpp_hal.h" 21 | #include "vdpu34x.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_h264d_vdpu34x; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* __HAL_H264D_VDPU34X_H__ */ -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/hal_h264d_vdpu382.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264D_VDPU382_H__ 18 | #define __HAL_H264D_VDPU382_H__ 19 | 20 | #include "mpp_hal.h" 21 | #include "vdpu382.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_h264d_vdpu382; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* __HAL_H264D_VDPU382_H__ */ -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/hal_h264d_vdpu383.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H264D_VDPU383_H__ 7 | #define __HAL_H264D_VDPU383_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu383.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_h264d_vdpu383; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* __HAL_H264D_VDPU34X_H__ */ -------------------------------------------------------------------------------- /mpp/hal/rkdec/h264d/hal_h264d_vdpu384a.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H264D_VDPU384A_H__ 7 | #define __HAL_H264D_VDPU384A_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu384a.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_h264d_vdpu384a; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* __HAL_H264D_VDPU384A_H__ */ 23 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h265d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal h265 reg 3 | 4 | set(HAL_H265D_SRC 5 | hal_h265d_api.c 6 | hal_h265d_com.c 7 | hal_h265d_rkv.c 8 | hal_h265d_vdpu34x.c 9 | hal_h265d_vdpu382.c 10 | hal_h265d_vdpu383.c 11 | hal_h265d_vdpu384a.c 12 | ) 13 | 14 | add_library(${HAL_H265D} STATIC ${HAL_H265D_SRC}) 15 | 16 | set_target_properties(${HAL_H265D} PROPERTIES FOLDER "mpp/hal") 17 | target_link_libraries(${HAL_H265D} vdpu34x_com vdpu383_com vdpu384a_com mpp_base) 18 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h265d/hal_h265d_rkv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2020 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 __HAL_H265D_RKV_H__ 19 | #define __HAL_H265D_RKV_H__ 20 | 21 | #include "mpp_hal.h" 22 | 23 | #define HWID_VDPU345 (0xdbdc0701) 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | extern const MppHalApi hal_h265d_rkv; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /*__HAL_H265D_RKV_H__*/ 36 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265D_VDPU34X_H__ 18 | #define __HAL_H265D_VDPU34X_H__ 19 | 20 | #include "mpp_hal.h" 21 | #include "vdpu34x.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_h265d_vdpu34x; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* __HAL_H265D_VDPU34X_H__ */ 34 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h265d/hal_h265d_vdpu382.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265D_VDPU382_H__ 18 | #define __HAL_H265D_VDPU382_H__ 19 | 20 | #include "mpp_hal.h" 21 | #include "vdpu382.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_h265d_vdpu382; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* __HAL_H265D_VDPU382_H__ */ 34 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h265d/hal_h265d_vdpu383.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H265D_VDPU383_H__ 7 | #define __HAL_H265D_VDPU383_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu383.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_h265d_vdpu383; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* __HAL_H265D_VDPU383_H__ */ 23 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/h265d/hal_h265d_vdpu384a.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H265D_VDPU384A_H__ 7 | #define __HAL_H265D_VDPU384A_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu384a.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_h265d_vdpu384a; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* __HAL_H265D_VDPU384A_H__ */ 23 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/inc/vdpu34x.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __VDPU34X_H__ 18 | #define __VDPU34X_H__ 19 | 20 | #define HWID_VDPU34X (0x032a3f03) 21 | #define HWID_VDPU38X (0x53813f05) 22 | 23 | #endif /* __VDPU34X_H__ */ 24 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/inc/vdpu382.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __VDPU382_H__ 18 | #define __VDPU382_H__ 19 | 20 | #define HWID_VDPU382_RK3528 (0x70393f05) 21 | #define HWID_VDPU382_RK3562 (0x72bb0f01) 22 | 23 | #endif /* __VDPU382_H__ */ 24 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/inc/vdpu383.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __VDPU383_H__ 7 | #define __VDPU383_H__ 8 | 9 | #define HWID_VDPU383 (0x38321746) 10 | 11 | #endif /* __VDPU383_H__ */ 12 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/inc/vdpu384a.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __VDPU384A_H__ 7 | #define __VDPU384A_H__ 8 | 9 | #define HWID_VDPU384A (0x38436021) 10 | 11 | #endif /* __VDPU384A_H__ */ 12 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/vp9d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # hal vp9 decoder sourse 4 | set(HAL_VP9D_SRC 5 | hal_vp9d_api.c 6 | hal_vp9d_com.c 7 | hal_vp9d_rkv.c 8 | hal_vp9d_vdpu34x.c 9 | hal_vp9d_vdpu382.c 10 | hal_vp9d_vdpu383.c 11 | ) 12 | 13 | add_library(hal_vp9d STATIC ${HAL_VP9D_SRC}) 14 | 15 | target_link_libraries(hal_vp9d mpp_base vdpu383_com) 16 | set_target_properties(hal_vp9d PROPERTIES FOLDER "mpp/hal") 17 | 18 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/vp9d/hal_vp9d_rkv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP9D_RKV_H__ 18 | #define __HAL_VP9D_RKV_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_vp9d_rkv; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__HAL_VP9D_RKV_H__*/ 33 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/vp9d/hal_vp9d_vdpu34x.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP9D_VDPU34X_H__ 18 | #define __HAL_VP9D_VDPU34X_H__ 19 | 20 | #include "mpp_hal.h" 21 | #include "vdpu34x.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_vp9d_vdpu34x; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif /* __HAL_VP9D_VDPU34X_H__ */ 33 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/vp9d/hal_vp9d_vdpu382.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP9D_VDPU382_H__ 18 | #define __HAL_VP9D_VDPU382_H__ 19 | 20 | #include "mpp_hal.h" 21 | #include "vdpu382.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern const MppHalApi hal_vp9d_vdpu382; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif /* __HAL_VP9D_VDPU382_H__ */ 33 | -------------------------------------------------------------------------------- /mpp/hal/rkdec/vp9d/hal_vp9d_vdpu383.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_VP9D_VDPU383_H__ 7 | #define __HAL_VP9D_VDPU383_H__ 8 | 9 | #include "mpp_hal.h" 10 | #include "vdpu383.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern const MppHalApi hal_vp9d_vdpu383; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif /* __HAL_VP9D_VDPU34X_H__ */ 22 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | add_subdirectory(common) 3 | add_subdirectory(h264e) 4 | add_subdirectory(h265e) 5 | add_subdirectory(jpege) 6 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # hal vepu541 common module 5 | add_library(hal_vepu541_common STATIC 6 | vepu541_common.c 7 | vepu5xx_common.c 8 | vepu540c_common.c 9 | vepu580_tune.c 10 | vepu510_common.c 11 | vepu511_common.c 12 | ) 13 | 14 | target_link_libraries(hal_vepu541_common mpp_base) 15 | set_target_properties(hal_vepu541_common PROPERTIES FOLDER "mpp/hal/vepu541") 16 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/common/vepu580_tune.c: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2023 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #define MODULE_TAG "vepu580_tune" 7 | 8 | #include "rk_type.h" 9 | #include "vepu580_tune.h" 10 | 11 | RK_S32 ctu_madp_cnt_thd[6][8] = { 12 | {50, 100, 130, 50, 100, 550, 500, 550}, 13 | {100, 150, 200, 80, 120, 500, 450, 550}, 14 | {150, 200, 250, 100, 150, 450, 400, 450}, 15 | {50, 100, 130, 50, 100, 550, 500, 550}, 16 | {100, 150, 200, 80, 120, 500, 450, 550}, 17 | {150, 200, 250, 100, 150, 450, 400, 450} 18 | }; 19 | 20 | RK_S32 madp_num_map[5][4] = { 21 | {0, 0, 0, 1}, 22 | {0, 0, 1, 0}, 23 | {0, 0, 1, 1}, 24 | {1, 0, 0, 0}, 25 | {1, 1, 1, 1}, 26 | }; 27 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/common/vepu5xx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __VEPU5XX_H__ 18 | #define __VEPU5XX_H__ 19 | 20 | #define HWID_VEPU58X (0x50603312) 21 | #define HWID_VEPU540C (0x50603313) 22 | #define HWID_VEPU510 (0x506f2314) 23 | #define HWID_VEPU511 (0x50602715) 24 | 25 | #endif /* __VEPU5XX_H__ */ 26 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h264e/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | # hal/common for hal_bufs module 4 | include_directories(../common/) 5 | include_directories(../../common/h264/) 6 | # mpp/codec/enc/h264 for h264 syntax 7 | include_directories(../../../codec/enc/h264/) 8 | 9 | # hal h264 header 10 | set(HAL_H264E_HDR 11 | ) 12 | 13 | # hal h264 encoder sourse 14 | set(HAL_H264E_SRC 15 | hal_h264e_vepu541.c 16 | hal_h264e_vepu580.c 17 | hal_h264e_vepu540c.c 18 | hal_h264e_vepu510.c 19 | hal_h264e_vepu511.c 20 | ) 21 | 22 | add_library(hal_h264e_rkv STATIC 23 | ${HAL_H264E_HDR} 24 | ${HAL_H264E_SRC} 25 | ) 26 | 27 | target_link_libraries(hal_h264e_rkv hal_vepu541_common hal_h264e_com hal_common) 28 | set_target_properties(hal_h264e_rkv PROPERTIES FOLDER "mpp/hal") 29 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h264e/hal_h264e_vepu510.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H264E_VEPU510_H__ 7 | #define __HAL_H264E_VEPU510_H__ 8 | 9 | #include "mpp_enc_hal.h" 10 | 11 | extern const MppEncHalApi hal_h264e_vepu510; 12 | 13 | #endif /* __HAL_H264E_VEPU510_H__ */ 14 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h264e/hal_h264e_vepu511.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2025 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H264E_VEPU511_H__ 7 | #define __HAL_H264E_VEPU511_H__ 8 | 9 | #include "mpp_enc_hal.h" 10 | 11 | extern const MppEncHalApi hal_h264e_vepu511; 12 | 13 | #endif /* __HAL_H264E_VEPU511_H__ */ 14 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h264e/hal_h264e_vepu540c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264E_VEPU540C_H__ 18 | #define __HAL_H264E_VEPU540C_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h264e_vepu540c; 23 | 24 | #endif /* __HAL_H264E_VEPU540C_H__ */ 25 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h264e/hal_h264e_vepu541.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264E_VEPU541_H__ 18 | #define __HAL_H264E_VEPU541_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h264e_vepu541; 23 | 24 | #endif /* __HAL_H264E_VEPU541_H__ */ -------------------------------------------------------------------------------- /mpp/hal/rkenc/h264e/hal_h264e_vepu580.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264E_VEPU580_H__ 18 | #define __HAL_H264E_VEPU580_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h264e_vepu580; 23 | 24 | #endif /* __HAL_H264E_VEPU541_H__ */ -------------------------------------------------------------------------------- /mpp/hal/rkenc/h265e/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../../common/h265/) 4 | include_directories(../common/) 5 | # mpp/codec/enc/h265 for h265 syntax 6 | include_directories(../../../codec/enc/h265/) 7 | 8 | # hal h265 header 9 | set(HAL_H265E_HDR 10 | hal_h265e_vepu541_reg.h 11 | hal_h265e_vepu580_reg.h 12 | hal_h265e_vepu510_reg.h 13 | hal_h265e_vepu511_reg.h 14 | ) 15 | 16 | # hal h265 encoder sourse 17 | set(HAL_H265E_SRC 18 | hal_h265e_vepu541.c 19 | hal_h265e_vepu580.c 20 | hal_h265e_vepu540c.c 21 | hal_h265e_vepu510.c 22 | hal_h265e_vepu511.c 23 | ) 24 | 25 | add_library(hal_h265e_vepu541 STATIC 26 | ${HAL_H265E_HDR} 27 | ${HAL_H265E_SRC} 28 | ) 29 | 30 | target_link_libraries(hal_h265e_vepu541 hal_h265e_com hal_common hal_vepu541_common) 31 | set_target_properties(hal_h265e_vepu541 PROPERTIES FOLDER "mpp/hal") 32 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h265e/hal_h265e_vepu510.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H265E_VEPU510_H__ 7 | #define __HAL_H265E_VEPU510_H__ 8 | 9 | #include "mpp_enc_hal.h" 10 | 11 | extern const MppEncHalApi hal_h265e_vepu510; 12 | 13 | #endif /* __HAL_H265E_VEPU510_H__ */ 14 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h265e/hal_h265e_vepu511.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2025 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_H265E_VEPU511_H__ 7 | #define __HAL_H265E_VEPU511_H__ 8 | 9 | #include "mpp_enc_hal.h" 10 | 11 | extern const MppEncHalApi hal_h265e_vepu511; 12 | 13 | #endif /* __HAL_H265E_VEPU511_H__ */ -------------------------------------------------------------------------------- /mpp/hal/rkenc/h265e/hal_h265e_vepu540c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265E_VEPU540C_H__ 18 | #define __HAL_H265E_VEPU540C_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h265e_vepu540c; 23 | 24 | #endif /* __HAL_H265E_VEPU540C_H__ */ 25 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h265e/hal_h265e_vepu541.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265E_VEPU541_H__ 18 | #define __HAL_H265E_VEPU541_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h265e_vepu541; 23 | 24 | #endif /* __HAL_H265E_VEPU541_H__ */ 25 | 26 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/h265e/hal_h265e_vepu580.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H265E_VEPU580_H__ 18 | #define __HAL_H265E_VEPU580_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h265e_vepu580; 23 | 24 | #endif /* __HAL_H265E_VEPU580_H__ */ 25 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/jpege/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../../common/jpeg/) 4 | include_directories(../common/) 5 | 6 | # hal jpeg header 7 | set(HAL_JPEGE_HDR 8 | hal_jpege_vepu540c_reg.h 9 | hal_jpege_vepu511_reg.h 10 | hal_jpege_vpu720_reg.h 11 | hal_jpege_vpu720.h 12 | ) 13 | 14 | # hal jpeg encoder sourse 15 | set(HAL_JPEGE_SRC 16 | hal_jpege_vepu540c.c 17 | hal_jpege_vepu511.c 18 | hal_jpege_vpu720.c 19 | ) 20 | 21 | add_library(hal_jpege_rkv STATIC 22 | ${HAL_JPEGE_HDR} 23 | ${HAL_JPEGE_SRC} 24 | ) 25 | 26 | target_link_libraries(hal_jpege_rkv hal_jpege_com hal_common hal_vepu541_common) 27 | set_target_properties(hal_jpege_rkv PROPERTIES FOLDER "mpp/hal") 28 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/jpege/hal_jpege_vepu511.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2025 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_JPEGE_VEPU511_H__ 7 | #define __HAL_JPEGE_VEPU511_H__ 8 | 9 | #include "mpp_enc_hal.h" 10 | 11 | extern const MppEncHalApi hal_jpege_vepu511; 12 | #define MPP_MAX_JPEG_ROI_NUM 16 13 | #define MPP_MAX_JPEG_ROI_LEVEL 63 14 | 15 | #endif /* __HAL_JPEGE_VEPU511_H__ */ 16 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/jpege/hal_jpege_vepu540c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_JPEGE_VEPU540C_H__ 18 | #define __HAL_JPEGE_VEPU540C_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_jpege_vepu540c; 23 | 24 | #endif /* __HAL_JPEGE_VEPU540C_H__ */ 25 | -------------------------------------------------------------------------------- /mpp/hal/rkenc/jpege/hal_jpege_vpu720.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 */ 2 | /* 3 | * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_JPEGE_VPU720_H__ 7 | #define __HAL_JPEGE_VPU720_H__ 8 | 9 | #include "mpp_enc_hal.h" 10 | 11 | extern const MppEncHalApi hal_jpege_vpu720; 12 | 13 | #endif /* __HAL_JPEGE_VPU720_H__ */ 14 | -------------------------------------------------------------------------------- /mpp/hal/vpu/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | add_subdirectory(common) 4 | 5 | if( HAVE_H263D ) 6 | add_subdirectory(h263d) 7 | endif() 8 | 9 | if( HAVE_MPEG2D ) 10 | add_subdirectory(m2vd) 11 | endif() 12 | 13 | if( HAVE_MPEG4D ) 14 | add_subdirectory(mpg4d) 15 | endif() 16 | 17 | if( HAVE_VP8D ) 18 | add_subdirectory(vp8d) 19 | endif() 20 | 21 | if( HAVE_JPEGD ) 22 | add_subdirectory(jpegd) 23 | endif() 24 | 25 | if( HAVE_AV1D ) 26 | add_subdirectory(av1d) 27 | endif() 28 | 29 | if( HAVE_JPEGE ) 30 | add_subdirectory(jpege) 31 | endif() 32 | 33 | if( HAVE_H264E ) 34 | add_subdirectory(h264e) 35 | endif() 36 | 37 | if( HAVE_VP8E) 38 | add_subdirectory(vp8e) 39 | endif() 40 | -------------------------------------------------------------------------------- /mpp/hal/vpu/av1d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal av1 reg 3 | 4 | include_directories(../../common/av1) 5 | include_directories(../../rkdec/inc) 6 | 7 | set(HAL_AV1D_HDR 8 | ../../common/av1/hal_av1d_common.h 9 | ) 10 | 11 | set(HAL_AV1D_SRC 12 | hal_av1d_vdpu.c 13 | ) 14 | 15 | add_library(hal_av1d_vpu STATIC 16 | ${HAL_AV1D_SRC} 17 | ${HAL_AV1D_HDR} 18 | ) 19 | 20 | set_target_properties(hal_av1d_vpu PROPERTIES FOLDER "mpp/hal") 21 | target_link_libraries(hal_av1d_vpu mpp_base hal_av1d_com) 22 | 23 | #add_subdirectory(test) 24 | -------------------------------------------------------------------------------- /mpp/hal/vpu/av1d/hal_av1d_vdpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_AV1D_VDPU_H__ 18 | #define __HAL_AV1D_VDPU_H__ 19 | 20 | #include "mpp_hal.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppHalApi hal_av1d_vdpu; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __HAL_H264D_VDPU34X_H__ */ -------------------------------------------------------------------------------- /mpp/hal/vpu/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # hal vepu541 common module 5 | add_library(hal_vepu_common STATIC 6 | vepu_common.c vepu_common.h 7 | ) 8 | 9 | target_link_libraries(hal_vepu_common mpp_base) 10 | set_target_properties(hal_vepu_common PROPERTIES FOLDER "mpp/hal") -------------------------------------------------------------------------------- /mpp/hal/vpu/h263d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal h263 reg 3 | 4 | set(HAL_H263D_HDR 5 | hal_h263d_base.h 6 | hal_h263d_vdpu1.h 7 | hal_h263d_vdpu2.h 8 | hal_h263d_vdpu1_reg.h 9 | hal_h263d_vdpu2_reg.h 10 | ) 11 | 12 | set(HAL_H263D_SRC 13 | hal_h263d_api.c 14 | hal_h263d_vdpu1.c 15 | hal_h263d_vdpu2.c 16 | ) 17 | 18 | add_library(hal_h263d STATIC 19 | ${HAL_H263D_SRC} ${HAL_H263D_HDR} 20 | ) 21 | set_target_properties(hal_h263d PROPERTIES FOLDER "mpp/hal") 22 | 23 | target_link_libraries(hal_h263d mpp_base) 24 | 25 | -------------------------------------------------------------------------------- /mpp/hal/vpu/h264e/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | include_directories(../../common/h264/) 4 | include_directories(../../../codec/enc/h264/) 5 | include_directories(../common/) 6 | 7 | # hal h264 header 8 | set(HAL_H264E_HDR 9 | ) 10 | 11 | # hal h264 encoder sourse 12 | set(HAL_H264E_SRC 13 | hal_h264e_vepu2_v2.c 14 | hal_h264e_vepu1_v2.c 15 | hal_h264e_vepu_v2.c 16 | hal_h264e_vpu_tbl.c 17 | ) 18 | 19 | add_library(hal_h264e_vpu STATIC 20 | ${HAL_H264E_HDR} 21 | ${HAL_H264E_SRC} 22 | ) 23 | 24 | target_link_libraries(hal_h264e_vpu hal_h264e_com hal_vepu_common ${CODEC_H264E}) 25 | set_target_properties(hal_h264e_vpu PROPERTIES FOLDER "mpp/hal") 26 | -------------------------------------------------------------------------------- /mpp/hal/vpu/h264e/hal_h264e_vepu1_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264E_VEPU1_H__ 18 | #define __HAL_H264E_VEPU1_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h264e_vepu1; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /mpp/hal/vpu/h264e/hal_h264e_vepu2_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_H264E_VEPU2_H__ 18 | #define __HAL_H264E_VEPU2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_h264e_vepu2; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /mpp/hal/vpu/jpegd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal jpeg reg 3 | 4 | set(HAL_JPEGD_HDR 5 | hal_jpegd_common.h 6 | ) 7 | 8 | set(HAL_JPEGD_SRC 9 | hal_jpegd_api.c 10 | hal_jpegd_common.c 11 | hal_jpegd_vdpu2.c 12 | hal_jpegd_vdpu1.c 13 | hal_jpegd_rkv.c 14 | ) 15 | 16 | add_library(hal_jpegd STATIC 17 | ${HAL_JPEGD_SRC} ${HAL_JPEGD_HDR} 18 | ) 19 | 20 | set_target_properties(hal_jpegd PROPERTIES FOLDER "mpp/hal") 21 | 22 | target_link_libraries(hal_jpegd mpp_base) 23 | 24 | #add_subdirectory(test) 25 | -------------------------------------------------------------------------------- /mpp/hal/vpu/jpegd/hal_jpegd_rkv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_JPEGD_RKV_H__ 17 | #define __HAL_JPEGD_RKV_H__ 18 | 19 | #include "rk_type.h" 20 | 21 | MPP_RET hal_jpegd_rkv_init(void *hal, MppHalCfg *cfg); 22 | MPP_RET hal_jpegd_rkv_deinit(void *hal); 23 | MPP_RET hal_jpegd_rkv_gen_regs(void *hal, HalTaskInfo *syn); 24 | MPP_RET hal_jpegd_rkv_start(void *hal, HalTaskInfo *task); 25 | MPP_RET hal_jpegd_rkv_wait(void *hal, HalTaskInfo *task); 26 | MPP_RET hal_jpegd_rkv_control(void *hal, MpiCmd cmd_type, void *param); 27 | 28 | #endif /* __HAL_JPEGD_RKV_H__ */ 29 | -------------------------------------------------------------------------------- /mpp/hal/vpu/jpege/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal jpeg reg 3 | 4 | include_directories(../common/) 5 | include_directories(../../common/jpeg/) 6 | 7 | set(HAL_JPEGE_HDR 8 | ) 9 | 10 | set(HAL_JPEGE_SRC 11 | hal_jpege_base.c 12 | hal_jpege_vepu1_v2.c 13 | hal_jpege_vepu2_v2.c 14 | ) 15 | 16 | add_library(hal_jpege_vpu STATIC 17 | ${HAL_JPEGE_SRC} 18 | ${HAL_JPEGE_HDR} 19 | ) 20 | 21 | set_target_properties(hal_jpege_vpu PROPERTIES FOLDER "mpp/hal") 22 | target_link_libraries(hal_jpege_vpu hal_vepu_common mpp_base) 23 | -------------------------------------------------------------------------------- /mpp/hal/vpu/jpege/hal_jpege_vepu1_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_JPEGE_VEPU1_V2_H__ 18 | #define __HAL_JPEGE_VEPU1_V2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_jpege_vepu1; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /mpp/hal/vpu/jpege/hal_jpege_vepu2_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * copyright 2017 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 | #ifndef __HAL_JPEGE_VEPU2_V2_H__ 18 | #define __HAL_JPEGE_VEPU2_V2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_jpege_vepu2; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /mpp/hal/vpu/m2vd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #vim: syntax=cmake 2 | include_directories(.) 3 | 4 | #hal m2v decoder api 5 | set(HAL_M2VD_API 6 | ../../inc/hal_m2vd_api.h 7 | ../../../common/m2vd_syntax.h 8 | ) 9 | 10 | #hal m2v header 11 | set(HAL_M2VD_HDR 12 | hal_m2vd_base.h 13 | hal_m2vd_vdpu1_reg.h 14 | hal_m2vd_vdpu2_reg.h 15 | hal_m2vd_vpu1.h 16 | hal_m2vd_vpu2.h 17 | ) 18 | 19 | #hal m2v decoder sourse 20 | set(HAL_M2VD_SRC 21 | hal_m2vd_api.c 22 | hal_m2vd_vdpu1.c 23 | hal_m2vd_vdpu2.c 24 | ) 25 | 26 | add_library(${HAL_MPEG2D} STATIC 27 | ${HAL_M2VD_API} 28 | ${HAL_M2VD_HDR} 29 | ${HAL_M2VD_SRC} 30 | ) 31 | 32 | target_link_libraries(${HAL_MPEG2D} mpp_base) 33 | set_target_properties(${HAL_MPEG2D} PROPERTIES FOLDER "mpp/hal") 34 | 35 | -------------------------------------------------------------------------------- /mpp/hal/vpu/mpg4d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # hal mpeg4 reg 3 | 4 | set(HAL_MPEG4D_HDR 5 | hal_m4vd_com.h 6 | hal_m4vd_vdpu1.h 7 | hal_m4vd_vdpu2.h 8 | hal_m4vd_vdpu1_reg.h 9 | hal_m4vd_vdpu2_reg.h 10 | ) 11 | 12 | set(HAL_MPEG4D_SRC 13 | hal_m4vd_com.c 14 | hal_m4vd_api.c 15 | hal_m4vd_vdpu1.c 16 | hal_m4vd_vdpu2.c 17 | ) 18 | 19 | add_library(${HAL_MPEG4D} STATIC 20 | ${HAL_MPEG4D_SRC} 21 | ${HAL_MPEG4D_HDR} 22 | ) 23 | 24 | set_target_properties(${HAL_MPEG4D} PROPERTIES FOLDER "mpp/hal") 25 | target_link_libraries(${HAL_MPEG4D} mpp_base) 26 | 27 | #add_subdirectory(test) 28 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | include_directories(.) 3 | 4 | # hal vp8 decoder api 5 | set(HAL_VP8D_API 6 | ../../inc/hal_vp8d_api.h 7 | ../../../common/vp8d_syntax.h 8 | ) 9 | 10 | # hal vp8 header 11 | set(HAL_VP8D_HDR 12 | hal_vp8d_base.h 13 | ) 14 | 15 | # hal vp8 decoder sourse 16 | set(HAL_VP8D_SRC 17 | hal_vp8d_api.c 18 | hal_vp8d_vdpu2.c 19 | hal_vp8d_vdpu1.c 20 | ) 21 | 22 | add_library(hal_vp8d STATIC 23 | ${HAL_VP8D_API} 24 | ${HAL_VP8D_HDR} 25 | ${HAL_VP8D_SRC} 26 | ) 27 | 28 | target_link_libraries(hal_vp8d mpp_base) 29 | set_target_properties(hal_vp8d PROPERTIES FOLDER "mpp/hal") 30 | 31 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8d/hal_vp8d_vdpu1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP8D_VDPU1_H__ 18 | #define __HAL_VP8D_VDPU1_H__ 19 | 20 | #include "hal_vp8d_base.h" 21 | 22 | MPP_RET hal_vp8d_vdpu1_init (void *hal, MppHalCfg *cfg); 23 | MPP_RET hal_vp8d_vdpu1_deinit (void *hal); 24 | MPP_RET hal_vp8d_vdpu1_gen_regs(void *hal, HalTaskInfo *task); 25 | MPP_RET hal_vp8d_vdpu1_start (void *hal, HalTaskInfo *task); 26 | MPP_RET hal_vp8d_vdpu1_wait (void *hal, HalTaskInfo *task); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8d/hal_vp8d_vdpu2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP8D_VDPU2_H__ 18 | #define __HAL_VP8D_VDPU2_H__ 19 | 20 | #include "hal_vp8d_base.h" 21 | 22 | MPP_RET hal_vp8d_vdpu2_init (void *hal, MppHalCfg *cfg); 23 | MPP_RET hal_vp8d_vdpu2_deinit (void *hal); 24 | MPP_RET hal_vp8d_vdpu2_gen_regs(void *hal, HalTaskInfo *task); 25 | MPP_RET hal_vp8d_vdpu2_start (void *hal, HalTaskInfo *task); 26 | MPP_RET hal_vp8d_vdpu2_wait (void *hal, HalTaskInfo *task); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8e/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(../common/) 2 | 3 | set(HAL_VP8E_HDR 4 | hal_vp8e_debug.h 5 | hal_vp8e_table.h 6 | hal_vp8e_entropy.h 7 | hal_vp8e_putbit.h 8 | hal_vp8e_base.h 9 | hal_vp8e_vepu1_reg.h 10 | hal_vp8e_vepu2_reg.h 11 | ) 12 | 13 | set(HAL_VP8E_SRC 14 | hal_vp8e_api_v2.c 15 | hal_vp8e_putbit.c 16 | hal_vp8e_table.c 17 | hal_vp8e_entropy.c 18 | hal_vp8e_base.c 19 | hal_vp8e_vepu1_v2.c 20 | hal_vp8e_vepu2_v2.c 21 | ) 22 | 23 | add_library(hal_vp8e STATIC ${HAL_VP8E_SRC}) 24 | 25 | set_target_properties(hal_vp8e PROPERTIES FOLDER "mpp/hal") 26 | target_link_libraries(hal_vp8e mpp_base hal_vepu_common) 27 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8e/hal_vp8e_entropy.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2017 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __HAL_VP8E_ENTROPY_H__ 7 | #define __HAL_VP8E_ENTROPY_H__ 8 | 9 | #include "rk_type.h" 10 | 11 | #include "hal_vp8e_putbit.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | MPP_RET vp8e_init_entropy(void *hal); 18 | MPP_RET vp8e_write_entropy_tables(void *hal); 19 | RK_S32 vp8e_calc_cost_mv(RK_S32 mvd, RK_S32 *mv_prob); 20 | MPP_RET vp8e_calc_coeff_prob(Vp8ePutBitBuf *bitbuf, 21 | RK_S32 (*curr)[4][8][3][11], RK_S32 (*prev)[4][8][3][11]); 22 | MPP_RET vp8e_calc_mv_prob(Vp8ePutBitBuf *bitbuf, 23 | RK_S32 (*curr)[2][19], RK_S32 (*prev)[2][19]); 24 | MPP_RET vp8e_swap_endian(RK_U32 *buf, RK_U32 bytes); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /*__HAL_VP8E_ENTROPY_H__*/ 31 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8e/hal_vp8e_vepu1_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP8E_VEPU1_V2_H__ 18 | #define __HAL_VP8E_VEPU1_V2_H__ 19 | 20 | #include "hal_vp8e_base.h" 21 | #include "mpp_enc_hal.h" 22 | 23 | extern const MppEncHalApi hal_vp8e_vepu1; 24 | 25 | #endif /*__HAL_VP8E_VEPU1_H__*/ 26 | -------------------------------------------------------------------------------- /mpp/hal/vpu/vp8e/hal_vp8e_vepu2_v2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __HAL_VP8E_VEPU2_V2_H__ 18 | #define __HAL_VP8E_VEPU2_V2_H__ 19 | 20 | #include "mpp_enc_hal.h" 21 | 22 | extern const MppEncHalApi hal_vp8e_vepu2; 23 | 24 | #endif /*__HAL_VP8E_VEPU2_H__*/ 25 | -------------------------------------------------------------------------------- /mpp/inc/mpp_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_INFO_H__ 18 | #define __MPP_INFO_H__ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif /* __cplusplus */ 23 | 24 | void show_mpp_version(void); 25 | const char *get_mpp_version(void); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /*__MPP_INFO_H__*/ 32 | -------------------------------------------------------------------------------- /mpp/legacy/vpu_mem_legacy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef _VPU_MEM_H_ 17 | #define _VPU_MEM_H_ 18 | 19 | #include "vpu_api.h" 20 | 21 | typedef struct vpu_display_mem_pool_impl { 22 | vpu_display_mem_pool_FIELDS 23 | MppBufferGroup group; 24 | RK_S32 size; 25 | } vpu_display_mem_pool_impl; 26 | 27 | #endif //_VPU_MEM_H_ -------------------------------------------------------------------------------- /mpp/vproc.cmake: -------------------------------------------------------------------------------- 1 | option(ENABLE_VPROC "Enable video process" ON) 2 | if( ENABLE_VPROC ) 3 | set(HAVE_VPROC true) 4 | add_definitions(-DHAVE_VPROC) 5 | endif() 6 | 7 | option(ENABLE_VPROC_VDPP "Enable video display post processor" OFF) 8 | if( ENABLE_VPROC_VDPP ) 9 | set(HAVE_VPROC_VDPP true) 10 | set(VPROC_VDPP vproc_vdpp) 11 | add_definitions(-DHAVE_VPROC_VDPP) 12 | endif() 13 | -------------------------------------------------------------------------------- /mpp/vproc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add mpp video process implement 5 | # ---------------------------------------------------------------------------- 6 | add_library(mpp_vproc STATIC mpp_dec_vproc.cpp mpp_vproc_dev.cpp) 7 | target_link_libraries(mpp_vproc vproc_rga vproc_iep vproc_iep2 ${VPROC_VDPP} mpp_base) 8 | 9 | add_subdirectory(rga) 10 | add_subdirectory(iep) 11 | add_subdirectory(iep2) 12 | add_subdirectory(vdpp) -------------------------------------------------------------------------------- /mpp/vproc/iep/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add vidoe process IEP (Image Enhancement Processor) implement 5 | # ---------------------------------------------------------------------------- 6 | add_library(vproc_iep STATIC iep.cpp) 7 | set_target_properties(vproc_iep PROPERTIES FOLDER "mpp/vproc/iep") 8 | 9 | add_subdirectory(test) 10 | -------------------------------------------------------------------------------- /mpp/vproc/iep/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # mpp/vproc/iep built-in unit test case 4 | # ---------------------------------------------------------------------------- 5 | # iep unit test 6 | option(IEP_TEST "Build base iep unit test" ${BUILD_TEST}) 7 | add_executable(iep_test iep_test.cpp) 8 | target_link_libraries(iep_test ${MPP_SHARED} utils) 9 | set_target_properties(iep_test PROPERTIES FOLDER "mpp/vproc/iep") 10 | add_test(NAME iep_test COMMAND iep_test) 11 | -------------------------------------------------------------------------------- /mpp/vproc/iep/test/iep_dei.cfg: -------------------------------------------------------------------------------- 1 | [deinterlace] 2 | dei_high_freq_en = 1 3 | dei_mode = 4 4 | dei_high_freq_fct = 0 5 | dei_ei_mode = 0 6 | dei_ei_smooth = 0 7 | dei_ei_sel = 0 8 | dei_ei_radius = 0 9 | -------------------------------------------------------------------------------- /mpp/vproc/iep2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add video process IEP2 (Image Enhancement Processor) implement 5 | # ---------------------------------------------------------------------------- 6 | add_library(vproc_iep2 STATIC iep2.c iep2_ff.c iep2_gmv.c iep2_osd.c iep2_pd.c iep2_roi.c) 7 | set_target_properties(vproc_iep2 PROPERTIES FOLDER "mpp/vproc/iep2") 8 | 9 | add_subdirectory(test) 10 | -------------------------------------------------------------------------------- /mpp/vproc/iep2/iep2_gmv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __IEP2_GMV_H__ 18 | #define __IEP2_GMV_H__ 19 | 20 | #include "iep2.h" 21 | #include "iep2_api.h" 22 | 23 | void iep2_update_gmv(struct iep2_api_ctx *ctx, struct mv_list *ls); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /mpp/vproc/iep2/iep2_osd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __IEP2_OSD_H__ 18 | #define __IEP2_OSD_H__ 19 | 20 | #include "iep2.h" 21 | #include "iep2_api.h" 22 | 23 | struct iep2_api_ctx; 24 | 25 | void iep2_set_osd(struct iep2_api_ctx *ctx, struct mv_list *ls); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /mpp/vproc/iep2/iep2_pd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __IEP2_PD_H__ 18 | #define __IEP2_PD_H__ 19 | 20 | struct iep2_pd_info { 21 | int temporal[5]; 22 | int spatial[5]; 23 | int fcoeff[5]; 24 | int i; 25 | int pdtype; 26 | int step; 27 | }; 28 | 29 | struct iep2_api_ctx; 30 | 31 | void iep2_check_pd(struct iep2_api_ctx *ctx); 32 | int iep2_pd_get_output(struct iep2_pd_info *pd_inf); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /mpp/vproc/iep2/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # mpp/vproc/iep2 built-in unit test case 4 | # ---------------------------------------------------------------------------- 5 | # iep2 unit test 6 | option(IEP2_TEST "Build base iep2 unit test" ON) 7 | add_executable(iep2_test iep2_test.c) 8 | target_link_libraries(iep2_test ${MPP_SHARED} utils) 9 | set_target_properties(iep2_test PROPERTIES FOLDER "mpp/vproc/iep2") 10 | add_test(NAME iep2_test COMMAND iep2_test) 11 | -------------------------------------------------------------------------------- /mpp/vproc/rga/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add vidoe process IEP (Image Enhancement Processor) implement 5 | # ---------------------------------------------------------------------------- 6 | add_library(vproc_rga STATIC rga.cpp) 7 | set_target_properties(vproc_rga PROPERTIES FOLDER "mpp/vproc/rga") 8 | target_link_libraries(vproc_rga mpp_base) 9 | 10 | add_subdirectory(test) 11 | -------------------------------------------------------------------------------- /mpp/vproc/rga/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # mpp/vproc/rga built-in unit test case 4 | # ---------------------------------------------------------------------------- 5 | # rga unit test 6 | option(RGA_TEST "Build base rga unit test" ${BUILD_TEST}) 7 | add_executable(rga_test rga_test.cpp) 8 | target_link_libraries(rga_test ${MPP_SHARED} utils) 9 | set_target_properties(rga_test PROPERTIES FOLDER "mpp/vproc/rga") 10 | add_test(NAME rga_test COMMAND rga_test) 11 | -------------------------------------------------------------------------------- /mpp/vproc/vdpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | 3 | # ---------------------------------------------------------------------------- 4 | # add vdpp (Video Display Post Processor) implement 5 | # ---------------------------------------------------------------------------- 6 | add_library(vproc_vdpp STATIC vdpp_api.c 7 | vdpp.c 8 | vdpp2.c 9 | vdpp_common.c) 10 | set_target_properties(vproc_vdpp PROPERTIES FOLDER "mpp/vproc/vdpp") 11 | 12 | add_subdirectory(test) 13 | 14 | # libvdpp.so for hwpq 15 | add_library(vdpp SHARED hwpq_vdpp_proc.cpp ../../mpp_info.cpp) 16 | set_target_properties(vdpp PROPERTIES FOLDER "mpp/vproc/vdpp") 17 | set_target_properties(vdpp PROPERTIES CLEAN_DIRECT_OUTPUT 1) 18 | target_link_libraries(vdpp osal mpp_base kmpp_base vproc_vdpp) 19 | set_target_properties(vdpp PROPERTIES C_VISIBILITY_PRESET default) 20 | set_target_properties(vdpp PROPERTIES CXX_VISIBILITY_PRESET default) 21 | -------------------------------------------------------------------------------- /mpp/vproc/vdpp/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # mpp/vproc/vdpp built-in unit test case 4 | # ---------------------------------------------------------------------------- 5 | # vdpp unit test 6 | option(VDPP_TEST "Build base vdpp unit test" ON) 7 | add_executable(vdpp_test vdpp_test.c) 8 | target_link_libraries(vdpp_test ${MPP_SHARED} utils vproc_vdpp) 9 | set_target_properties(vdpp_test PROPERTIES FOLDER "mpp/vproc/vdpp") 10 | add_test(NAME vdpp_test COMMAND vdpp_test) 11 | 12 | # hwpq test (call libvdpp.so) 13 | add_executable(hwpq_test hwpq_test.cpp) 14 | target_link_libraries(hwpq_test vdpp) 15 | set_target_properties(hwpq_test PROPERTIES FOLDER "mpp/vproc/vdpp") 16 | add_test(NAME hwpq_test COMMAND hwpq_test) 17 | -------------------------------------------------------------------------------- /osal/allocator/allocator_dma_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rockchip Electronics S.LSI Co. LTD 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 | #ifndef __ALLOCATOR_DMA_HEAP_H__ 18 | #define __ALLOCATOR_DMA_HEAP_H__ 19 | 20 | #include "mpp_allocator_api.h" 21 | 22 | extern os_allocator allocator_dma_heap; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /osal/allocator/allocator_drm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Rockchip Electronics S.LSI Co. LTD 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 | #ifndef __ALLOCATOR_DRM_H__ 18 | #define __ALLOCATOR_DRM_H__ 19 | 20 | #include "mpp_allocator_api.h" 21 | 22 | extern os_allocator allocator_drm; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /osal/allocator/allocator_ext_dma.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rockchip Electronics Co. LTD 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 | #ifndef __ALLOCATOR_EXT_DMA_H__ 18 | #define __ALLOCATOR_EXT_DMA_H__ 19 | 20 | #include "mpp_allocator_api.h" 21 | 22 | extern os_allocator allocator_ext_dma; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /osal/allocator/allocator_ion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __ALLOCATOR_ION_H__ 18 | #define __ALLOCATOR_ION_H__ 19 | 20 | #include "mpp_allocator_api.h" 21 | 22 | extern os_allocator allocator_ion; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /osal/allocator/allocator_std.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __ALLOCATOR_STD_H__ 18 | #define __ALLOCATOR_STD_H__ 19 | 20 | #include "mpp_allocator_api.h" 21 | 22 | extern os_allocator allocator_std; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /osal/inc/mpp_compat_impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_COMPAT_IMPL_H__ 18 | #define __MPP_COMPAT_IMPL_H__ 19 | 20 | #include "rk_type.h" 21 | 22 | extern RK_S32 *compat_ext_fbc_buf_size; 23 | extern RK_S32 *compat_ext_async_input; 24 | extern RK_S32 *compat_ext_fbc_hdr_256_odd; 25 | 26 | #endif /*__MPP_COMPAT_IMPL_H__*/ 27 | -------------------------------------------------------------------------------- /osal/inc/mpp_dmabuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2023 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __MPP_DMABUF_H__ 7 | #define __MPP_DMABUF_H__ 8 | 9 | #include "rk_type.h" 10 | #include "mpp_err.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | MPP_RET mpp_dmabuf_sync_begin(RK_S32 fd, RK_S32 ro, const char *caller); 17 | MPP_RET mpp_dmabuf_sync_end(RK_S32 fd, RK_S32 ro, const char *caller); 18 | MPP_RET mpp_dmabuf_sync_partial_begin(RK_S32 fd, RK_S32 ro, RK_U32 offset, RK_U32 length, const char *caller); 19 | MPP_RET mpp_dmabuf_sync_partial_end(RK_S32 fd, RK_S32 ro, RK_U32 offset, RK_U32 length, const char *caller); 20 | MPP_RET mpp_dmabuf_set_name(RK_S32 fd, const char *name, const char *caller); 21 | 22 | RK_U32 mpp_dmabuf_sync_partial_support(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif /* __MPP_DMABUF_H__ */ -------------------------------------------------------------------------------- /osal/inc/mpp_env.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_ENV_H__ 18 | #define __MPP_ENV_H__ 19 | 20 | #include "rk_type.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | RK_S32 mpp_env_get_u32(const char *name, RK_U32 *value, RK_U32 default_value); 27 | RK_S32 mpp_env_get_str(const char *name, const char **value, const char *default_value); 28 | 29 | RK_S32 mpp_env_set_u32(const char *name, RK_U32 value); 30 | RK_S32 mpp_env_set_str(const char *name, char *value); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /*__MPP_ENV_H__*/ 37 | 38 | -------------------------------------------------------------------------------- /osal/inc/mpp_eventfd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_EVENTFD_H__ 18 | #define __MPP_EVENTFD_H__ 19 | 20 | #include "rk_type.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | RK_S32 mpp_eventfd_get(RK_U32 init); 27 | RK_S32 mpp_eventfd_put(RK_S32 fd); 28 | 29 | RK_S32 mpp_eventfd_read(RK_S32 fd, RK_U64 *val, RK_S64 timeout); 30 | RK_S32 mpp_eventfd_write(RK_S32 fd, RK_U64 val); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /*__MPP_EVENTFD_H__*/ 37 | 38 | -------------------------------------------------------------------------------- /osal/inc/mpp_queue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_QUEUE_H__ 18 | #define __MPP_QUEUE_H__ 19 | 20 | #include "mpp_list.h" 21 | 22 | class MppQueue: public mpp_list 23 | { 24 | private: 25 | sem_t mQueuePending; 26 | int mFlushFlag; 27 | public: 28 | MppQueue(node_destructor func); 29 | ~MppQueue(); 30 | RK_S32 push(void *data, RK_S32 size); 31 | RK_S32 pull(void *data, RK_S32 size); 32 | RK_S32 flush(); 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /osal/inc/mpp_runtime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_RUNTIME__ 18 | #define __MPP_RUNTIME__ 19 | 20 | #include "mpp_buffer.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* 27 | * Runtime function detection is to support different binary on different 28 | * runtime environment. This is usefull on product environemnt. 29 | */ 30 | RK_U32 mpp_rt_allcator_is_valid(MppBufferType type); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /*__MPP_RUNTIME__*/ 37 | 38 | -------------------------------------------------------------------------------- /osal/inc/mpp_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_SERVER_H__ 18 | #define __MPP_SERVER_H__ 19 | 20 | #include "mpp_device.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | MPP_RET mpp_server_attach(MppDev ctx); 27 | MPP_RET mpp_server_detach(MppDev ctx); 28 | 29 | MPP_RET mpp_server_send_task(MppDev ctx); 30 | MPP_RET mpp_server_wait_task(MppDev ctx, RK_S64 timeout); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* __MPP_SERVER_H__ */ 37 | -------------------------------------------------------------------------------- /osal/inc/mpp_service_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_SERVICE_API_H__ 18 | #define __MPP_SERVICE_API_H__ 19 | 20 | #include "mpp_device.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppDevApi mpp_service_api; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __MPP_SERVICE_API_H__ */ 33 | -------------------------------------------------------------------------------- /osal/inc/osal_2str.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #ifndef __OSAL_2STR_H__ 18 | #define __OSAL_2STR_H__ 19 | 20 | #include "mpp_dev_defs.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | const char *strof_client_type(MppClientType type); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /osal/inc/vcodec_service_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Rockchip Electronics Co. LTD 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 | #ifndef __VCODEC_SERVICE_API_H__ 18 | #define __VCODEC_SERVICE_API_H__ 19 | 20 | #include "mpp_device.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const MppDevApi vcodec_service_api; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __VCODEC_SERVICE_API_H__ */ 33 | -------------------------------------------------------------------------------- /osal/linux/os_mem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #if defined(linux) && !defined(__ANDROID__) 18 | #include 19 | #include "os_mem.h" 20 | 21 | int os_malloc(void **memptr, size_t alignment, size_t size) 22 | { 23 | return posix_memalign(memptr, alignment, size); 24 | } 25 | 26 | int os_realloc(void *src, void **dst, size_t alignment, size_t size) 27 | { 28 | (void)alignment; 29 | *dst = realloc(src, size); 30 | return (*dst) ? (0) : (-1); 31 | } 32 | 33 | void os_free(void *ptr) 34 | { 35 | free(ptr); 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /osal/mpp_allocator_api.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 | /* 3 | * Copyright (c) 2023 Rockchip Electronics Co., Ltd. 4 | */ 5 | 6 | #ifndef __MPP_ALLOCATOR_API_H__ 7 | #define __MPP_ALLOCATOR_API_H__ 8 | 9 | #include "mpp_allocator.h" 10 | 11 | typedef MPP_RET (*OsAllocatorFunc)(void *ctx, MppBufferInfo *info); 12 | 13 | typedef struct os_allocator_t { 14 | MppBufferType type; 15 | const char *name; 16 | 17 | MPP_RET (*open)(void **ctx, size_t alignment, MppAllocFlagType flags); 18 | MPP_RET (*close)(void *ctx); 19 | 20 | OsAllocatorFunc alloc; 21 | OsAllocatorFunc free; 22 | OsAllocatorFunc import; 23 | OsAllocatorFunc release; 24 | OsAllocatorFunc mmap; 25 | 26 | /* allocator real flag update callback */ 27 | MppAllocFlagType (*flags)(void *ctx); 28 | } os_allocator; 29 | 30 | #endif /* __MPP_ALLOCATOR_API_H__ */ 31 | -------------------------------------------------------------------------------- /osal/mpp_callback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Rockchip Electronics Co. LTD 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 | #define MODULE_TAG "mpp_callback" 18 | 19 | #include "mpp_callback.h" 20 | 21 | MPP_RET mpp_callback_f(const char *caller, MppCbCtx *ctx, void *param) 22 | { 23 | if (ctx && ctx->ctx && ctx->callBack) 24 | return ctx->callBack(caller, ctx->ctx, ctx->cmd, param); 25 | 26 | return MPP_OK; 27 | } 28 | -------------------------------------------------------------------------------- /osal/os_env.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __OS_ENV_H__ 18 | #define __OS_ENV_H__ 19 | 20 | #include "rk_type.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | RK_S32 os_get_env_u32(const char *name, RK_U32 *value, RK_U32 default_value); 27 | RK_S32 os_get_env_str(const char *name, const char **value, const char *default_value); 28 | 29 | RK_S32 os_set_env_u32(const char *name, RK_U32 value); 30 | RK_S32 os_set_env_str(const char *name, char *value); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /*__OS_ENV_H__*/ 37 | 38 | -------------------------------------------------------------------------------- /osal/os_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #ifndef __OS_MEM_H__ 18 | #define __OS_MEM_H__ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | int os_malloc(void **memptr, size_t alignment, size_t size); 25 | int os_realloc(void *src, void **dst, size_t alignment, size_t size); 26 | void os_free(void *ptr); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /*__OS_MEM_H__*/ 33 | 34 | 35 | -------------------------------------------------------------------------------- /osal/windows/os_mem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rockchip Electronics Co. LTD 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 | #if defined(_WIN32) 18 | #include 19 | #include "os_mem.h" 20 | 21 | int os_malloc(void **memptr, size_t alignment, size_t size) 22 | { 23 | *memptr = _aligned_malloc(size, alignment); 24 | return (*memptr) ? (0) : (-1); 25 | } 26 | 27 | int os_realloc(void *src, void **dst, size_t alignment, size_t size) 28 | { 29 | *dst = _aligned_realloc(src, size, alignment); 30 | return (*dst) ? (0) : (-1); 31 | } 32 | 33 | void os_free(void *ptr) 34 | { 35 | _aligned_free(ptr); 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x64/pthreadGC2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x64/pthreadGC2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x64/pthreadVC2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x64/pthreadVC2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x86/pthreadGC2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x86/pthreadGC2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x86/pthreadGCE2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x86/pthreadGCE2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x86/pthreadVC2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x86/pthreadVC2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x86/pthreadVCE2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x86/pthreadVCE2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/dll/x86/pthreadVSE2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/dll/x86/pthreadVSE2.dll -------------------------------------------------------------------------------- /osal/windows/pthread/lib/x64/pthreadVC2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/lib/x64/pthreadVC2.lib -------------------------------------------------------------------------------- /osal/windows/pthread/lib/x86/pthreadVC2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/lib/x86/pthreadVC2.lib -------------------------------------------------------------------------------- /osal/windows/pthread/lib/x86/pthreadVCE2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/lib/x86/pthreadVCE2.lib -------------------------------------------------------------------------------- /osal/windows/pthread/lib/x86/pthreadVSE2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/osal/windows/pthread/lib/x86/pthreadVSE2.lib -------------------------------------------------------------------------------- /osal/windows/stdint.h: -------------------------------------------------------------------------------- 1 | #if defined(_WIN32) 2 | #pragma once 3 | 4 | /* a minimal set of C99 types for use with MSVC */ 5 | 6 | typedef signed char int8_t; 7 | typedef short int int16_t; 8 | typedef int int32_t; 9 | typedef __int64 int64_t; 10 | 11 | typedef unsigned char uint8_t; 12 | typedef unsigned short int uint16_t; 13 | typedef unsigned int uint32_t; 14 | typedef unsigned __int64 uint64_t; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /pkgconfig/rockchip_mpp.pc.cmake: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 4 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 5 | 6 | Name: rockchip_mpp 7 | Description: Rockchip Media Process Platform 8 | Requires.private: 9 | Version: 1.3.9 10 | Libs: -L${libdir} -lrockchip_mpp 11 | Libs.private: 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /pkgconfig/rockchip_vpu.pc.cmake: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 4 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 5 | 6 | Name: rockchip_vpu 7 | Description: Rockchip Media Process Platform (Legacy) 8 | Requires.private: 9 | Version: 0.3.1 10 | Libs: -L${libdir} -lrockchip_vpu 11 | Libs.private: 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | # Unit test description 2 | 3 | ## There are some unit test for testing mpp functions in this catalog. 4 | 5 | ### mpi_enc_test: 6 | use sync interface(poll,dequeue and enqueue), encode raw yuv to compress video. 7 | 8 | ### mpi_dec_test: 9 | use sync interface and async interface(decode_put_packet and decode_get_frame), 10 | decode compress video to raw yuv. 11 | 12 | ### mpi_rc_test: 13 | encode use detailed bitrate control config. 14 | 15 | ### mpi_rc2_test: 16 | encode use detailed bitrate control config,and cfg param come from mpi_rc.cfg. 17 | 18 | ### mpi_test: 19 | simple description of mpi calling method, just for reference 20 | 21 | ### mpp_event_trigger: 22 | event trigger test. 23 | 24 | ### mpp_parse_cfg: 25 | mpp parser cfg test. 26 | 27 | ### vpu_api_test 28 | encode or decode use legacy interface, in order to compatible with the previous 29 | vpu interface. 30 | -------------------------------------------------------------------------------- /test/mpi_rc.cfg: -------------------------------------------------------------------------------- 1 | [CONFIG] 2 | # index type can be 'frm' or 'msec', frm stand for event trigger at frame index, 3 | # and msec represent event trigger at time (milli second). 4 | index: frm 5 | # loop represent the event will repeat at that point, for example, the first 6 | # index is 1, the last index is 171, and loop is 200, when the last event occur, 7 | # next event will occur after (200 + 1 - 171) times notify. if loop < 0, it 8 | # means there is no loop, event trigger will be stop when all the event had been 9 | # trigger 10 | loop: 200 11 | [EVENT] 12 | #idx bps fps 13 | 0 2000000 30 14 | 40 4000000 30 15 | 100 5000000 30 16 | 150 3000000 30 17 | 171 6000000 27 18 | -------------------------------------------------------------------------------- /test/mpp_parse_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Rockchip Electronics Co. LTD 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 | #ifndef __MPP_PARSE_CFG_H__ 18 | #define __MPP_PARSE_CFG_H__ 19 | 20 | struct rc_event { 21 | union { 22 | int msec; 23 | int frm; 24 | int idx; 25 | }; 26 | float fps; 27 | int bps; 28 | }; 29 | 30 | struct rc_test_config { 31 | int idx_type; 32 | int loop; 33 | struct rc_event event[128]; 34 | int event_cnt; 35 | }; 36 | 37 | int mpp_parse_config(char *cfg_url, struct rc_test_config *ea); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /tools/AStyle.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/tools/AStyle.exe -------------------------------------------------------------------------------- /tools/TextEncoding.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/tools/TextEncoding.exe -------------------------------------------------------------------------------- /tools/astyle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HermanChen/mpp/79806e631485dcbb8eb26feaeacf51184e8e6852/tools/astyle -------------------------------------------------------------------------------- /tools/astylerc: -------------------------------------------------------------------------------- 1 | # directory setting 2 | --exclude=../build 3 | --exclude=../osal/windows/pthread 4 | --exclude=../osal/linux/drm.h 5 | 6 | # bracket style setting 7 | --style=linux 8 | #--style=kr 9 | 10 | # indent setting 11 | --indent=spaces=4 12 | --indent-labels 13 | #--indent-switches 14 | #--indent-preprocessor 15 | --min-conditional-indent=0 16 | --max-instatement-indent=80 17 | 18 | # padding setting 19 | #--break-blocks 20 | --pad-oper 21 | #--pad-first-paren-out 22 | --pad-header 23 | #--unpad-paren 24 | #--align-pointer=name 25 | 26 | # formatting setting 27 | --keep-one-line-blocks 28 | --keep-one-line-statements 29 | --convert-tabs 30 | 31 | # other setting 32 | #--quiet 33 | --suffix=none 34 | #--lineend=windows 35 | -------------------------------------------------------------------------------- /tools/hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | out_file="./fmt_df.txt" 4 | cur_dir=$(pwd) 5 | script_dir=tools/ 6 | 7 | echo "[git-hook]: before commit, format code use mpp_astyle.sh ..." 8 | 9 | cd $script_dir 10 | ./mpp_astyle.sh 11 | 12 | cd $cur_dir 13 | 14 | git status -s | grep "^MM " > $out_file 15 | 16 | if [ -s $out_file ] 17 | then { 18 | echo "[git-hook]: code changed after formating, please commit again." 19 | rm $out_file 20 | echo "[git-hook]: git status below:" 21 | git status 22 | exit 1 23 | } else { 24 | echo "[git-hook]: nothing change after formating, commit continues." 25 | if [ -f $out_file ] 26 | then { 27 | rm $out_file 28 | } fi 29 | exit 0 30 | } fi 31 | 32 | -------------------------------------------------------------------------------- /tools/mpp_astyle.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | astyle.exe --options=astylerc --recursive ../*.cpp ../*.c ../*.h 3 | pause 4 | -------------------------------------------------------------------------------- /tools/mpp_astyle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | ./astyle --quiet --options=astylerc --recursive "../*.cpp" "../*.c" "../*.h" 4 | 5 | -------------------------------------------------------------------------------- /tools/yuvplay: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | W=$1 4 | H=$2 5 | SRC=$3 6 | mplayer $SRC -loop 0 -demuxer rawvideo -fps 25 -rawvideo w=$W:h=$H:size=$(($W*$H*3/2)):format=nv12 7 | -------------------------------------------------------------------------------- /utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # vim: syntax=cmake 2 | # ---------------------------------------------------------------------------- 3 | # add libvpu implement 4 | # ---------------------------------------------------------------------------- 5 | include_directories(${PROJECT_SOURCE_DIR}/mpp/base/inc) 6 | 7 | add_library(utils STATIC 8 | mpp_enc_roi_utils.c 9 | mpi_enc_utils.c 10 | mpi_dec_utils.c 11 | mpp_opt.c 12 | utils.c 13 | iniparser.c 14 | dictionary.c 15 | camera_source.c 16 | ) 17 | 18 | target_link_libraries(utils mpp_base) 19 | --------------------------------------------------------------------------------