summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-21 21:34:46 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-08 07:38:30 +0100
commit759001c534287a96dc96d1e274665feb7059145d (patch)
tree6ace9560c20aa30db92067c5b45d7bd86e458d10 /libavcodec/vp8.h
parent6e7b50b4270116ded8b874d76cb7c5b1a0341827 (diff)
lavc decoders: work with refcounted frames.
Diffstat (limited to 'libavcodec/vp8.h')
-rw-r--r--libavcodec/vp8.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h
index 392d0b44c9..8631c8f5db 100644
--- a/libavcodec/vp8.h
+++ b/libavcodec/vp8.h
@@ -26,10 +26,13 @@
#ifndef AVCODEC_VP8_H
#define AVCODEC_VP8_H
+#include "libavutil/buffer.h"
+
#include "vp56.h"
#include "vp56data.h"
#include "vp8dsp.h"
#include "h264pred.h"
+#include "thread.h"
#if HAVE_PTHREADS
#include <pthread.h>
#elif HAVE_W32THREADS
@@ -122,14 +125,19 @@ typedef struct VP8ThreadData {
VP8FilterStrength *filter_strength;
} VP8ThreadData;
+typedef struct VP8Frame {
+ ThreadFrame tf;
+ AVBufferRef *seg_map;
+} VP8Frame;
+
#define MAX_THREADS 8
typedef struct VP8Context {
VP8ThreadData *thread_data;
AVCodecContext *avctx;
- AVFrame *framep[4];
- AVFrame *next_framep[4];
- AVFrame *curframe;
- AVFrame *prev_frame;
+ VP8Frame *framep[4];
+ VP8Frame *next_framep[4];
+ VP8Frame *curframe;
+ VP8Frame *prev_frame;
uint16_t mb_width; /* number of horizontal MB */
uint16_t mb_height; /* number of vertical MB */
@@ -251,17 +259,8 @@ typedef struct VP8Context {
VP8DSPContext vp8dsp;
H264PredContext hpc;
vp8_mc_func put_pixels_tab[3][3][3];
- AVFrame frames[5];
+ VP8Frame frames[5];
- /**
- * A list of segmentation_map buffers that are to be free()'ed in
- * the next decoding iteration. We can't free() them right away
- * because the map may still be used by subsequent decoding threads.
- * Unused if frame threading is off.
- */
- uint8_t *segmentation_maps[5];
- int num_maps_to_be_freed;
- int maps_are_invalid;
int num_jobs;
/**
* This describes the macroblock memory layout.