From c67a3bc3c88006cec43487e36d6b6921efb5caac Mon Sep 17 00:00:00 2001 From: haorui wang <1905811497@qq.com> Date: Sat, 31 Aug 2024 13:59:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[what][bugfix][h264]=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- H264SliceDecodingProcess.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/H264SliceDecodingProcess.cpp b/H264SliceDecodingProcess.cpp index ed6dde0..29b2319 100644 --- a/H264SliceDecodingProcess.cpp +++ b/H264SliceDecodingProcess.cpp @@ -940,13 +940,13 @@ void H264SliceDecodingProcess::InitializationProcessForReferencePictureLists(H26 { ss << "-- (" << i << ") Type(" << refTypeToStr(_RefPicList1[i]->referenceFlag) << ") " << "FrameNum(" << _RefPicList1[i]->FrameNum << ")"; - if (_RefPicList0[i]->referenceFlag & H264PictureContext::used_for_short_term_reference) + if (_RefPicList1[i]->referenceFlag & H264PictureContext::used_for_short_term_reference) { - ss << " PicOrderCnt(" << PicOrderCnt(_RefPicList0[i]) << ") PicNum(" << _RefPicList0[i]->PicNum << ")"; + ss << " PicOrderCnt(" << PicOrderCnt(_RefPicList1[i]) << ") PicNum(" << _RefPicList1[i]->PicNum << ")"; } - else if (_RefPicList0[i]->referenceFlag & H264PictureContext::used_for_long_term_reference) + else if (_RefPicList1[i]->referenceFlag & H264PictureContext::used_for_long_term_reference) { - ss << " LongTermPicNum(" << _RefPicList0[i]->LongTermPicNum << ")"; + ss << " LongTermPicNum(" << _RefPicList1[i]->LongTermPicNum << ")"; } if (i + 1 != _RefPicList1.size()) { From f4b91533ea6a6e8ea3f71ea062731bab7e2aa291 Mon Sep 17 00:00:00 2001 From: haorui wang <1905811497@qq.com> Date: Sat, 7 Sep 2024 10:40:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[what][doc]=20=E8=A1=A5=E5=85=85=E8=8B=B1?= =?UTF-8?q?=E6=96=87=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ README_en.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 README_en.md diff --git a/README.md b/README.md index bd5be81..a010f4e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # MMP-H264 +简体中文 | [English](./README_en.md) + ## 概述 轻量级 H264 语法解析. diff --git a/README_en.md b/README_en.md new file mode 100644 index 0000000..3c19ae7 --- /dev/null +++ b/README_en.md @@ -0,0 +1,35 @@ +# MMP-H264 + +English | [简体中文](./README.md) + +## Overview + +Lightweight H264 syntax parser. + +## Features + +- Written in C11, adhering to RAII standards for simple memory management +- Consistent with the syntax parsing style of ISO 14496-10 (2020-12) for easy reference +- Written using STL, can be independently built and compiled for easy integration + +## How to Use + +Implement `AbstractH264ByteReader`. For specific usage, refer to `main.cpp`. + +## About Logging + +Generally, SDK logging management can be categorized into different methods, such as: + +- Internal maintenance, where the SDK caller specifies the log storage location +- External export, providing methods like log callbacks + +Or both methods can coexist. + +However, `MMP-H26X` is a very lightweight H264/H265 syntax parsing library, typically included directly as source code rather than as a dynamic or static library. Therefore, the logging export method of `MMP-H26X` is implemented through predefined macro definition anchors. For specific examples, refer to: `https://github.com/HR1025/MMP-Core/pull/5` + +> Additionally, `MMP-CORE` also serves as a code reference example for `MMP-H26X`. + +## TODO + +- Implement H264 syntax encapsulation +- Support H265 (HEVC) syntax parsing encapsulation# MMP-H264 \ No newline at end of file