mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-27 05:17:10 -06:00
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "videodec2.h"
|
|
|
|
extern "C" {
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavutil/imgutils.h>
|
|
#include <libswscale/swscale.h>
|
|
}
|
|
|
|
namespace Libraries::Vdec2 {
|
|
|
|
extern std::vector<OrbisVideodec2AvcPictureInfo> gPictureInfos;
|
|
|
|
class VdecDecoder {
|
|
public:
|
|
VdecDecoder(const OrbisVideodec2DecoderConfigInfo& configInfo,
|
|
const OrbisVideodec2DecoderMemoryInfo& memoryInfo);
|
|
~VdecDecoder();
|
|
|
|
s32 Decode(const OrbisVideodec2InputData& inputData, OrbisVideodec2FrameBuffer& frameBuffer,
|
|
OrbisVideodec2OutputInfo& outputInfo);
|
|
s32 Flush(OrbisVideodec2FrameBuffer& frameBuffer, OrbisVideodec2OutputInfo& outputInfo);
|
|
s32 Reset();
|
|
|
|
private:
|
|
AVFrame* ConvertNV12Frame(AVFrame& frame);
|
|
|
|
private:
|
|
AVCodecContext* mCodecContext = nullptr;
|
|
SwsContext* mSwsContext = nullptr;
|
|
};
|
|
|
|
} // namespace Libraries::Vdec2
|