diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/command_classes/codecs/codec.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/h264.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/h264.h | 6 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/vp8.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/vp8.h | 5 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/vp9.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/vp9.h | 3 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp index cf5ede204..916277811 100644 --- a/src/video_core/command_classes/codecs/codec.cpp +++ b/src/video_core/command_classes/codecs/codec.cpp | |||
| @@ -183,11 +183,11 @@ void Codec::Decode() { | |||
| 183 | const auto& frame_data = [&]() { | 183 | const auto& frame_data = [&]() { |
| 184 | switch (current_codec) { | 184 | switch (current_codec) { |
| 185 | case Tegra::NvdecCommon::VideoCodec::H264: | 185 | case Tegra::NvdecCommon::VideoCodec::H264: |
| 186 | return h264_decoder->ComposeFrameHeader(state, is_first_frame); | 186 | return h264_decoder->ComposeFrame(state, is_first_frame); |
| 187 | case Tegra::NvdecCommon::VideoCodec::VP8: | 187 | case Tegra::NvdecCommon::VideoCodec::VP8: |
| 188 | return vp8_decoder->ComposeFrameHeader(state); | 188 | return vp8_decoder->ComposeFrame(state); |
| 189 | case Tegra::NvdecCommon::VideoCodec::VP9: | 189 | case Tegra::NvdecCommon::VideoCodec::VP9: |
| 190 | vp9_decoder->ComposeFrameHeader(state); | 190 | vp9_decoder->ComposeFrame(state); |
| 191 | vp9_hidden_frame = vp9_decoder->WasFrameHidden(); | 191 | vp9_hidden_frame = vp9_decoder->WasFrameHidden(); |
| 192 | return vp9_decoder->GetFrameBytes(); | 192 | return vp9_decoder->GetFrameBytes(); |
| 193 | default: | 193 | default: |
diff --git a/src/video_core/command_classes/codecs/h264.cpp b/src/video_core/command_classes/codecs/h264.cpp index 5519c4705..84f1fa938 100644 --- a/src/video_core/command_classes/codecs/h264.cpp +++ b/src/video_core/command_classes/codecs/h264.cpp | |||
| @@ -45,8 +45,8 @@ H264::H264(GPU& gpu_) : gpu(gpu_) {} | |||
| 45 | 45 | ||
| 46 | H264::~H264() = default; | 46 | H264::~H264() = default; |
| 47 | 47 | ||
| 48 | const std::vector<u8>& H264::ComposeFrameHeader(const NvdecCommon::NvdecRegisters& state, | 48 | const std::vector<u8>& H264::ComposeFrame(const NvdecCommon::NvdecRegisters& state, |
| 49 | bool is_first_frame) { | 49 | bool is_first_frame) { |
| 50 | H264DecoderContext context; | 50 | H264DecoderContext context; |
| 51 | gpu.MemoryManager().ReadBlock(state.picture_info_offset, &context, sizeof(H264DecoderContext)); | 51 | gpu.MemoryManager().ReadBlock(state.picture_info_offset, &context, sizeof(H264DecoderContext)); |
| 52 | 52 | ||
diff --git a/src/video_core/command_classes/codecs/h264.h b/src/video_core/command_classes/codecs/h264.h index bfe84a472..1899d8e7f 100644 --- a/src/video_core/command_classes/codecs/h264.h +++ b/src/video_core/command_classes/codecs/h264.h | |||
| @@ -75,9 +75,9 @@ public: | |||
| 75 | explicit H264(GPU& gpu); | 75 | explicit H264(GPU& gpu); |
| 76 | ~H264(); | 76 | ~H264(); |
| 77 | 77 | ||
| 78 | /// Compose the H264 header of the frame for FFmpeg decoding | 78 | /// Compose the H264 frame for FFmpeg decoding |
| 79 | [[nodiscard]] const std::vector<u8>& ComposeFrameHeader( | 79 | [[nodiscard]] const std::vector<u8>& ComposeFrame(const NvdecCommon::NvdecRegisters& state, |
| 80 | const NvdecCommon::NvdecRegisters& state, bool is_first_frame = false); | 80 | bool is_first_frame = false); |
| 81 | 81 | ||
| 82 | private: | 82 | private: |
| 83 | std::vector<u8> frame; | 83 | std::vector<u8> frame; |
diff --git a/src/video_core/command_classes/codecs/vp8.cpp b/src/video_core/command_classes/codecs/vp8.cpp index 3ee269948..32ad0ec16 100644 --- a/src/video_core/command_classes/codecs/vp8.cpp +++ b/src/video_core/command_classes/codecs/vp8.cpp | |||
| @@ -14,7 +14,7 @@ VP8::VP8(GPU& gpu_) : gpu(gpu_) {} | |||
| 14 | 14 | ||
| 15 | VP8::~VP8() = default; | 15 | VP8::~VP8() = default; |
| 16 | 16 | ||
| 17 | const std::vector<u8>& VP8::ComposeFrameHeader(const NvdecCommon::NvdecRegisters& state) { | 17 | const std::vector<u8>& VP8::ComposeFrame(const NvdecCommon::NvdecRegisters& state) { |
| 18 | VP8PictureInfo info; | 18 | VP8PictureInfo info; |
| 19 | gpu.MemoryManager().ReadBlock(state.picture_info_offset, &info, sizeof(VP8PictureInfo)); | 19 | gpu.MemoryManager().ReadBlock(state.picture_info_offset, &info, sizeof(VP8PictureInfo)); |
| 20 | 20 | ||
diff --git a/src/video_core/command_classes/codecs/vp8.h b/src/video_core/command_classes/codecs/vp8.h index d71917596..41fc7b403 100644 --- a/src/video_core/command_classes/codecs/vp8.h +++ b/src/video_core/command_classes/codecs/vp8.h | |||
| @@ -20,9 +20,8 @@ public: | |||
| 20 | explicit VP8(GPU& gpu); | 20 | explicit VP8(GPU& gpu); |
| 21 | ~VP8(); | 21 | ~VP8(); |
| 22 | 22 | ||
| 23 | /// Compose the VP8 header of the frame for FFmpeg decoding | 23 | /// Compose the VP8 frame for FFmpeg decoding |
| 24 | [[nodiscard]] const std::vector<u8>& ComposeFrameHeader( | 24 | [[nodiscard]] const std::vector<u8>& ComposeFrame(const NvdecCommon::NvdecRegisters& state); |
| 25 | const NvdecCommon::NvdecRegisters& state); | ||
| 26 | 25 | ||
| 27 | private: | 26 | private: |
| 28 | std::vector<u8> frame; | 27 | std::vector<u8> frame; |
diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp index 269adc3f1..2c00181fa 100644 --- a/src/video_core/command_classes/codecs/vp9.cpp +++ b/src/video_core/command_classes/codecs/vp9.cpp | |||
| @@ -770,7 +770,7 @@ VpxBitStreamWriter VP9::ComposeUncompressedHeader() { | |||
| 770 | return uncomp_writer; | 770 | return uncomp_writer; |
| 771 | } | 771 | } |
| 772 | 772 | ||
| 773 | void VP9::ComposeFrameHeader(const NvdecCommon::NvdecRegisters& state) { | 773 | void VP9::ComposeFrame(const NvdecCommon::NvdecRegisters& state) { |
| 774 | std::vector<u8> bitstream; | 774 | std::vector<u8> bitstream; |
| 775 | { | 775 | { |
| 776 | Vp9FrameContainer curr_frame = GetCurrentFrame(state); | 776 | Vp9FrameContainer curr_frame = GetCurrentFrame(state); |
diff --git a/src/video_core/command_classes/codecs/vp9.h b/src/video_core/command_classes/codecs/vp9.h index 6ab9ef5b5..2e735c792 100644 --- a/src/video_core/command_classes/codecs/vp9.h +++ b/src/video_core/command_classes/codecs/vp9.h | |||
| @@ -118,13 +118,14 @@ public: | |||
| 118 | 118 | ||
| 119 | /// Composes the VP9 frame from the GPU state information. | 119 | /// Composes the VP9 frame from the GPU state information. |
| 120 | /// Based on the official VP9 spec documentation | 120 | /// Based on the official VP9 spec documentation |
| 121 | void ComposeFrameHeader(const NvdecCommon::NvdecRegisters& state); | 121 | void ComposeFrame(const NvdecCommon::NvdecRegisters& state); |
| 122 | 122 | ||
| 123 | /// Returns true if the most recent frame was a hidden frame. | 123 | /// Returns true if the most recent frame was a hidden frame. |
| 124 | [[nodiscard]] bool WasFrameHidden() const { | 124 | [[nodiscard]] bool WasFrameHidden() const { |
| 125 | return !current_frame_info.show_frame; | 125 | return !current_frame_info.show_frame; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | /// Returns a const reference to the composed frame data. | ||
| 128 | [[nodiscard]] const std::vector<u8>& GetFrameBytes() const { | 129 | [[nodiscard]] const std::vector<u8>& GetFrameBytes() const { |
| 129 | return frame; | 130 | return frame; |
| 130 | } | 131 | } |