mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 12:15:32 -06:00
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
* dummy videocodec * filled videodec parameters * vdec1 implementation * clang format fix * fixed codecType * added crop offset info * align output * align all h/w * some touchups * small touch (last one)
38 lines
985 B
C++
38 lines
985 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "videodec.h"
|
|
|
|
extern "C" {
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavutil/imgutils.h>
|
|
#include <libswscale/swscale.h>
|
|
}
|
|
|
|
namespace Libraries::Videodec {
|
|
|
|
class VdecDecoder {
|
|
public:
|
|
VdecDecoder(const OrbisVideodecConfigInfo& pCfgInfoIn,
|
|
const OrbisVideodecResourceInfo& pRsrcInfoIn);
|
|
~VdecDecoder();
|
|
s32 Decode(const OrbisVideodecInputData& pInputDataIn,
|
|
OrbisVideodecFrameBuffer& pFrameBufferInOut,
|
|
OrbisVideodecPictureInfo& pPictureInfoOut);
|
|
s32 Flush(OrbisVideodecFrameBuffer& pFrameBufferInOut,
|
|
OrbisVideodecPictureInfo& pPictureInfoOut);
|
|
s32 Reset();
|
|
|
|
private:
|
|
AVFrame* ConvertNV12Frame(AVFrame& frame);
|
|
|
|
private:
|
|
AVCodecContext* mCodecContext = nullptr;
|
|
SwsContext* mSwsContext = nullptr;
|
|
};
|
|
|
|
} // namespace Libraries::Videodec
|