Commit 965d8686 authored by Johann's avatar Johann
Browse files

Remove extra enum

VP8_REFFRAME is the same as vpx_ref_frame_type

Change-Id: I63c2ddfb39f6ec87d1e5eb6a8852846464552b1b
parent 2b10528a
...@@ -37,14 +37,6 @@ extern "C" ...@@ -37,14 +37,6 @@ extern "C"
} VPX_SCALING; } VPX_SCALING;
typedef enum
{
VP8_LAST_FLAG = 1,
VP8_GOLD_FLAG = 2,
VP8_ALT_FLAG = 4
} VP8_REFFRAME;
typedef enum typedef enum
{ {
USAGE_STREAM_FROM_SERVER = 0x0, USAGE_STREAM_FROM_SERVER = 0x0,
...@@ -244,8 +236,8 @@ extern "C" ...@@ -244,8 +236,8 @@ extern "C"
int vp8_use_as_reference(struct VP8_COMP* comp, int ref_frame_flags); int vp8_use_as_reference(struct VP8_COMP* comp, int ref_frame_flags);
int vp8_update_reference(struct VP8_COMP* comp, int ref_frame_flags); int vp8_update_reference(struct VP8_COMP* comp, int ref_frame_flags);
int vp8_get_reference(struct VP8_COMP* comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd); int vp8_get_reference(struct VP8_COMP* comp, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd);
int vp8_set_reference(struct VP8_COMP* comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd); int vp8_set_reference(struct VP8_COMP* comp, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd);
int vp8_update_entropy(struct VP8_COMP* comp, int update); int vp8_update_entropy(struct VP8_COMP* comp, int update);
int vp8_set_roimap(struct VP8_COMP* comp, unsigned char *map, unsigned int rows, unsigned int cols, int delta_q[4], int delta_lf[4], unsigned int threshold[4]); int vp8_set_roimap(struct VP8_COMP* comp, unsigned char *map, unsigned int rows, unsigned int cols, int delta_q[4], int delta_lf[4], unsigned int threshold[4]);
int vp8_set_active_map(struct VP8_COMP* comp, unsigned char *map, unsigned int rows, unsigned int cols); int vp8_set_active_map(struct VP8_COMP* comp, unsigned char *map, unsigned int rows, unsigned int cols);
......
...@@ -22,6 +22,7 @@ extern "C" ...@@ -22,6 +22,7 @@ extern "C"
#include "ppflags.h" #include "ppflags.h"
#include "vpx_ports/mem.h" #include "vpx_ports/mem.h"
#include "vpx/vpx_codec.h" #include "vpx/vpx_codec.h"
#include "vpx/vp8.h"
struct VP8D_COMP; struct VP8D_COMP;
...@@ -35,12 +36,6 @@ extern "C" ...@@ -35,12 +36,6 @@ extern "C"
int error_concealment; int error_concealment;
int input_fragments; int input_fragments;
} VP8D_CONFIG; } VP8D_CONFIG;
typedef enum
{
VP8_LAST_FLAG = 1,
VP8_GOLD_FLAG = 2,
VP8_ALT_FLAG = 4
} VP8_REFFRAME;
typedef enum typedef enum
{ {
...@@ -56,8 +51,8 @@ extern "C" ...@@ -56,8 +51,8 @@ extern "C"
int vp8dx_receive_compressed_data(struct VP8D_COMP* comp, unsigned long size, const unsigned char *dest, int64_t time_stamp); int vp8dx_receive_compressed_data(struct VP8D_COMP* comp, unsigned long size, const unsigned char *dest, int64_t time_stamp);
int vp8dx_get_raw_frame(struct VP8D_COMP* comp, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags); int vp8dx_get_raw_frame(struct VP8D_COMP* comp, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags);
vpx_codec_err_t vp8dx_get_reference(struct VP8D_COMP* comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd); vpx_codec_err_t vp8dx_get_reference(struct VP8D_COMP* comp, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd);
vpx_codec_err_t vp8dx_set_reference(struct VP8D_COMP* comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd); vpx_codec_err_t vp8dx_set_reference(struct VP8D_COMP* comp, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd);
struct VP8D_COMP* vp8dx_create_decompressor(VP8D_CONFIG *oxcf); struct VP8D_COMP* vp8dx_create_decompressor(VP8D_CONFIG *oxcf);
......
...@@ -125,16 +125,16 @@ void vp8dx_remove_decompressor(VP8D_COMP *pbi) ...@@ -125,16 +125,16 @@ void vp8dx_remove_decompressor(VP8D_COMP *pbi)
} }
vpx_codec_err_t vp8dx_get_reference(VP8D_COMP *pbi, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) vpx_codec_err_t vp8dx_get_reference(VP8D_COMP *pbi, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd)
{ {
VP8_COMMON *cm = &pbi->common; VP8_COMMON *cm = &pbi->common;
int ref_fb_idx; int ref_fb_idx;
if (ref_frame_flag == VP8_LAST_FLAG) if (ref_frame_flag == VP8_LAST_FRAME)
ref_fb_idx = cm->lst_fb_idx; ref_fb_idx = cm->lst_fb_idx;
else if (ref_frame_flag == VP8_GOLD_FLAG) else if (ref_frame_flag == VP8_GOLD_FRAME)
ref_fb_idx = cm->gld_fb_idx; ref_fb_idx = cm->gld_fb_idx;
else if (ref_frame_flag == VP8_ALT_FLAG) else if (ref_frame_flag == VP8_ALTR_FRAME)
ref_fb_idx = cm->alt_fb_idx; ref_fb_idx = cm->alt_fb_idx;
else{ else{
vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR, vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR,
...@@ -156,17 +156,17 @@ vpx_codec_err_t vp8dx_get_reference(VP8D_COMP *pbi, VP8_REFFRAME ref_frame_flag, ...@@ -156,17 +156,17 @@ vpx_codec_err_t vp8dx_get_reference(VP8D_COMP *pbi, VP8_REFFRAME ref_frame_flag,
} }
vpx_codec_err_t vp8dx_set_reference(VP8D_COMP *pbi, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) vpx_codec_err_t vp8dx_set_reference(VP8D_COMP *pbi, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd)
{ {
VP8_COMMON *cm = &pbi->common; VP8_COMMON *cm = &pbi->common;
int *ref_fb_ptr = NULL; int *ref_fb_ptr = NULL;
int free_fb; int free_fb;
if (ref_frame_flag == VP8_LAST_FLAG) if (ref_frame_flag == VP8_LAST_FRAME)
ref_fb_ptr = &cm->lst_fb_idx; ref_fb_ptr = &cm->lst_fb_idx;
else if (ref_frame_flag == VP8_GOLD_FLAG) else if (ref_frame_flag == VP8_GOLD_FRAME)
ref_fb_ptr = &cm->gld_fb_idx; ref_fb_ptr = &cm->gld_fb_idx;
else if (ref_frame_flag == VP8_ALT_FLAG) else if (ref_frame_flag == VP8_ALTR_FRAME)
ref_fb_ptr = &cm->alt_fb_idx; ref_fb_ptr = &cm->alt_fb_idx;
else{ else{
vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR, vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR,
......
...@@ -644,15 +644,15 @@ static void init_encode_frame_mb_context(VP8_COMP *cpi) ...@@ -644,15 +644,15 @@ static void init_encode_frame_mb_context(VP8_COMP *cpi)
sizeof(ENTROPY_CONTEXT_PLANES) * cm->mb_cols); sizeof(ENTROPY_CONTEXT_PLANES) * cm->mb_cols);
// Special case treatment when GF and ARF are not sensible options for reference // Special case treatment when GF and ARF are not sensible options for reference
if (cpi->ref_frame_flags == VP8_LAST_FLAG) if (cpi->ref_frame_flags == VP8_LAST_FRAME)
vp8_calc_ref_frame_costs(x->ref_frame_cost, vp8_calc_ref_frame_costs(x->ref_frame_cost,
cpi->prob_intra_coded,255,128); cpi->prob_intra_coded,255,128);
else if ((cpi->oxcf.number_of_layers > 1) && else if ((cpi->oxcf.number_of_layers > 1) &&
(cpi->ref_frame_flags == VP8_GOLD_FLAG)) (cpi->ref_frame_flags == VP8_GOLD_FRAME))
vp8_calc_ref_frame_costs(x->ref_frame_cost, vp8_calc_ref_frame_costs(x->ref_frame_cost,
cpi->prob_intra_coded,1,255); cpi->prob_intra_coded,1,255);
else if ((cpi->oxcf.number_of_layers > 1) && else if ((cpi->oxcf.number_of_layers > 1) &&
(cpi->ref_frame_flags == VP8_ALT_FLAG)) (cpi->ref_frame_flags == VP8_ALTR_FRAME))
vp8_calc_ref_frame_costs(x->ref_frame_cost, vp8_calc_ref_frame_costs(x->ref_frame_cost,
cpi->prob_intra_coded,1,1); cpi->prob_intra_coded,1,1);
else else
......
...@@ -703,11 +703,11 @@ void vp8_set_speed_features(VP8_COMP *cpi) ...@@ -703,11 +703,11 @@ void vp8_set_speed_features(VP8_COMP *cpi)
/* Count enabled references */ /* Count enabled references */
ref_frames = 1; ref_frames = 1;
if (cpi->ref_frame_flags & VP8_LAST_FLAG) if (cpi->ref_frame_flags & VP8_LAST_FRAME)
ref_frames++; ref_frames++;
if (cpi->ref_frame_flags & VP8_GOLD_FLAG) if (cpi->ref_frame_flags & VP8_GOLD_FRAME)
ref_frames++; ref_frames++;
if (cpi->ref_frame_flags & VP8_ALT_FLAG) if (cpi->ref_frame_flags & VP8_ALTR_FRAME)
ref_frames++; ref_frames++;
/* Convert speed to continuous range, with clamping */ /* Convert speed to continuous range, with clamping */
...@@ -1514,7 +1514,7 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) ...@@ -1514,7 +1514,7 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf)
cpi->baseline_gf_interval = cpi->baseline_gf_interval =
cpi->oxcf.alt_freq ? cpi->oxcf.alt_freq : DEFAULT_GF_INTERVAL; cpi->oxcf.alt_freq ? cpi->oxcf.alt_freq : DEFAULT_GF_INTERVAL;
cpi->ref_frame_flags = VP8_ALT_FLAG | VP8_GOLD_FLAG | VP8_LAST_FLAG; cpi->ref_frame_flags = VP8_ALTR_FRAME | VP8_GOLD_FRAME | VP8_LAST_FRAME;
//cpi->use_golden_frame_only = 0; //cpi->use_golden_frame_only = 0;
//cpi->use_last_frame_only = 0; //cpi->use_last_frame_only = 0;
...@@ -2486,28 +2486,28 @@ int vp8_update_reference(VP8_COMP *cpi, int ref_frame_flags) ...@@ -2486,28 +2486,28 @@ int vp8_update_reference(VP8_COMP *cpi, int ref_frame_flags)
cpi->common.refresh_alt_ref_frame = 0; cpi->common.refresh_alt_ref_frame = 0;
cpi->common.refresh_last_frame = 0; cpi->common.refresh_last_frame = 0;
if (ref_frame_flags & VP8_LAST_FLAG) if (ref_frame_flags & VP8_LAST_FRAME)
cpi->common.refresh_last_frame = 1; cpi->common.refresh_last_frame = 1;
if (ref_frame_flags & VP8_GOLD_FLAG) if (ref_frame_flags & VP8_GOLD_FRAME)
cpi->common.refresh_golden_frame = 1; cpi->common.refresh_golden_frame = 1;
if (ref_frame_flags & VP8_ALT_FLAG) if (ref_frame_flags & VP8_ALTR_FRAME)
cpi->common.refresh_alt_ref_frame = 1; cpi->common.refresh_alt_ref_frame = 1;
return 0; return 0;
} }
int vp8_get_reference(VP8_COMP *cpi, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) int vp8_get_reference(VP8_COMP *cpi, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd)
{ {
VP8_COMMON *cm = &cpi->common; VP8_COMMON *cm = &cpi->common;
int ref_fb_idx; int ref_fb_idx;
if (ref_frame_flag == VP8_LAST_FLAG) if (ref_frame_flag == VP8_LAST_FRAME)
ref_fb_idx = cm->lst_fb_idx; ref_fb_idx = cm->lst_fb_idx;
else if (ref_frame_flag == VP8_GOLD_FLAG) else if (ref_frame_flag == VP8_GOLD_FRAME)
ref_fb_idx = cm->gld_fb_idx; ref_fb_idx = cm->gld_fb_idx;
else if (ref_frame_flag == VP8_ALT_FLAG) else if (ref_frame_flag == VP8_ALTR_FRAME)
ref_fb_idx = cm->alt_fb_idx; ref_fb_idx = cm->alt_fb_idx;
else else
return -1; return -1;
...@@ -2516,17 +2516,17 @@ int vp8_get_reference(VP8_COMP *cpi, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CO ...@@ -2516,17 +2516,17 @@ int vp8_get_reference(VP8_COMP *cpi, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CO
return 0; return 0;
} }
int vp8_set_reference(VP8_COMP *cpi, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) int vp8_set_reference(VP8_COMP *cpi, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd)
{ {
VP8_COMMON *cm = &cpi->common; VP8_COMMON *cm = &cpi->common;
int ref_fb_idx; int ref_fb_idx;
if (ref_frame_flag == VP8_LAST_FLAG) if (ref_frame_flag == VP8_LAST_FRAME)
ref_fb_idx = cm->lst_fb_idx; ref_fb_idx = cm->lst_fb_idx;
else if (ref_frame_flag == VP8_GOLD_FLAG) else if (ref_frame_flag == VP8_GOLD_FRAME)
ref_fb_idx = cm->gld_fb_idx; ref_fb_idx = cm->gld_fb_idx;
else if (ref_frame_flag == VP8_ALT_FLAG) else if (ref_frame_flag == VP8_ALTR_FRAME)
ref_fb_idx = cm->alt_fb_idx; ref_fb_idx = cm->alt_fb_idx;
else else
return -1; return -1;
...@@ -3033,10 +3033,10 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3033,10 +3033,10 @@ static void update_reference_frames(VP8_COMMON *cm)
if (cm->frame_type == KEY_FRAME) if (cm->frame_type == KEY_FRAME)
{ {
yv12_fb[cm->new_fb_idx].flags |= VP8_GOLD_FLAG | VP8_ALT_FLAG ; yv12_fb[cm->new_fb_idx].flags |= VP8_GOLD_FRAME | VP8_ALTR_FRAME ;
yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG; yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FRAME;
yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG; yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALTR_FRAME;
cm->alt_fb_idx = cm->gld_fb_idx = cm->new_fb_idx; cm->alt_fb_idx = cm->gld_fb_idx = cm->new_fb_idx;
} }
...@@ -3046,8 +3046,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3046,8 +3046,8 @@ static void update_reference_frames(VP8_COMMON *cm)
{ {
assert(!cm->copy_buffer_to_arf); assert(!cm->copy_buffer_to_arf);
cm->yv12_fb[cm->new_fb_idx].flags |= VP8_ALT_FLAG; cm->yv12_fb[cm->new_fb_idx].flags |= VP8_ALTR_FRAME;
cm->yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG; cm->yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALTR_FRAME;
cm->alt_fb_idx = cm->new_fb_idx; cm->alt_fb_idx = cm->new_fb_idx;
} }
else if (cm->copy_buffer_to_arf) else if (cm->copy_buffer_to_arf)
...@@ -3058,8 +3058,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3058,8 +3058,8 @@ static void update_reference_frames(VP8_COMMON *cm)
{ {
if(cm->alt_fb_idx != cm->lst_fb_idx) if(cm->alt_fb_idx != cm->lst_fb_idx)
{ {
yv12_fb[cm->lst_fb_idx].flags |= VP8_ALT_FLAG; yv12_fb[cm->lst_fb_idx].flags |= VP8_ALTR_FRAME;
yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG; yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALTR_FRAME;
cm->alt_fb_idx = cm->lst_fb_idx; cm->alt_fb_idx = cm->lst_fb_idx;
} }
} }
...@@ -3067,8 +3067,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3067,8 +3067,8 @@ static void update_reference_frames(VP8_COMMON *cm)
{ {
if(cm->alt_fb_idx != cm->gld_fb_idx) if(cm->alt_fb_idx != cm->gld_fb_idx)
{ {
yv12_fb[cm->gld_fb_idx].flags |= VP8_ALT_FLAG; yv12_fb[cm->gld_fb_idx].flags |= VP8_ALTR_FRAME;
yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG; yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALTR_FRAME;
cm->alt_fb_idx = cm->gld_fb_idx; cm->alt_fb_idx = cm->gld_fb_idx;
} }
} }
...@@ -3078,8 +3078,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3078,8 +3078,8 @@ static void update_reference_frames(VP8_COMMON *cm)
{ {
assert(!cm->copy_buffer_to_gf); assert(!cm->copy_buffer_to_gf);
cm->yv12_fb[cm->new_fb_idx].flags |= VP8_GOLD_FLAG; cm->yv12_fb[cm->new_fb_idx].flags |= VP8_GOLD_FRAME;
cm->yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG; cm->yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FRAME;
cm->gld_fb_idx = cm->new_fb_idx; cm->gld_fb_idx = cm->new_fb_idx;
} }
else if (cm->copy_buffer_to_gf) else if (cm->copy_buffer_to_gf)
...@@ -3090,8 +3090,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3090,8 +3090,8 @@ static void update_reference_frames(VP8_COMMON *cm)
{ {
if(cm->gld_fb_idx != cm->lst_fb_idx) if(cm->gld_fb_idx != cm->lst_fb_idx)
{ {
yv12_fb[cm->lst_fb_idx].flags |= VP8_GOLD_FLAG; yv12_fb[cm->lst_fb_idx].flags |= VP8_GOLD_FRAME;
yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG; yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FRAME;
cm->gld_fb_idx = cm->lst_fb_idx; cm->gld_fb_idx = cm->lst_fb_idx;
} }
} }
...@@ -3099,8 +3099,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3099,8 +3099,8 @@ static void update_reference_frames(VP8_COMMON *cm)
{ {
if(cm->alt_fb_idx != cm->gld_fb_idx) if(cm->alt_fb_idx != cm->gld_fb_idx)
{ {
yv12_fb[cm->alt_fb_idx].flags |= VP8_GOLD_FLAG; yv12_fb[cm->alt_fb_idx].flags |= VP8_GOLD_FRAME;
yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG; yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FRAME;
cm->gld_fb_idx = cm->alt_fb_idx; cm->gld_fb_idx = cm->alt_fb_idx;
} }
} }
...@@ -3109,8 +3109,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3109,8 +3109,8 @@ static void update_reference_frames(VP8_COMMON *cm)
if (cm->refresh_last_frame) if (cm->refresh_last_frame)
{ {
cm->yv12_fb[cm->new_fb_idx].flags |= VP8_LAST_FLAG; cm->yv12_fb[cm->new_fb_idx].flags |= VP8_LAST_FRAME;
cm->yv12_fb[cm->lst_fb_idx].flags &= ~VP8_LAST_FLAG; cm->yv12_fb[cm->lst_fb_idx].flags &= ~VP8_LAST_FRAME;
cm->lst_fb_idx = cm->new_fb_idx; cm->lst_fb_idx = cm->new_fb_idx;
} }
} }
...@@ -4527,16 +4527,16 @@ static void encode_frame_to_data_rate ...@@ -4527,16 +4527,16 @@ static void encode_frame_to_data_rate
else if (cm->refresh_alt_ref_frame ^ cm->refresh_golden_frame) // 1 refreshed but not the other else if (cm->refresh_alt_ref_frame ^ cm->refresh_golden_frame) // 1 refreshed but not the other
cpi->gold_is_alt = 0; cpi->gold_is_alt = 0;
cpi->ref_frame_flags = VP8_ALT_FLAG | VP8_GOLD_FLAG | VP8_LAST_FLAG; cpi->ref_frame_flags = VP8_ALTR_FRAME | VP8_GOLD_FRAME | VP8_LAST_FRAME;
if (cpi->gold_is_last) if (cpi->gold_is_last)
cpi->ref_frame_flags &= ~VP8_GOLD_FLAG; cpi->ref_frame_flags &= ~VP8_GOLD_FRAME;
if (cpi->alt_is_last) if (cpi->alt_is_last)
cpi->ref_frame_flags &= ~VP8_ALT_FLAG; cpi->ref_frame_flags &= ~VP8_ALTR_FRAME;
if (cpi->gold_is_alt) if (cpi->gold_is_alt)
cpi->ref_frame_flags &= ~VP8_ALT_FLAG; cpi->ref_frame_flags &= ~VP8_ALTR_FRAME;
if (!cpi->oxcf.error_resilient_mode) if (!cpi->oxcf.error_resilient_mode)
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "vp8/common/threading.h" #include "vp8/common/threading.h"
#include "vpx_ports/mem.h" #include "vpx_ports/mem.h"
#include "vpx/internal/vpx_codec_internal.h" #include "vpx/internal/vpx_codec_internal.h"
#include "vpx/vp8.h"
#include "mcomp.h" #include "mcomp.h"
#include "vp8/common/findnearmv.h" #include "vp8/common/findnearmv.h"
#include "lookahead.h" #include "lookahead.h"
......
...@@ -86,15 +86,15 @@ static void get_predictor_pointers(const VP8_COMP *cpi, ...@@ -86,15 +86,15 @@ static void get_predictor_pointers(const VP8_COMP *cpi,
unsigned int recon_yoffset, unsigned int recon_yoffset,
unsigned int recon_uvoffset) unsigned int recon_uvoffset)
{ {
if (cpi->ref_frame_flags & VP8_LAST_FLAG) if (cpi->ref_frame_flags & VP8_LAST_FRAME)
get_plane_pointers(&cpi->common.yv12_fb[cpi->common.lst_fb_idx], get_plane_pointers(&cpi->common.yv12_fb[cpi->common.lst_fb_idx],
plane[LAST_FRAME], recon_yoffset, recon_uvoffset); plane[LAST_FRAME], recon_yoffset, recon_uvoffset);
if (cpi->ref_frame_flags & VP8_GOLD_FLAG) if (cpi->ref_frame_flags & VP8_GOLD_FRAME)
get_plane_pointers(&cpi->common.yv12_fb[cpi->common.gld_fb_idx], get_plane_pointers(&cpi->common.yv12_fb[cpi->common.gld_fb_idx],
plane[GOLDEN_FRAME], recon_yoffset, recon_uvoffset); plane[GOLDEN_FRAME], recon_yoffset, recon_uvoffset);
if (cpi->ref_frame_flags & VP8_ALT_FLAG) if (cpi->ref_frame_flags & VP8_ALTR_FRAME)
get_plane_pointers(&cpi->common.yv12_fb[cpi->common.alt_fb_idx], get_plane_pointers(&cpi->common.yv12_fb[cpi->common.alt_fb_idx],
plane[ALTREF_FRAME], recon_yoffset, recon_uvoffset); plane[ALTREF_FRAME], recon_yoffset, recon_uvoffset);
} }
...@@ -106,11 +106,11 @@ static void get_reference_search_order(const VP8_COMP *cpi, ...@@ -106,11 +106,11 @@ static void get_reference_search_order(const VP8_COMP *cpi,
int i=0; int i=0;
ref_frame_map[i++] = INTRA_FRAME; ref_frame_map[i++] = INTRA_FRAME;
if (cpi->ref_frame_flags & VP8_LAST_FLAG) if (cpi->ref_frame_flags & VP8_LAST_FRAME)
ref_frame_map[i++] = LAST_FRAME; ref_frame_map[i++] = LAST_FRAME;
if (cpi->ref_frame_flags & VP8_GOLD_FLAG) if (cpi->ref_frame_flags & VP8_GOLD_FRAME)
ref_frame_map[i++] = GOLDEN_FRAME; ref_frame_map[i++] = GOLDEN_FRAME;
if (cpi->ref_frame_flags & VP8_ALT_FLAG) if (cpi->ref_frame_flags & VP8_ALTR_FRAME)
ref_frame_map[i++] = ALTREF_FRAME; ref_frame_map[i++] = ALTREF_FRAME;
for(; i<4; i++) for(; i<4; i++)
ref_frame_map[i] = -1; ref_frame_map[i] = -1;
......
...@@ -771,13 +771,13 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx, ...@@ -771,13 +771,13 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
int ref = 7; int ref = 7;
if (flags & VP8_EFLAG_NO_REF_LAST) if (flags & VP8_EFLAG_NO_REF_LAST)
ref ^= VP8_LAST_FLAG; ref ^= VP8_LAST_FRAME;
if (flags & VP8_EFLAG_NO_REF_GF) if (flags & VP8_EFLAG_NO_REF_GF)
ref ^= VP8_GOLD_FLAG; ref ^= VP8_GOLD_FRAME;
if (flags & VP8_EFLAG_NO_REF_ARF) if (flags & VP8_EFLAG_NO_REF_ARF)
ref ^= VP8_ALT_FLAG; ref ^= VP8_ALTR_FRAME;
vp8_use_as_reference(ctx->cpi, ref); vp8_use_as_reference(ctx->cpi, ref);
} }
...@@ -789,13 +789,13 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx, ...@@ -789,13 +789,13 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
int upd = 7; int upd = 7;
if (flags & VP8_EFLAG_NO_UPD_LAST) if (flags & VP8_EFLAG_NO_UPD_LAST)
upd ^= VP8_LAST_FLAG; upd ^= VP8_LAST_FRAME;
if (flags & VP8_EFLAG_NO_UPD_GF) if (flags & VP8_EFLAG_NO_UPD_GF)
upd ^= VP8_GOLD_FLAG; upd ^= VP8_GOLD_FRAME;
if (flags & VP8_EFLAG_NO_UPD_ARF) if (flags & VP8_EFLAG_NO_UPD_ARF)
upd ^= VP8_ALT_FLAG; upd ^= VP8_ALTR_FRAME;
vp8_update_reference(ctx->cpi, upd); vp8_update_reference(ctx->cpi, upd);
} }
......
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