Skip to main content

H264DecodeSima.h File

H264Decode Node — hardware-accelerated H.264 video decoder via SiMa's plugin. More...

Included Headers

#include "builder/Node.h" #include "builder/OutputSpec.h" #include <memory> #include <string> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

classH264Decode

Hardware-accelerated H.264 decoder Node. More...

Description

H264Decode Node — hardware-accelerated H.264 video decoder via SiMa's plugin.

Wraps the SiMa hardware H.264 decoder element. Faster than the software fallback and uses the SiMa DMA allocator so decoded frames flow into downstream MLA/CVU stages without an extra copy.

File Listing

The file content with the documentation metadata removed is:

1
10#pragma once
11
12#include "builder/Node.h"
13#include "builder/OutputSpec.h"
14
15#include <memory>
16#include <string>
17#include <vector>
18
19namespace simaai::neat {
20
30class H264Decode final : public Node, public OutputSpecProvider {
31public:
45 H264Decode(int sima_allocator_type = 2, std::string out_format = "NV12",
46 std::string decoder_name = {}, bool raw_output = false, std::string next_element = {},
47 int dec_width = -1, int dec_height = -1, int dec_fps = -1, int num_buffers = -1);
49 std::string kind() const override {
50 return "H264Decode";
51 }
53 NodeCapsBehavior caps_behavior() const override {
54 return NodeCapsBehavior::Dynamic;
55 }
56
58 std::string backend_fragment(int node_index) const override;
60 std::vector<std::string> element_names(int node_index) const override;
62 OutputSpec output_spec(const OutputSpec& input) const override;
63
65 int sima_allocator_type() const {
66 return sima_allocator_type_;
67 }
69 const std::string& out_format() const {
70 return out_format_;
71 }
73 const std::string& decoder_name() const {
74 return decoder_name_;
75 }
77 bool raw_output() const {
78 return raw_output_;
79 }
81 const std::string& next_element() const {
82 return next_element_;
83 }
85 int dec_width() const {
86 return dec_width_;
87 }
89 int dec_height() const {
90 return dec_height_;
91 }
93 int dec_fps() const {
94 return dec_fps_;
95 }
97 int num_buffers() const {
98 return num_buffers_;
99 }
100
101private:
102 int sima_allocator_type_ = 2;
103 std::string out_format_ = "NV12";
104 std::string decoder_name_;
105 bool raw_output_ = false;
106 std::string next_element_;
107 int dec_width_ = -1;
108 int dec_height_ = -1;
109 int dec_fps_ = -1;
110 int num_buffers_ = -1;
111};
112
113} // namespace simaai::neat
114
115namespace simaai::neat::nodes {
117std::shared_ptr<simaai::neat::Node>
118H264Decode(int sima_allocator_type = 2, std::string out_format = "NV12",
119 std::string decoder_name = {}, bool raw_output = false, std::string next_element = {},
120 int dec_width = -1, int dec_height = -1, int dec_fps = -1, int num_buffers = -1);
121} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.