Commit 1730a67a authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Anton Khirnov

vp9: add frame threading

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 5b995452
This diff is collapsed.
...@@ -271,6 +271,9 @@ typedef struct VP9Block { ...@@ -271,6 +271,9 @@ typedef struct VP9Block {
int row, row7, col, col7; int row, row7, col, col7;
uint8_t *dst[3]; uint8_t *dst[3];
ptrdiff_t y_stride, uv_stride; ptrdiff_t y_stride, uv_stride;
enum BlockLevel bl;
enum BlockPartition bp;
} VP9Block; } VP9Block;
typedef struct VP9Context { typedef struct VP9Context {
...@@ -283,6 +286,14 @@ typedef struct VP9Context { ...@@ -283,6 +286,14 @@ typedef struct VP9Context {
VP9Block *b; VP9Block *b;
VP9Block *b_base; VP9Block *b_base;
int alloc_width;
int alloc_height;
int pass;
int uses_2pass;
int last_uses_2pass;
int setup_finished;
// bitstream header // bitstream header
uint8_t profile; uint8_t profile;
uint8_t keyframe, last_keyframe; uint8_t keyframe, last_keyframe;
......
This diff is collapsed.
...@@ -164,6 +164,9 @@ static void find_ref_mvs(VP9Context *s, ...@@ -164,6 +164,9 @@ static void find_ref_mvs(VP9Context *s,
if (s->use_last_frame_mvs) { if (s->use_last_frame_mvs) {
VP9MVRefPair *mv = &s->frames[LAST_FRAME].mv[row * s->sb_cols * 8 + col]; VP9MVRefPair *mv = &s->frames[LAST_FRAME].mv[row * s->sb_cols * 8 + col];
if (!s->last_uses_2pass)
ff_thread_await_progress(&s->frames[LAST_FRAME].tf, row >> 3, 0);
if (mv->ref[0] == ref) if (mv->ref[0] == ref)
RETURN_MV(mv->mv[0]); RETURN_MV(mv->mv[0]);
else if (mv->ref[1] == ref) else if (mv->ref[1] == ref)
...@@ -205,6 +208,7 @@ static void find_ref_mvs(VP9Context *s, ...@@ -205,6 +208,7 @@ static void find_ref_mvs(VP9Context *s,
if (s->use_last_frame_mvs) { if (s->use_last_frame_mvs) {
VP9MVRefPair *mv = &s->frames[LAST_FRAME].mv[row * s->sb_cols * 8 + col]; VP9MVRefPair *mv = &s->frames[LAST_FRAME].mv[row * s->sb_cols * 8 + col];
// no need to await_progress, because we already did that above
if (mv->ref[0] != ref && mv->ref[0] >= 0) if (mv->ref[0] != ref && mv->ref[0] >= 0)
RETURN_SCALE_MV(mv->mv[0], RETURN_SCALE_MV(mv->mv[0],
s->signbias[mv->ref[0]] != s->signbias[ref]); s->signbias[mv->ref[0]] != s->signbias[ref]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment