Skip to content

Commit

Permalink
Merge pull request #48 from HR1025/h264
Browse files Browse the repository at this point in the history
H264
  • Loading branch information
HR1025 authored Sep 7, 2024
2 parents d9a7233 + f4b9153 commit 90aeb0d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
8 changes: 4 additions & 4 deletions H264SliceDecodingProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MMP-H264

简体中文 | [English](./README_en.md)

## 概述

轻量级 H264 语法解析.
Expand Down
35 changes: 35 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 90aeb0d

Please sign in to comment.