summaryrefslogtreecommitdiff
path: root/libavfilter/qp_table.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-12-14 14:36:05 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-01 14:24:20 +0100
commitfba0ecbe20db2d63c0227887ce21a137da68b30d (patch)
tree58d3123b108cfe66ac30229745d7eed5348df938 /libavfilter/qp_table.h
parentc72d5264944c11ecf4e5724b56876721becd5aa3 (diff)
lavfi: add common code to handle QP tables
It will be used for converting the *pp filters to the new AVVideoEncParams API.
Diffstat (limited to 'libavfilter/qp_table.h')
-rw-r--r--libavfilter/qp_table.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/libavfilter/qp_table.h b/libavfilter/qp_table.h
new file mode 100644
index 0000000000..a552fe2e64
--- /dev/null
+++ b/libavfilter/qp_table.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef AVFILTER_QP_TABLE_H
+#define AVFILTER_QP_TABLE_H
+
+#include <stdint.h>
+
+#include "libavutil/frame.h"
+
+/**
+ * Extract a libpostproc-compatible QP table - an 8-bit QP value per 16x16
+ * macroblock, stored in raster order - from AVVideoEncParams side data.
+ */
+int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table_h,
+ int *qscale_type);
+
+#endif // AVFILTER_QP_TABLE_H