History

lavfi/vf_stack_vaapi: factor out the common code for stack setting

The common code will be used in QSV based stack filters.

Haihao Xiang committed 3 years ago

Commit 742dfa21 parent 927042b3 files · +452 −358Browse files

Showing the changes to libavfilter/stack_internal.h (1 of 3 files). Show all

Unified · Split

libavfilter/stack_internal.h+60−0
@@ -0,0 +1,60 @@
1+/*
2+ * This file is part of FFmpeg.
3+ *
4+ * FFmpeg is free software; you can redistribute it and/or
5+ * modify it under the terms of the GNU Lesser General Public
6+ * License as published by the Free Software Foundation; either
7+ * version 2.1 of the License, or (at your option) any later version.
8+ *
9+ * FFmpeg is distributed in the hope that it will be useful,
10+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+ * Lesser General Public License for more details.
13+ *
14+ * You should have received a copy of the GNU Lesser General Public
15+ * License along with FFmpeg; if not, write to the Free Software
16+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+ */
18+
19+#ifndef AVFILTER_STACK_INTERNAL_H
20+#define AVFILTER_STACK_INTERNAL_H
21+
22+enum {
23+ STACK_H = 0,
24+ STACK_V = 1,
25+ STACK_X = 2
26+};
27+
28+typedef struct StackItemRegion {
29+ int x;
30+ int y;
31+ int width;
32+ int height;
33+} StackItemRegion;
34+
35+typedef struct StackBaseContext {
36+ HWContext hwctx; /**< must be the first field */
37+
38+ FFFrameSync fs;
39+ int mode;
40+ uint8_t fillcolor[4];
41+ int fillcolor_enable;
42+ StackItemRegion *regions;
43+
44+ /* Options */
45+ int nb_inputs;
46+ int shortest;
47+ int tile_width;
48+ int tile_height;
49+ int nb_grid_columns;
50+ int nb_grid_rows;
51+ char *layout;
52+ char *fillcolor_str;
53+} StackBaseContext;
54+
55+static int config_comm_output(AVFilterLink *outlink);
56+static int stack_init(AVFilterContext *avctx);
57+static av_cold void stack_uninit(AVFilterContext *avctx);
58+static int stack_activate(AVFilterContext *avctx);
59+
60+#endif /* AVFILTER_STACK_INTERNAL_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t