aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-11-23 10:27:18 -0500
committerAnton Khirnov <anton@khirnov.net>2016-08-11 10:53:13 +0200
commitbc6e0b64a9100652c1ce52292408d8fd79930d53 (patch)
tree819bbbfbe70acbd0196f55c10e4dc5bb57ae15aa /libavcodec/vp9.h
parent04763c6f87690b31cfcd0d324cf36a451531dcd0 (diff)
downloadffmpeg-bc6e0b64a9100652c1ce52292408d8fd79930d53.tar.gz
vp9: split last/cur_frame from the reference buffers.
We need more information from last/cur_frame than from reference buffers, so we can use a simplified structure for reference buffers, and then store mvs and segmentation map information in last/cur. This prepares the decoder for frame threading support. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/vp9.h')
-rw-r--r--libavcodec/vp9.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/libavcodec/vp9.h b/libavcodec/vp9.h
index 31509bfbc5..8711987b8c 100644
--- a/libavcodec/vp9.h
+++ b/libavcodec/vp9.h
@@ -27,9 +27,11 @@
#include <stddef.h>
#include <stdint.h>
+#include "libavutil/buffer.h"
#include "libavutil/internal.h"
#include "avcodec.h"
+#include "thread.h"
#include "vp56.h"
enum TxfmMode {
@@ -225,6 +227,16 @@ typedef struct VP9Filter {
[8 /* rows */][4 /* 0=16, 1=8, 2=4, 3=inner4 */];
} VP9Filter;
+typedef struct VP9Frame {
+ ThreadFrame tf;
+
+ uint8_t *segmentation_map;
+ VP9MVRefPair *mv;
+
+ AVBufferRef *segmentation_map_buf;
+ AVBufferRef *mv_buf;
+} VP9Frame;
+
enum BlockLevel {
BL_64X64,
BL_32X32,
@@ -293,8 +305,12 @@ typedef struct VP9Context {
uint8_t refidx[3];
uint8_t signbias[3];
uint8_t varcompref[2];
- AVFrame *refs[8];
- AVFrame *cur_frame;
+
+ ThreadFrame refs[8];
+
+#define CUR_FRAME 0
+#define LAST_FRAME 1
+ VP9Frame frames[2];
struct {
uint8_t level;
@@ -392,8 +408,6 @@ typedef struct VP9Context {
// whole-frame cache
uint8_t *intra_pred_data[3];
- uint8_t *segmentation_map;
- VP9MVRefPair *mv[2];
VP9Filter *lflvl;
DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[71 * 80];