Skip to content

Commit

Permalink
Merge branch 'Aleksoid1978:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackjjang authored Jan 22, 2024
2 parents 44a00a2 + bb773c2 commit b56b848
Show file tree
Hide file tree
Showing 130 changed files with 2,746 additions and 833 deletions.
11 changes: 9 additions & 2 deletions docs/Changelog.Rus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

1.6.11.x dev
=============================
MpegSplitter
Добавлена поддержка видео VVC(H.266).

MP4Splitter
Добавлена поддержка кодека VVC(H.266).
Добавлена поддержка видео VVC(H.266).

RawVideoSplitter
Добавлена поддержка видео VVC(H.266).

MPCVideoDec
Добавлена поддержка режима D3D12 copy back.
Expand All @@ -13,13 +18,15 @@ MPCVideoDec

Плеер
Добавлена возможность открыть папку воспроизводимого файла с помощью горячей клавиши.
Не показываем нулевые часы при отображении времени.
Немного изменена логика смещения кадра относительно центра окна.

Обновлен французский перевод (автор rhahgleuhargh).
Обновлен итальянский перевод (автор mapi68).
Обновлен корейский перевод (автор Hackjjang).

Обновлены библиотеки:
ffmpeg git-n6.2-dev-694-g90bef6390f;
ffmpeg git-n6.2-dev-848-gd2eb6f4d44;
nanosvg git-93ce879.


Expand Down
12 changes: 10 additions & 2 deletions docs/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

1.6.11.x dev
=============================
MpegSplitter
Added support for VVC(H.266) video.

MP4Splitter
Added support for VVC(H.266) codec.
Added support for VVC(H.266) video.

RawVideoSplitter
Added support for VVC(H.266) video.

MPCVideoDec
Added support for D3D12 copy back mode.
Expand All @@ -12,13 +18,15 @@ Added AVS3 support for external filter.

Player
Added the ability to open the folder of the currently playing file using a hotkey.
Do not show zero hours when displaying time.
Changed the logic of frame offset relative to the center of the window.

Updated French translation (by rhahgleuhargh).
Updated Italian translation (by mapi68).
Updated Korean translation (by Hackjjang).

Updated libraries:
ffmpeg git-n6.2-dev-694-g90bef6390f;
ffmpeg git-n6.2-dev-848-gd2eb6f4d44;
nanosvg git-93ce879.


Expand Down
1 change: 1 addition & 0 deletions docs/custom_code/ffmpeg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* libavcodec/aacsbr_template.c
* libavcodec/bsf_list.c
* libavcodec/codec_list.c
* libavcodec/d3d12va_vc1.c
* libavcodec/dxva2.c
* libavcodec/dxva2_hevc.c
* libavcodec/dxva2_internal.h
Expand Down
8 changes: 6 additions & 2 deletions src/DSUtil/DSUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,15 +1046,19 @@ REFERENCE_TIME TimecodeToReftime(TimeCode_t tc)
}

// hh:mm::ss.millisec
CStringW ReftimeToString(REFERENCE_TIME rt)
CStringW ReftimeToString(REFERENCE_TIME rt, bool showZeroHours /* = true*/)
{
if (rt == INVALID_TIME) {
return L"INVALID TIME";
}

TimeCode_t tc = ReftimeToTimecode(rt);
CStringW str;
str.Format(L"%02d:%02d:%02d.%03d", tc.Hours, tc.Minutes, tc.Seconds, tc.Milliseconds);
if (tc.Hours || showZeroHours) {
str.Format(L"%02d:%02d:%02d.%03d", tc.Hours, tc.Minutes, tc.Seconds, tc.Milliseconds);
} else {
str.Format(L"%02d:%02d.%03d", tc.Minutes, tc.Seconds, tc.Milliseconds);
}

return str;
}
Expand Down
5 changes: 3 additions & 2 deletions src/DSUtil/DSUtil.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
* (C) 2006-2023 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -100,10 +100,11 @@ enum cdrom_t {
extern cdrom_t GetCDROMType(WCHAR drive, std::list<CString>& files);
extern CString GetDriveLabel(WCHAR drive);

inline bool HourOrMore(const REFERENCE_TIME rt) { return (rt > UNITS * 3600); };
TimeCode_t ReftimeToTimecode(const REFERENCE_TIME rt);
TimeCode_t ReftimeToHMS(const REFERENCE_TIME rt); // seconds rounded to the nearest value
REFERENCE_TIME TimecodeToReftime(const TimeCode_t tc);
CStringW ReftimeToString(const REFERENCE_TIME rt); // hh:mm::ss.millisec
CStringW ReftimeToString(const REFERENCE_TIME rt, bool showZeroHours = true); // hh:mm::ss.millisec
CStringW ReftimeToString2(const REFERENCE_TIME rt, bool showZeroHours = true); // hh:mm::ss (round)

extern DVD_HMSF_TIMECODE RT2HMSF(REFERENCE_TIME rt, double fps = 0); // use to remember the current position
Expand Down
7 changes: 6 additions & 1 deletion src/DSUtil/GolombBuffer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2006-2023 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -135,6 +135,11 @@ int CGolombBuffer::GetPos() const
return m_nBitPos - (m_bitlen >> 3);
}

int CGolombBuffer::GetBitsPos() const
{
return m_nBitPos * 8 - m_bitlen;
}

void CGolombBuffer::ReadBuffer(BYTE* pDest, int nSize)
{
ASSERT(m_nBitPos + nSize <= m_nSize);
Expand Down
3 changes: 2 additions & 1 deletion src/DSUtil/GolombBuffer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2006-2023 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -51,6 +51,7 @@ class CGolombBuffer
int BitsLeft() const { return 8 * RemainingSize() + m_bitlen; }
bool IsEOF() const { return m_nBitPos >= m_nSize; }
int GetPos() const;
int GetBitsPos() const;
const BYTE* GetBufferPos() const { return m_pBuffer + m_nBitPos; }

void SkipBytes(const int nCount);
Expand Down
12 changes: 11 additions & 1 deletion src/DSUtil/H264Nalu.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2006-2022 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -120,3 +120,13 @@ bool CH265Nalu::ReadNext()

return false;
}

bool CH266Nalu::ReadNext()
{
if (__super::ReadNext()) {
nal_unit_type = static_cast<NALU_TYPE>((m_pBuffer[m_nNALDataPos + 1] >> 3) & 0x1f);
return true;
}

return false;
}
45 changes: 42 additions & 3 deletions src/DSUtil/H264Nalu.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2006-2018 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -43,12 +43,45 @@ enum NALU_TYPE {
NALU_TYPE_HEVC_BLA_N_LP = 18,
NALU_TYPE_HEVC_IDR_W_RADL = 19,
NALU_TYPE_HEVC_IDR_N_LP = 20,
NALU_TYPE_HEVC_CRA_NUT = 21,
NALU_TYPE_HEVC_CRA = 21,
NALU_TYPE_HEVC_VPS = 32,
NALU_TYPE_HEVC_SPS = 33,
NALU_TYPE_HEVC_PPS = 34,
NALU_TYPE_HEVC_AUD = 35,
NALU_TYPE_HEVC_SEI_PREFIX = 39
NALU_TYPE_HEVC_SEI_PREFIX = 39,
// VVC
NALU_TYPE_VVC_TRAIL = 0,
NALU_TYPE_VVC_STSA = 1,
NALU_TYPE_VVC_RADL = 2,
NALU_TYPE_VVC_RASL = 3,
NALU_TYPE_VVC_RSV_VCL_4 = 4,
NALU_TYPE_VVC_RSV_VCL_5 = 5,
NALU_TYPE_VVC_RSV_VCL_6 = 6,
NALU_TYPE_VVC_IDR_W_RADL = 7,
NALU_TYPE_VVC_IDR_N_LP = 8,
NALU_TYPE_VVC_CRA = 9,
NALU_TYPE_VVC_GDR = 10,
NALU_TYPE_VVC_RSV_IRAP_11 = 11,
NALU_TYPE_VVC_OPI = 12,
NALU_TYPE_VVC_DCI = 13,
NALU_TYPE_VVC_VPS = 14,
NALU_TYPE_VVC_SPS = 15,
NALU_TYPE_VVC_PPS = 16,
NALU_TYPE_VVC_PREFIX_APS = 17,
NALU_TYPE_VVC_SUFFIX_APS = 18,
NALU_TYPE_VVC_PH = 19,
NALU_TYPE_VVC_AUD = 20,
NALU_TYPE_VVC_EOS = 21,
NALU_TYPE_VVC_EOB = 22,
NALU_TYPE_VVC_PREFIX_SEI = 23,
NALU_TYPE_VVC_SUFFIX_SEI = 24,
NALU_TYPE_VVC_FD = 25,
NALU_TYPE_VVC_RSV_NVCL_26 = 26,
NALU_TYPE_VVC_RSV_NVCL_27 = 27,
NALU_TYPE_VVC_UNSPEC_28 = 28,
NALU_TYPE_VVC_UNSPEC_29 = 29,
NALU_TYPE_VVC_UNSPEC_30 = 30,
NALU_TYPE_VVC_UNSPEC_31 = 31
};

class CH264Nalu
Expand Down Expand Up @@ -99,3 +132,9 @@ class CH265Nalu : public CH264Nalu
bool ReadNext();
};

class CH266Nalu : public CH264Nalu
{
public:
CH266Nalu() : CH264Nalu() {};
bool ReadNext();
};
21 changes: 19 additions & 2 deletions src/DSUtil/MediaDescription.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2006-2023 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -72,6 +72,7 @@ CString GetMediaTypeDesc(const CMediaType* pmt, LPCWSTR pName)

bool bIsAVC = false;
bool bIsHEVC = false;
bool bIsVVC = false;
bool bIsMPEG2 = false;

if (pInfo->hdr.bmiHeader.biCompression == FCC('AVC1') || pInfo->hdr.bmiHeader.biCompression == FCC('H264')) {
Expand All @@ -91,9 +92,13 @@ CString GetMediaTypeDesc(const CMediaType* pmt, LPCWSTR pName)
bIsMPEG2 = true;
bAdd = TRUE;
} else if (pInfo->hdr.bmiHeader.biCompression == FCC('HEVC') || pInfo->hdr.bmiHeader.biCompression == FCC('HVC1')) {
Infos.emplace_back(L"HEVC");
Infos.emplace_back(L"H.265/HEVC");
bIsHEVC = true;
bAdd = TRUE;
} else if (pInfo->hdr.bmiHeader.biCompression == FCC('VVC1')) {
Infos.emplace_back(L"H.266/VVC");
bIsVVC = true;
bAdd = TRUE;
}

if (bIsMPEG2) {
Expand Down Expand Up @@ -147,6 +152,18 @@ CString GetMediaTypeDesc(const CMediaType* pmt, LPCWSTR pName)
Infos.emplace_back(FormatString(L"Profile %u", pInfo->dwProfile));
break;
}
} else if (bIsVVC) {
switch (pInfo->dwProfile) {
case 1:
Infos.emplace_back(L"Main/10 Profile");
break;
case 33:
Infos.emplace_back(L"Main/10 4:4:4 Profile");
break;
default:
Infos.emplace_back(FormatString(L"Profile %u", pInfo->dwProfile));
break;
}
} else {
Infos.emplace_back(FormatString(L"Profile %u", pInfo->dwProfile));
}
Expand Down
3 changes: 2 additions & 1 deletion src/DSUtil/Mpeg2Def.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2006-2022 see Authors.txt
* (C) 2006-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -57,6 +57,7 @@ enum PES_STREAM_TYPE {
VIDEO_STREAM_MPEG2_ADDITIONAL_VIEW = 0x22, // Additional view Rec. ITU-T H.262 - ISO/IEC 13818-2 video stream for service-compatible stereoscopic 3D services
VIDEO_STREAM_H264_ADDITIONAL_VIEW = 0x23, // Additional view Rec. ITU-T H.264 - ISO/IEC 14496-10 video stream for service-compatible stereoscopic 3D services
VIDEO_STREAM_HEVC = 0x24,
VIDEO_STREAM_VVC = 0x33,
AUDIO_STREAM_LPCM = 0x80,
AUDIO_STREAM_AC3 = 0x81,
AUDIO_STREAM_DTS = 0x82,
Expand Down
Loading

0 comments on commit b56b848

Please sign in to comment.