JM8.6コーデックでtrace_Enc.txtとtrace_dec.txtファイルの機能
5428 ワード
前の博文はすでに言ったように、JM 8で.6エンコーディング端子はtrace_を開く方法Enc.txt機能およびtraceの利用方法Enc.txtファイルの情報は、符号ストリームを解析するものであり、ここでは、言うまでもない.復号側でtraceを開く方法を見てみましょう.dec.txt. JM 8.6復号側のdefine.hファイルには:
コードを下に変更するだけでtraceを開くことができます.dec.txtの機能:
ここでは実際にC言語の条件コンパイルを用いる、traceを制御するスイッチをプロファイルに入れてもよいが、プログラムにはコンパイルするコードが多くなり、これはよくなく、性能に影響を与える.だから、条件でコンパイルしたほうがいい.
生成されたtrace_dec.txtファイルの一部の内容は:
Annex B NALU w/long startcode, len 8, forbidden_bit 0, nal_reference_idc 3, nal_unit_type 7
@0 SPS: profile_idc 01000010 ( 66) @8 SPS: constrained_set0_flag 0 ( 0) @9 SPS: constrained_set1_flag 0 ( 0) @10 SPS: constrained_set2_flag 0 ( 0) @11 SPS: reserved_zero_5bits 00000 ( 0) @16 SPS: level_idc 00011110 ( 30) @24 SPS: seq_parameter_set_id 1 ( 0) @25 SPS: log2_max_frame_num_minus4 1 ( 0) @26 SPS: pic_order_cnt_type 1 ( 0) @27 SPS: log2_max_pic_order_cnt_lsb_minus4 1 ( 0) @28 SPS: num_ref_frames 0001011 ( 10) @35 SPS: gaps_in_frame_num_value_allowed_flag 0 ( 0) @36 SPS: pic_width_in_mbs_minus1 0001011 ( 10) @43 SPS: pic_height_in_map_units_minus1 0001001 ( 8) @50 SPS: frame_mbs_only_flag 1 ( 1) @51 SPS: direct_8x8_inference_flag 0 ( 0) @52 SPS: frame_cropping_flag 0 ( 0) @53 SPS: vui_parameters_present_flag 0 ( 0)
Annex B NALU w/long startcode, len 5, forbidden_bit 0, nal_reference_idc 3, nal_unit_type 8
@54 PPS: pic_parameter_set_id 1 ( 0) @55 PPS: seq_parameter_set_id 1 ( 0) @56 PPS: entropy_coding_mode_flag 0 ( 0) @57 PPS: pic_order_present_flag 0 ( 0) @58 PPS: num_slice_groups_minus1 1 ( 0) @59 PPS: num_ref_idx_l0_active_minus1 0001010 ( 9) @66 PPS: num_ref_idx_l1_active_minus1 0001010 ( 9) @73 PPS: weighted prediction flag 0 ( 0) @74 PPS: weighted_bipred_idc 00 ( 0) @76 PPS: pic_init_qp_minus26 1 ( 0) @77 PPS: pic_init_qs_minus26 1 ( 0) @78 PPS: chroma_qp_index_offset 1 ( 0) @79 PPS: deblocking_filter_control_present_flag 0 ( 0) @80 PPS: constrained_intra_pred_flag 0 ( 0) @81 PPS: redundant_pic_cnt_present_flag 0 ( 0)
Last NALU in File
Annex B NALU w/long startcode, len 2741, forbidden_bit 0, nal_reference_idc 3, nal_unit_type 5
@82 SH: first_mb_in_slice 1 ( 0) @83 SH: slice_type 0001000 ( 7) @90 SH: pic_parameter_set_id 1 ( 0) @91 SH: frame_num 0000 ( 0) @95 SH: idr_pic_id 1 ( 0) @96 SH: pic_order_cnt_lsb 0000 ( 0) @100 SH: no_output_of_prior_pics_flag 0 ( 0) @101 SH: long_term_reference_flag 0 ( 0) @102 SH: slice_qp_delta 00100 ( 2)
*********** POC: 0 (I/P) MB: 0 Slice: 0 Type 2 ********** @107 mb_type 1 ( 0) @108 intra4x4_pred_mode 1 ( -1) @109 intra4x4_pred_mode 0001 ( 1) @113 intra4x4_pred_mode 1 ( -1) @114 intra4x4_pred_mode 0110 ( 6) @118 intra4x4_pred_mode 0001 ( 1) @122 intra4x4_pred_mode 0111 ( 7) @126 intra4x4_pred_mode 1 ( -1) @127 intra4x4_pred_mode 1 ( -1) @128 intra4x4_pred_mode 0000 ( 0)
......
以上より、JM 8の解析を補助することができる.6復号側は、符号ストリームをどのように解析するか(すなわち、NALUをどのように解析するか).
#if defined _DEBUG
#define TRACE 0 //!< 0:Trace off 1:Trace on
#else
#define TRACE 0 //!< 0:Trace off 1:Trace on
#endif
コードを下に変更するだけでtraceを開くことができます.dec.txtの機能:
#if defined _DEBUG
#define TRACE 1 //!< 0:Trace off 1:Trace on
#else
#define TRACE 0 //!< 0:Trace off 1:Trace on
#endif
ここでは実際にC言語の条件コンパイルを用いる、traceを制御するスイッチをプロファイルに入れてもよいが、プログラムにはコンパイルするコードが多くなり、これはよくなく、性能に影響を与える.だから、条件でコンパイルしたほうがいい.
生成されたtrace_dec.txtファイルの一部の内容は:
Annex B NALU w/long startcode, len 8, forbidden_bit 0, nal_reference_idc 3, nal_unit_type 7
@0 SPS: profile_idc 01000010 ( 66) @8 SPS: constrained_set0_flag 0 ( 0) @9 SPS: constrained_set1_flag 0 ( 0) @10 SPS: constrained_set2_flag 0 ( 0) @11 SPS: reserved_zero_5bits 00000 ( 0) @16 SPS: level_idc 00011110 ( 30) @24 SPS: seq_parameter_set_id 1 ( 0) @25 SPS: log2_max_frame_num_minus4 1 ( 0) @26 SPS: pic_order_cnt_type 1 ( 0) @27 SPS: log2_max_pic_order_cnt_lsb_minus4 1 ( 0) @28 SPS: num_ref_frames 0001011 ( 10) @35 SPS: gaps_in_frame_num_value_allowed_flag 0 ( 0) @36 SPS: pic_width_in_mbs_minus1 0001011 ( 10) @43 SPS: pic_height_in_map_units_minus1 0001001 ( 8) @50 SPS: frame_mbs_only_flag 1 ( 1) @51 SPS: direct_8x8_inference_flag 0 ( 0) @52 SPS: frame_cropping_flag 0 ( 0) @53 SPS: vui_parameters_present_flag 0 ( 0)
Annex B NALU w/long startcode, len 5, forbidden_bit 0, nal_reference_idc 3, nal_unit_type 8
@54 PPS: pic_parameter_set_id 1 ( 0) @55 PPS: seq_parameter_set_id 1 ( 0) @56 PPS: entropy_coding_mode_flag 0 ( 0) @57 PPS: pic_order_present_flag 0 ( 0) @58 PPS: num_slice_groups_minus1 1 ( 0) @59 PPS: num_ref_idx_l0_active_minus1 0001010 ( 9) @66 PPS: num_ref_idx_l1_active_minus1 0001010 ( 9) @73 PPS: weighted prediction flag 0 ( 0) @74 PPS: weighted_bipred_idc 00 ( 0) @76 PPS: pic_init_qp_minus26 1 ( 0) @77 PPS: pic_init_qs_minus26 1 ( 0) @78 PPS: chroma_qp_index_offset 1 ( 0) @79 PPS: deblocking_filter_control_present_flag 0 ( 0) @80 PPS: constrained_intra_pred_flag 0 ( 0) @81 PPS: redundant_pic_cnt_present_flag 0 ( 0)
Last NALU in File
Annex B NALU w/long startcode, len 2741, forbidden_bit 0, nal_reference_idc 3, nal_unit_type 5
@82 SH: first_mb_in_slice 1 ( 0) @83 SH: slice_type 0001000 ( 7) @90 SH: pic_parameter_set_id 1 ( 0) @91 SH: frame_num 0000 ( 0) @95 SH: idr_pic_id 1 ( 0) @96 SH: pic_order_cnt_lsb 0000 ( 0) @100 SH: no_output_of_prior_pics_flag 0 ( 0) @101 SH: long_term_reference_flag 0 ( 0) @102 SH: slice_qp_delta 00100 ( 2)
*********** POC: 0 (I/P) MB: 0 Slice: 0 Type 2 ********** @107 mb_type 1 ( 0) @108 intra4x4_pred_mode 1 ( -1) @109 intra4x4_pred_mode 0001 ( 1) @113 intra4x4_pred_mode 1 ( -1) @114 intra4x4_pred_mode 0110 ( 6) @118 intra4x4_pred_mode 0001 ( 1) @122 intra4x4_pred_mode 0111 ( 7) @126 intra4x4_pred_mode 1 ( -1) @127 intra4x4_pred_mode 1 ( -1) @128 intra4x4_pred_mode 0000 ( 0)
......
以上より、JM 8の解析を補助することができる.6復号側は、符号ストリームをどのように解析するか(すなわち、NALUをどのように解析するか).