Commit cf770557 authored by John Koleszar's avatar John Koleszar
Browse files

dixie: add intra prediction

This commit adds prediction functions for all the intra modes.

Change-Id: I626e245318f96ee2ce0d965d7454ac7dce0cff79
parent 940599ff
No related merge requests found
Showing with 850 additions and 1 deletion
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "dequant_data.h" #include "dequant_data.h"
#include "modemv.h" #include "modemv.h"
#include "tokens.h" #include "tokens.h"
#include "predict.h"
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
...@@ -374,12 +375,14 @@ decode_frame(struct vp8_decoder_ctx *ctx, ...@@ -374,12 +375,14 @@ decode_frame(struct vp8_decoder_ctx *ctx,
vp8_dixie_modemv_init(ctx); vp8_dixie_modemv_init(ctx);
vp8_dixie_tokens_init(ctx); vp8_dixie_tokens_init(ctx);
vp8_dixie_predict_init(ctx);
dequant_init(ctx->dequant_factors, &ctx->segment_hdr, &ctx->quant_hdr); dequant_init(ctx->dequant_factors, &ctx->segment_hdr, &ctx->quant_hdr);
for (row = 0, partition = 0; row < ctx->mb_rows; row++) for (row = 0, partition = 0; row < ctx->mb_rows; row++)
{ {
vp8_dixie_modemv_process_row(ctx, &bool, row, 0, ctx->mb_cols); vp8_dixie_modemv_process_row(ctx, &bool, row, 0, ctx->mb_cols);
vp8_dixie_tokens_process_row(ctx, partition, row, 0, ctx->mb_cols); vp8_dixie_tokens_process_row(ctx, partition, row, 0, ctx->mb_cols);
vp8_dixie_predict_process_row(ctx, row, 0, ctx->mb_cols);
if (++partition == ctx->token_hdr.partitions) if (++partition == ctx->token_hdr.partitions)
partition = 0; partition = 0;
......
...@@ -142,7 +142,8 @@ enum reference_frame ...@@ -142,7 +142,8 @@ enum reference_frame
CURRENT_FRAME, CURRENT_FRAME,
LAST_FRAME, LAST_FRAME,
GOLDEN_FRAME, GOLDEN_FRAME,
ALTREF_FRAME ALTREF_FRAME,
NUM_REF_FRAMES
}; };
...@@ -224,6 +225,14 @@ struct dequant_factors ...@@ -224,6 +225,14 @@ struct dequant_factors
short factor[TOKEN_BLOCK_TYPES][2]; /* [ Y1, UV, Y2 ] [ DC, AC ] */ short factor[TOKEN_BLOCK_TYPES][2]; /* [ Y1, UV, Y2 ] [ DC, AC ] */
}; };
struct ref_cnt_img
{
vpx_image_t img;
unsigned int ref_cnt;
};
struct vp8_decoder_ctx struct vp8_decoder_ctx
{ {
struct vpx_internal_error_info error; struct vpx_internal_error_info error;
...@@ -249,6 +258,10 @@ struct vp8_decoder_ctx ...@@ -249,6 +258,10 @@ struct vp8_decoder_ctx
token_entropy_ctx_t *above_token_entropy_ctx; token_entropy_ctx_t *above_token_entropy_ctx;
struct token_decoder tokens[MAX_PARTITIONS]; struct token_decoder tokens[MAX_PARTITIONS];
struct dequant_factors dequant_factors[MAX_MB_SEGMENTS]; struct dequant_factors dequant_factors[MAX_MB_SEGMENTS];
struct ref_cnt_img frame_strg[NUM_REF_FRAMES];
struct ref_cnt_img *ref_frames[NUM_REF_FRAMES];
ptrdiff_t ref_frame_offsets[4];
}; };
...@@ -267,4 +280,7 @@ vp8_dixie_decode_frame(struct vp8_decoder_ctx *ctx, ...@@ -267,4 +280,7 @@ vp8_dixie_decode_frame(struct vp8_decoder_ctx *ctx,
const unsigned char *data, const unsigned char *data,
unsigned int sz); unsigned int sz);
#define CLAMP_255(x) ((x)<0?0:((x)>255?255:(x)))
#endif #endif
This diff is collapsed.
/*
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef PREDICT_H
#define PREDICT_H
void
vp8_dixie_predict_init(struct vp8_decoder_ctx *ctx);
void
vp8_dixie_predict_process_row(struct vp8_decoder_ctx *ctx,
unsigned int row,
unsigned int start_col,
unsigned int num_cols);
#endif
...@@ -34,6 +34,8 @@ VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/modemv.h ...@@ -34,6 +34,8 @@ VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/modemv.h
VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/modemv_data.h VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/modemv_data.h
VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/tokens.c VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/tokens.c
VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/tokens.h VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/tokens.h
VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/predict.c
VP8_DX_SRCS-$(CONFIG_DIXIE) += dixie/predict.h
CFLAGS+=-I$(SRC_PATH_BARE)/$(VP8_PREFIX)decoder CFLAGS+=-I$(SRC_PATH_BARE)/$(VP8_PREFIX)decoder
......
Supports Markdown
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