diff options
author | John Koleszar <jkoleszar@google.com> | 2012-11-01 17:53:44 -0700 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2012-11-02 08:44:54 -0700 |
commit | 06f3e51da62dd7cdc4af129a9925cc85eda745e4 (patch) | |
tree | a8327d40dda49c02ff5d5e6c19dded41946e7f1b | |
parent | 4b2c2b9aa4a273a23d90ddb3bbf6dfb3482e0b8f (diff) | |
download | libvpx-06f3e51da62dd7cdc4af129a9925cc85eda745e4.tar.gz libvpx-06f3e51da62dd7cdc4af129a9925cc85eda745e4.tar.bz2 libvpx-06f3e51da62dd7cdc4af129a9925cc85eda745e4.zip |
vpx_scale: sync from master
Update vpx_scale from current code in master, run style transform, fix
lint warnings.
Change-Id: I47eadeb5b6881d448ea3728537f9b8a5b5aac78e
37 files changed, 414 insertions, 2016 deletions
diff --git a/vp9/common/alloccommon.c b/vp9/common/alloccommon.c index 5f363267c..33d322099 100644 --- a/vp9/common/alloccommon.c +++ b/vp9/common/alloccommon.c @@ -81,7 +81,8 @@ int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) { for (i = 0; i < NUM_YV12_BUFFERS; i++) { oci->fb_idx_ref_cnt[i] = 0; oci->yv12_fb[i].flags = 0; - if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, VP8BORDERINPIXELS) < 0) { + if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, + VP9BORDERINPIXELS) < 0) { vp9_de_alloc_frame_buffers(oci); return 1; } @@ -97,12 +98,14 @@ int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) { oci->fb_idx_ref_cnt[2] = 1; oci->fb_idx_ref_cnt[3] = 1; - if (vp8_yv12_alloc_frame_buffer(&oci->temp_scale_frame, width, 16, VP8BORDERINPIXELS) < 0) { + if (vp8_yv12_alloc_frame_buffer(&oci->temp_scale_frame, width, 16, + VP9BORDERINPIXELS) < 0) { vp9_de_alloc_frame_buffers(oci); return 1; } - if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer, width, height, VP8BORDERINPIXELS) < 0) { + if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer, width, height, + VP9BORDERINPIXELS) < 0) { vp9_de_alloc_frame_buffers(oci); return 1; } diff --git a/vp9/common/asm_com_offsets.c b/vp9/common/asm_com_offsets.c index e135a4d78..07d3e333a 100644 --- a/vp9/common/asm_com_offsets.c +++ b/vp9/common/asm_com_offsets.c @@ -27,7 +27,7 @@ DEFINE(yv12_buffer_config_y_buffer, offsetof(YV12_BUFFER_CONFIG, y_b DEFINE(yv12_buffer_config_u_buffer, offsetof(YV12_BUFFER_CONFIG, u_buffer)); DEFINE(yv12_buffer_config_v_buffer, offsetof(YV12_BUFFER_CONFIG, v_buffer)); DEFINE(yv12_buffer_config_border, offsetof(YV12_BUFFER_CONFIG, border)); -DEFINE(VP8BORDERINPIXELS_VAL, VP8BORDERINPIXELS); +DEFINE(VP9BORDERINPIXELS_VAL, VP9BORDERINPIXELS); END @@ -36,5 +36,5 @@ END #if HAVE_ARMV7 /* vp8_yv12_extend_frame_borders_neon makes several assumptions based on this */ -ct_assert(VP8BORDERINPIXELS_VAL, VP8BORDERINPIXELS == 32) +ct_assert(VP9BORDERINPIXELS_VAL, VP9BORDERINPIXELS == 32) #endif diff --git a/vp9/common/postproc.c b/vp9/common/postproc.c index a05ed1236..b947938e3 100644 --- a/vp9/common/postproc.c +++ b/vp9/common/postproc.c @@ -12,7 +12,6 @@ #include "vpx_ports/config.h" #include "vpx_scale/yv12config.h" #include "postproc.h" -#include "vpx_scale/yv12extend.h" #include "vpx_scale/vpxscale.h" #include "systemdependent.h" @@ -667,7 +666,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_deblock(oci->frame_to_show, &oci->post_proc_buffer, q, 1, 0, RTCD_VTABLE(oci)); } else { - vp8_yv12_copy_frame_ptr(oci->frame_to_show, &oci->post_proc_buffer); + vp8_yv12_copy_frame(oci->frame_to_show, &oci->post_proc_buffer); } if (flags & VP9D_ADDNOISE) { diff --git a/vp9/common/reconinter.c b/vp9/common/reconinter.c index 252485fe0..536b28753 100644 --- a/vp9/common/reconinter.c +++ b/vp9/common/reconinter.c @@ -576,27 +576,29 @@ static void clamp_mv_to_umv_border(MV *mv, const MACROBLOCKD *xd) { * filtering. The bottom and right edges use 16 pixels plus 2 pixels * left of the central pixel when filtering. */ - if (mv->col < (xd->mb_to_left_edge - ((16 + INTERP_EXTEND) << 3))) + if (mv->col < (xd->mb_to_left_edge - ((16 + VP9_INTERP_EXTEND) << 3))) mv->col = xd->mb_to_left_edge - (16 << 3); - else if (mv->col > xd->mb_to_right_edge + ((15 + INTERP_EXTEND) << 3)) + else if (mv->col > xd->mb_to_right_edge + ((15 + VP9_INTERP_EXTEND) << 3)) mv->col = xd->mb_to_right_edge + (16 << 3); - if (mv->row < (xd->mb_to_top_edge - ((16 + INTERP_EXTEND) << 3))) + if (mv->row < (xd->mb_to_top_edge - ((16 + VP9_INTERP_EXTEND) << 3))) mv->row = xd->mb_to_top_edge - (16 << 3); - else if (mv->row > xd->mb_to_bottom_edge + ((15 + INTERP_EXTEND) << 3)) + else if (mv->row > xd->mb_to_bottom_edge + ((15 + VP9_INTERP_EXTEND) << 3)) mv->row = xd->mb_to_bottom_edge + (16 << 3); } /* A version of the above function for chroma block MVs.*/ static void clamp_uvmv_to_umv_border(MV *mv, const MACROBLOCKD *xd) { - mv->col = (2 * mv->col < (xd->mb_to_left_edge - ((16 + INTERP_EXTEND) << 3))) ? + const int extend = VP9_INTERP_EXTEND; + + mv->col = (2 * mv->col < (xd->mb_to_left_edge - ((16 + extend) << 3))) ? (xd->mb_to_left_edge - (16 << 3)) >> 1 : mv->col; - mv->col = (2 * mv->col > xd->mb_to_right_edge + ((15 + INTERP_EXTEND) << 3)) ? + mv->col = (2 * mv->col > xd->mb_to_right_edge + ((15 + extend) << 3)) ? (xd->mb_to_right_edge + (16 << 3)) >> 1 : mv->col; - mv->row = (2 * mv->row < (xd->mb_to_top_edge - ((16 + INTERP_EXTEND) << 3))) ? + mv->row = (2 * mv->row < (xd->mb_to_top_edge - ((16 + extend) << 3))) ? (xd->mb_to_top_edge - (16 << 3)) >> 1 : mv->row; - mv->row = (2 * mv->row > xd->mb_to_bottom_edge + ((15 + INTERP_EXTEND) << 3)) ? + mv->row = (2 * mv->row > xd->mb_to_bottom_edge + ((15 + extend) << 3)) ? (xd->mb_to_bottom_edge + (16 << 3)) >> 1 : mv->row; } @@ -621,12 +623,12 @@ void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd, if (xd->mode_info_context->mbmi.pred_filter_enabled) { if ((ymv.as_mv.row | ymv.as_mv.col) & 7) { // Sub-pel filter needs extended input - int len = 15 + (INTERP_EXTEND << 1); + int len = 15 + (VP9_INTERP_EXTEND << 1); unsigned char Temp[32 * 32]; // Data required by sub-pel filter - unsigned char *pTemp = Temp + (INTERP_EXTEND - 1) * (len + 1); + unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); // Copy extended MB into Temp array, applying the spatial filter - filter_mb(ptr - (INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, + filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, Temp, len, len, len); // Sub-pel interpolation @@ -693,15 +695,15 @@ void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd, int i; unsigned char *pSrc = uptr; unsigned char *pDst = dst_u; - int len = 7 + (INTERP_EXTEND << 1); + int len = 7 + (VP9_INTERP_EXTEND << 1); unsigned char Temp[32 * 32]; // Data required by the sub-pel filter - unsigned char *pTemp = Temp + (INTERP_EXTEND - 1) * (len + 1); + unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); // U & V for (i = 0; i < 2; i++) { if (_o16x16mv.as_int & 0x000f000f) { // Copy extended MB into Temp array, applying the spatial filter - filter_mb(pSrc - (INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, + filter_mb(pSrc - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, Temp, len, len, len); // Sub-pel filter @@ -831,12 +833,12 @@ void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd, if (xd->mode_info_context->mbmi.pred_filter_enabled) { if ((mv_row | mv_col) & 7) { // Sub-pel filter needs extended input - int len = 15 + (INTERP_EXTEND << 1); + int len = 15 + (VP9_INTERP_EXTEND << 1); unsigned char Temp[32 * 32]; // Data required by sub-pel filter - unsigned char *pTemp = Temp + (INTERP_EXTEND - 1) * (len + 1); + unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); // Copy extended MB into Temp array, applying the spatial filter - filter_mb(ptr - (INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, + filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, Temp, len, len, len); // Sub-pel filter @@ -898,9 +900,9 @@ void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd, #if CONFIG_PRED_FILTER if (xd->mode_info_context->mbmi.pred_filter_enabled) { int i; - int len = 7 + (INTERP_EXTEND << 1); + int len = 7 + (VP9_INTERP_EXTEND << 1); unsigned char Temp[32 * 32]; // Data required by sub-pel filter - unsigned char *pTemp = Temp + (INTERP_EXTEND - 1) * (len + 1); + unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); unsigned char *pSrc = uptr; unsigned char *pDst = dst_u; @@ -908,7 +910,7 @@ void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd, for (i = 0; i < 2; i++) { if ((omv_row | omv_col) & 15) { // Copy extended MB into Temp array, applying the spatial filter - filter_mb(pSrc - (INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, + filter_mb(pSrc - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, Temp, len, len, len); // Sub-pel filter diff --git a/vp9/common/rtcd_defs.sh b/vp9/common/rtcd_defs.sh index ec68f50d0..f909c1898 100644 --- a/vp9/common/rtcd_defs.sh +++ b/vp9/common/rtcd_defs.sh @@ -480,3 +480,39 @@ specialize vp9_short_walsh8x4_x8 fi # end encoder functions + +# Scaler functions +if [ "CONFIG_SPATIAL_RESAMPLING" != "yes" ]; then + prototype void vp8_horizontal_line_4_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_last_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_2_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_last_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_3_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_last_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_3_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_last_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_1_2_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_last_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_5_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_5_4_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_5_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_5_3_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_horizontal_line_2_1_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width" + prototype void vp8_vertical_band_2_1_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" + prototype void vp8_vertical_band_2_1_scale_i "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width" +fi + +prototype void vp8_yv12_extend_frame_borders "struct yv12_buffer_config *ybf" +specialize vp8_yv12_extend_frame_borders neon + +prototype void vp8_yv12_copy_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc" +specialize vp8_yv12_copy_frame neon + +prototype void vp8_yv12_copy_y "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc" +specialize vp8_yv12_copy_y neon + diff --git a/vp9/decoder/decodframe.c b/vp9/decoder/decodframe.c index 0499eeb9d..dd1d5ab0b 100644 --- a/vp9/decoder/decodframe.c +++ b/vp9/decoder/decodframe.c @@ -20,7 +20,6 @@ #include "vp9/common/entropymode.h" #include "vp9/common/quant_common.h" #include "vpx_scale/vpxscale.h" -#include "vpx_scale/yv12extend.h" #include "vp9/common/setupintrarecon.h" #include "decodemv.h" diff --git a/vp9/decoder/onyxd_if.c b/vp9/decoder/onyxd_if.c index 3364856a6..2654985b8 100644 --- a/vp9/decoder/onyxd_if.c +++ b/vp9/decoder/onyxd_if.c @@ -17,7 +17,6 @@ #include "onyxd_int.h" #include "vpx_mem/vpx_mem.h" #include "vp9/common/alloccommon.h" -#include "vpx_scale/yv12extend.h" #include "vp9/common/loopfilter.h" #include "vp9/common/swapyv12buffer.h" #include <stdio.h> @@ -108,7 +107,6 @@ void vp9_initialize_dec(void) { if (!init_done) { vp9_initialize_common(); vp9_init_quant_tables(); - vp8_scale_machine_specific_config(); init_done = 1; } } @@ -191,7 +189,7 @@ vpx_codec_err_t vp9_get_reference_dec(VP9D_PTR ptr, VP9_REFFRAME ref_frame_flag, vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR, "Incorrect buffer dimensions"); } else - vp8_yv12_copy_frame_ptr(&cm->yv12_fb[ref_fb_idx], sd); + vp8_yv12_copy_frame(&cm->yv12_fb[ref_fb_idx], sd); return pbi->common.error.error_code; } @@ -231,7 +229,7 @@ vpx_codec_err_t vp9_set_reference_dec(VP9D_PTR ptr, VP9_REFFRAME ref_frame_flag, /* Manage the reference counters and copy image. */ ref_cnt_fb(cm->fb_idx_ref_cnt, ref_fb_ptr, free_fb); - vp8_yv12_copy_frame_ptr(sd, &cm->yv12_fb[*ref_fb_ptr]); + vp8_yv12_copy_frame(sd, &cm->yv12_fb[*ref_fb_ptr]); } return pbi->common.error.error_code; @@ -428,7 +426,7 @@ int vp9_receive_compressed_data(VP9D_PTR ptr, unsigned long size, /* Apply the loop filter if appropriate. */ vp9_loop_filter_frame(cm, &pbi->mb); } - vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show); + vp8_yv12_extend_frame_borders(cm->frame_to_show); } #if CONFIG_DEBUG diff --git a/vp9/encoder/arm/neon/picklpf_arm.c b/vp9/encoder/arm/neon/picklpf_arm.c index f16dadc62..9357769fe 100644 --- a/vp9/encoder/arm/neon/picklpf_arm.c +++ b/vp9/encoder/arm/neon/picklpf_arm.c @@ -13,7 +13,6 @@ #include "vp9/encoder/onyx_int.h" #include "vp9/encoder/quantize.h" #include "vpx_mem/vpx_mem.h" -#include "vpx_scale/yv12extend.h" #include "vpx_scale/vpxscale.h" #include "vp9/common/alloccommon.h" diff --git a/vp9/encoder/encodeframe.c b/vp9/encoder/encodeframe.c index a4be21fea..47f7c3749 100644 --- a/vp9/encoder/encodeframe.c +++ b/vp9/encoder/encodeframe.c @@ -574,12 +574,12 @@ static void pick_mb_modes(VP9_COMP *cpi, // Set up limit values for MV components to prevent them from // extending beyond the UMV borders assuming 16x16 block size - x->mv_row_min = -((mb_row * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); - x->mv_col_min = -((mb_col * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); + x->mv_row_min = -((mb_row * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); + x->mv_col_min = -((mb_col * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); x->mv_row_max = ((cm->mb_rows - mb_row) * 16 + - (VP8BORDERINPIXELS - 16 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND)); x->mv_col_max = ((cm->mb_cols - mb_col) * 16 + - (VP8BORDERINPIXELS - 16 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND)); xd->up_available = (mb_row != 0); xd->left_available = (mb_col != 0); @@ -759,12 +759,12 @@ static void pick_sb_modes (VP9_COMP *cpi, /* Set up limit values for MV components to prevent them from * extending beyond the UMV borders assuming 16x16 block size */ - x->mv_row_min = -((mb_row * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); - x->mv_col_min = -((mb_col * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); + x->mv_row_min = -((mb_row * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); + x->mv_col_min = -((mb_col * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); x->mv_row_max = ((cm->mb_rows - mb_row) * 16 + - (VP8BORDERINPIXELS - 32 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 32 - VP9_INTERP_EXTEND)); x->mv_col_max = ((cm->mb_cols - mb_col) * 16 + - (VP8BORDERINPIXELS - 32 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 32 - VP9_INTERP_EXTEND)); xd->up_available = (mb_row != 0); xd->left_available = (mb_col != 0); @@ -939,22 +939,22 @@ static void encode_sb(VP9_COMP *cpi, if (xd->mode_info_context->mbmi.encoded_as_sb) { // Set up limit values for MV components to prevent them from // extending beyond the UMV borders assuming 32x32 block size - x->mv_row_min = -((mb_row * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); - x->mv_col_min = -((mb_col * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); + x->mv_row_min = -((mb_row * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); + x->mv_col_min = -((mb_col * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); x->mv_row_max = ((cm->mb_rows - mb_row) * 16 + - (VP8BORDERINPIXELS - 32 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 32 - VP9_INTERP_EXTEND)); x->mv_col_max = ((cm->mb_cols - mb_col) * 16 + - (VP8BORDERINPIXELS - 32 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 32 - VP9_INTERP_EXTEND)); } else { #endif // Set up limit values for MV components to prevent them from // extending beyond the UMV borders assuming 16x16 block size - x->mv_row_min = -((mb_row * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); - x->mv_col_min = -((mb_col * 16) + VP8BORDERINPIXELS - INTERP_EXTEND); + x->mv_row_min = -((mb_row * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); + x->mv_col_min = -((mb_col * 16) + VP9BORDERINPIXELS - VP9_INTERP_EXTEND); x->mv_row_max = ((cm->mb_rows - mb_row) * 16 + - (VP8BORDERINPIXELS - 16 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND)); x->mv_col_max = ((cm->mb_cols - mb_col) * 16 + - (VP8BORDERINPIXELS - 16 - INTERP_EXTEND)); + (VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND)); #if CONFIG_SUPERBLOCKS } #endif diff --git a/vp9/encoder/firstpass.c b/vp9/encoder/firstpass.c index 4ca190334..b9a3ac4c9 100644 --- a/vp9/encoder/firstpass.c +++ b/vp9/encoder/firstpass.c @@ -21,7 +21,6 @@ #include "encodemb.h" #include "vp9/common/extend.h" #include "vp9/common/systemdependent.h" -#include "vpx_scale/yv12extend.h" #include "vpx_mem/vpx_mem.h" #include "vp9/common/swapyv12buffer.h" #include <stdio.h> @@ -513,8 +512,9 @@ void vp9_first_pass(VP9_COMP *cpi) { recon_uvoffset = (mb_row * recon_uv_stride * 8); // Set up limit values for motion vectors to prevent them extending outside the UMV borders - x->mv_row_min = -((mb_row * 16) + (VP8BORDERINPIXELS - 16)); - x->mv_row_max = ((cm->mb_rows - 1 - mb_row) * 16) + (VP8BORDERINPIXELS - 16); + x->mv_row_min = -((mb_row * 16) + (VP9BORDERINPIXELS - 16)); + x->mv_row_max = ((cm->mb_rows - 1 - mb_row) * 16) + + (VP9BORDERINPIXELS - 16); // for each macroblock col in image @@ -544,8 +544,9 @@ void vp9_first_pass(VP9_COMP *cpi) { intra_error += (int64_t)this_error; // Set up limit values for motion vectors to prevent them extending outside the UMV borders - x->mv_col_min = -((mb_col * 16) + (VP8BORDERINPIXELS - 16)); - x->mv_col_max = ((cm->mb_cols - 1 - mb_col) * 16) + (VP8BORDERINPIXELS - 16); + x->mv_col_min = -((mb_col * 16) + (VP9BORDERINPIXELS - 16)); + x->mv_col_max = ((cm->mb_cols - 1 - mb_col) * 16) + + (VP9BORDERINPIXELS - 16); // Other than for the first frame do a motion search if (cm->current_video_frame > 0) { @@ -764,7 +765,7 @@ void vp9_first_pass(VP9_COMP *cpi) { (cpi->twopass.this_frame_stats->pcnt_inter > 0.20) && ((cpi->twopass.this_frame_stats->intra_error / cpi->twopass.this_frame_stats->coded_error) > 2.0))) { - vp8_yv12_copy_frame_ptr(lst_yv12, gld_yv12); + vp8_yv12_copy_frame(lst_yv12, gld_yv12); cpi->twopass.sr_update_lag = 1; } else cpi->twopass.sr_update_lag++; @@ -775,7 +776,7 @@ void vp9_first_pass(VP9_COMP *cpi) { // Special case for the first frame. Copy into the GF buffer as a second reference. if (cm->current_video_frame == 0) { - vp8_yv12_copy_frame_ptr(lst_yv12, gld_yv12); + vp8_yv12_copy_frame(lst_yv12, gld_yv12); } diff --git a/vp9/encoder/lookahead.c b/vp9/encoder/lookahead.c index 25fa06921..ca0b4cdf4 100644 --- a/vp9/encoder/lookahead.c +++ b/vp9/encoder/lookahead.c @@ -80,7 +80,7 @@ vp9_lookahead_init(unsigned int width, goto bail; for (i = 0; i < depth; i++) if (vp8_yv12_alloc_frame_buffer(&ctx->buf[i].img, - width, height, VP8BORDERINPIXELS)) + width, height, VP9BORDERINPIXELS)) goto bail; } return ctx; diff --git a/vp9/encoder/mbgraph.c b/vp9/encoder/mbgraph.c index 975cfe5dd..301826e50 100644 --- a/vp9/encoder/mbgraph.c +++ b/vp9/encoder/mbgraph.c @@ -303,8 +303,9 @@ static void update_mbgraph_frame_stats // Set up limit values for motion vectors to prevent them extending outside the UMV borders arf_top_mv.as_int = 0; gld_top_mv.as_int = 0; - x->mv_row_min = -(VP8BORDERINPIXELS - 16 - INTERP_EXTEND); - x->mv_row_max = (cm->mb_rows - 1) * 16 + VP8BORDERINPIXELS - 16 - INTERP_EXTEND; + x->mv_row_min = -(VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND); + x->mv_row_max = (cm->mb_rows - 1) * 16 + VP9BORDERINPIXELS + - 16 - VP9_INTERP_EXTEND; xd->up_available = 0; xd->dst.y_stride = buf->y_stride; xd->pre.y_stride = buf->y_stride; @@ -320,8 +321,9 @@ static void update_mbgraph_frame_stats // Set up limit values for motion vectors to prevent them extending outside the UMV borders arf_left_mv.as_int = arf_top_mv.as_int; gld_left_mv.as_int = gld_top_mv.as_int; - x->mv_col_min = -(VP8BORDERINPIXELS - 16 - INTERP_EXTEND); - x->mv_col_max = (cm->mb_cols - 1) * 16 + VP8BORDERINPIXELS - 16 - INTERP_EXTEND; + x->mv_col_min = -(VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND); + x->mv_col_max = (cm->mb_cols - 1) * 16 + VP9BORDERINPIXELS + - 16 - VP9_INTERP_EXTEND; xd->left_available = 0; for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) { diff --git a/vp9/encoder/mcomp.c b/vp9/encoder/mcomp.c index 29d0a1e05..60ec49c95 100644 --- a/vp9/encoder/mcomp.c +++ b/vp9/encoder/mcomp.c @@ -275,14 +275,14 @@ int vp9_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int buf_r1, buf_r2, buf_c1, buf_c2; // Clamping to avoid out-of-range data access - buf_r1 = ((bestmv->as_mv.row - INTERP_EXTEND) < x->mv_row_min) ? - (bestmv->as_mv.row - x->mv_row_min) : INTERP_EXTEND - 1; - buf_r2 = ((bestmv->as_mv.row + INTERP_EXTEND) > x->mv_row_max) ? - (x->mv_row_max - bestmv->as_mv.row) : INTERP_EXTEND - 1; - buf_c1 = ((bestmv->as_mv.col - INTERP_EXTEND) < x->mv_col_min) ? - (bestmv->as_mv.col - x->mv_col_min) : INTERP_EXTEND - 1; - buf_c2 = ((bestmv->as_mv.col + INTERP_EXTEND) > x->mv_col_max) ? - (x->mv_col_max - bestmv->as_mv.col) : INTERP_EXTEND - 1; + buf_r1 = ((bestmv->as_mv.row - VP9_INTERP_EXTEND) < x->mv_row_min) ? + (bestmv->as_mv.row - x->mv_row_min) : VP9_INTERP_EXTEND - 1; + buf_r2 = ((bestmv->as_mv.row + VP9_INTERP_EXTEND) > x->mv_row_max) ? + (x->mv_row_max - bestmv->as_mv.row) : VP9_INTERP_EXTEND - 1; + buf_c1 = ((bestmv->as_mv.col - VP9_INTERP_EXTEND) < x->mv_col_min) ? + (bestmv->as_mv.col - x->mv_col_min) : VP9_INTERP_EXTEND - 1; + buf_c2 = ((bestmv->as_mv.col + VP9_INTERP_EXTEND) > x->mv_col_max) ? + (x->mv_col_max - bestmv->as_mv.col) : VP9_INTERP_EXTEND - 1; y_stride = 32; /* Copy to intermediate buffer before searching. */ diff --git a/vp9/encoder/onyx_if.c b/vp9/encoder/onyx_if.c index d89e055dc..3534c39f1 100644 --- a/vp9/encoder/onyx_if.c +++ b/vp9/encoder/onyx_if.c @@ -23,7 +23,6 @@ #include "ratectrl.h" #include "vp9/common/quant_common.h" #include "segmentation.h" -#include "vpx_scale/yv12extend.h" #if CONFIG_POSTPROC #include "vp9/common/postproc.h" #endif @@ -309,7 +308,6 @@ void vp9_initialize_enc() { static int init_done = 0; if (!init_done) { - vp8_scale_machine_specific_config(); vp9_initialize_common(); vp9_tokenize_initialize(); vp9_init_quant_tables(); @@ -1239,7 +1237,7 @@ static void alloc_raw_frame_buffers(VP9_COMP *cpi) { #if VP9_TEMPORAL_ALT_REF if (vp8_yv12_alloc_frame_buffer(&cpi->alt_ref_buffer, - width, height, VP8BORDERINPIXELS)) + width, height, VP9BORDERINPIXELS)) vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, "Failed to allocate altref buffer"); @@ -1283,12 +1281,12 @@ void vp9_alloc_compressor_data(VP9_COMP *cpi) { if (vp8_yv12_alloc_frame_buffer(&cpi->last_frame_uf, - width, height, VP8BORDERINPIXELS)) + width, height, VP9BORDERINPIXELS)) vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, "Failed to allocate last frame buffer"); if (vp8_yv12_alloc_frame_buffer(&cpi->scaled_source, - width, height, VP8BORDERINPIXELS)) + width, height, VP9BORDERINPIXELS)) vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, "Failed to allocate scaled source buffer"); @@ -2405,7 +2403,7 @@ int vp9_get_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag, else return -1; - vp8_yv12_copy_frame_ptr(&cm->yv12_fb[ref_fb_idx], sd); + vp8_yv12_copy_frame(&cm->yv12_fb[ref_fb_idx], sd); return 0; } @@ -2426,7 +2424,7 @@ int vp9_set_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag, else return -1; - vp8_yv12_copy_frame_ptr(sd, &cm->yv12_fb[ref_fb_idx]); + vp8_yv12_copy_frame(sd, &cm->yv12_fb[ref_fb_idx]); return 0; } @@ -2806,7 +2804,7 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) { vp9_loop_filter_frame(cm, &cpi->mb.e_mbd); } - vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show); + vp8_yv12_extend_frame_borders(cm->frame_to_show); } diff --git a/vp9/encoder/picklpf.c b/vp9/encoder/picklpf.c index 9363bccca..71c0fb1f1 100644 --- a/vp9/encoder/picklpf.c +++ b/vp9/encoder/picklpf.c @@ -13,7 +13,6 @@ #include "onyx_int.h" #include "quantize.h" #include "vpx_mem/vpx_mem.h" -#include "vpx_scale/yv12extend.h" #include "vpx_scale/vpxscale.h" #include "vp9/common/alloccommon.h" #include "vp9/common/loopfilter.h" @@ -279,7 +278,7 @@ void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) { #endif #if !HAVE_ARMV7 || CONFIG_RUNTIME_CPU_DETECT { - vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cpi->last_frame_uf); + vp8_yv12_copy_frame(cm->frame_to_show, &cpi->last_frame_uf); } #endif @@ -320,7 +319,7 @@ void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) { #endif #if !HAVE_ARMV7 || CONFIG_RUNTIME_CPU_DETECT { - vp8_yv12_copy_frame_yonly_ptr(&cpi->last_frame_uf, cm->frame_to_show); + vp8_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); } #endif @@ -359,7 +358,7 @@ void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) { #endif #if !HAVE_ARMV7 || CONFIG_RUNTIME_CPU_DETECT { - vp8_yv12_copy_frame_yonly_ptr(&cpi->last_frame_uf, cm->frame_to_show); + vp8_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); } #endif @@ -394,7 +393,7 @@ void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) { #endif #if !HAVE_ARMV7 || CONFIG_RUNTIME_CPU_DETECT { - vp8_yv12_copy_frame_yonly_ptr(&cpi->last_frame_uf, cm->frame_to_show); + vp8_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); } #endif diff --git a/vp9/encoder/temporal_filter.c b/vp9/encoder/temporal_filter.c index db8b36138..c2657e97e 100644 --- a/vp9/encoder/temporal_filter.c +++ b/vp9/encoder/temporal_filter.c @@ -22,7 +22,6 @@ #include "ratectrl.h" #include "vp9/common/quant_common.h" #include "segmentation.h" -#include "vpx_scale/yv12extend.h" #include "vpx_mem/vpx_mem.h" #include "vp9/common/swapyv12buffer.h" #include "vpx_ports/vpx_timer.h" @@ -247,18 +246,19 @@ static void temporal_filter_iterate_c for (mb_row = 0; mb_row < mb_rows; mb_row++) { #if ALT_REF_MC_ENABLED // Source frames are extended to 16 pixels. This is different than - // L/A/G reference frames that have a border of 32 (VP8BORDERINPIXELS) + // L/A/G reference frames that have a border of 32 (VP9BORDERINPIXELS) // A 6/8 tap filter is used for motion search. This requires 2 pixels // before and 3 pixels after. So the largest Y mv on a border would - // then be 16 - INTERP_EXTEND. The UV blocks are half the size of the Y and - // therefore only extended by 8. The largest mv that a UV block - // can support is 8 - INTERP_EXTEND. A UV mv is half of a Y mv. - // (16 - INTERP_EXTEND) >> 1 which is greater than 8 - INTERP_EXTEND. + // then be 16 - VP9_INTERP_EXTEND. The UV blocks are half the size of the + // Y and therefore only extended by 8. The largest mv that a UV block + // can support is 8 - VP9_INTERP_EXTEND. A UV mv is half of a Y mv. + // (16 - VP9_INTERP_EXTEND) >> 1 which is greater than + // 8 - VP9_INTERP_EXTEND. // To keep the mv in play for both Y and UV planes the max that it - // can be on a border is therefore 16 - (2*INTERP_EXTEND+1). - cpi->mb.mv_row_min = -((mb_row * 16) + (17 - 2 * INTERP_EXTEND)); + // can be on a border is therefore 16 - (2*VP9_INTERP_EXTEND+1). + cpi->mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VP9_INTERP_EXTEND)); cpi->mb.mv_row_max = ((cpi->common.mb_rows - 1 - mb_row) * 16) - + (17 - 2 * INTERP_EXTEND); + + (17 - 2 * VP9_INTERP_EXTEND); #endif for (mb_col = 0; mb_col < mb_cols; mb_col++) { @@ -269,9 +269,9 @@ static void temporal_filter_iterate_c vpx_memset(count, 0, 384 * sizeof(unsigned short)); #if ALT_REF_MC_ENABLED - cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * INTERP_EXTEND)); + cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND)); cpi->mb.mv_col_max = ((cpi->common.mb_cols - 1 - mb_col) * 16) - + (17 - 2 * INTERP_EXTEND); + + (17 - 2 * VP9_INTERP_EXTEND); #endif for (frame = 0; frame < frame_count; frame++) { diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 1d8d950e0..1572920f1 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -829,12 +829,12 @@ static vpx_image_t *vp8e_get_preview(vpx_codec_alg_priv_t *ctx) { /* vpx_img_wrap(&ctx->preview_img, VPX_IMG_FMT_YV12, - sd.y_width + 2*VP8BORDERINPIXELS, - sd.y_height + 2*VP8BORDERINPIXELS, + sd.y_width + 2*VP9BORDERINPIXELS, + sd.y_height + 2*VP9BORDERINPIXELS, 1, sd.buffer_alloc); vpx_img_set_rect(&ctx->preview_img, - VP8BORDERINPIXELS, VP8BORDERINPIXELS, + VP9BORDERINPIXELS, VP9BORDERINPIXELS, sd.y_width, sd.y_height); */ diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c index f93c6efa2..7116d5f9e 100644 --- a/vp9/vp9_dx_iface.c +++ b/vp9/vp9_dx_iface.c @@ -282,7 +282,7 @@ static void yuvconfig2image(vpx_image_t *img, img->fmt = yv12->clrtype == REG_YUV ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_VPXI420; img->w = yv12->y_stride; - img->h = (yv12->y_height + 2 * VP8BORDERINPIXELS + 15) & ~15; + img->h = (yv12->y_height + 2 * VP9BORDERINPIXELS + 15) & ~15; img->d_w = yv12->y_width; img->d_h = yv12->y_height; img->x_chroma_shift = 1; diff --git a/vpx_scale/arm/armv4/gen_scalers_armv4.asm b/vpx_scale/arm/armv4/gen_scalers_armv4.asm deleted file mode 100644 index e495184e7..000000000 --- a/vpx_scale/arm/armv4/gen_scalers_armv4.asm +++ /dev/null @@ -1,774 +0,0 @@ -; -; Copyright (c) 2010 The WebM 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. -; - - - EXPORT |horizontal_line_4_5_scale_armv4| - EXPORT |vertical_band_4_5_scale_armv4| - EXPORT |horizontal_line_2_3_scale_armv4| - EXPORT |vertical_band_2_3_scale_armv4| - EXPORT |horizontal_line_3_5_scale_armv4| - EXPORT |vertical_band_3_5_scale_armv4| - EXPORT |horizontal_line_3_4_scale_armv4| - EXPORT |vertical_band_3_4_scale_armv4| - EXPORT |horizontal_line_1_2_scale_armv4| - EXPORT |vertical_band_1_2_scale_armv4| - - AREA |.text|, CODE, READONLY ; name this block of code - -src RN r0 -srcw RN r1 -dest RN r2 -mask RN r12 -c51_205 RN r10 -c102_154 RN r11 -;/**************************************************************************** -; * -; * ROUTINE : horizontal_line_4_5_scale_armv4 -; * -; * INPUTS : const unsigned char *source : Pointer to source data. -; * unsigned int source_width : Stride of source. -; * unsigned char *dest : Pointer to destination data. -; * unsigned int dest_width : Stride of destination (NOT USED). -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Copies horizontal line of pixels from source to -; * destination scaling up by 4 to 5. -; * -; * SPECIAL NOTES : None. -; * -; ****************************************************************************/ -;void horizontal_line_4_5_scale_armv4 -;( -; r0 = UINT8 *source -; r1 = UINT32 source_width -; r2 = UINT8 *dest -; r3 = UINT32 dest_width -;) -|horizontal_line_4_5_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - - mov mask, #255 ; mask for selection - ldr c51_205, =0x3300cd - ldr c102_154, =0x66009a - - ldr r3, [src], #4 - -hl45_loop - - and r4, r3, mask ; a = src[0] - and r5, mask, r3, lsr #8 ; b = src[1] - strb r4, [dest], #1 - - orr r6, r4, r5, lsl #16 ; b | a - and r7, mask, r3, lsr #16 ; c = src[2] - mul r6, c51_205, r6 ; a * 51 + 205 * b - - orr r5, r5, r7, lsl #16 ; c | b - mul r5, c102_154, r5 ; b * 102 + 154 * c - add r6, r6, #0x8000 - and r8, mask, r3, lsr #24 ; d = src[3] - mov r6, r6, lsr #24 - strb r6, [dest], #1 - - orr r7, r8, r7, lsl #16 ; c | d - mul r7, c102_154, r7 ; c * 154 + 102 * d - add r5, r5, #0x8000 - ldr r3, [src], #4 - mov r5, r5, lsr #24 - strb r5, [dest], #1 - - add r7, r7, #0x8000 - and r9, mask, r3 ; e = src[4] - orr r9, r9, r8, lsl #16 ; d | e - mul r9, c51_205, r9 ; d * 205 + 51 * e - mov r7, r7, lsr #24 - strb r7, [dest], #1 - - add r9, r9, #0x8000 - subs srcw, srcw, #4 - mov r9, r9, lsr #24 - strb r9, [dest], #1 - - bne hl45_loop - - and r4, r3, mask - and r5, mask, r3, lsl #8 - strb r4, [dest], #1 - - orr r6, r4, r5, lsl #16 ; b | a - mul r6, c51_205, r6 - - and r7, mask, r3, lsl #16 - orr r5, r5, r7, lsl #16 ; c | b - mul r5, c102_154, r5 - add r6, r6, #0x8000 - and r8, mask, r3, lsl #24 - mov r6, r6, lsr #24 - strb r6, [dest], #1 - - orr r7, r8, r7, lsl #16 ; c | d - mul r7, c102_154, r7 - add r5, r5, #0x8000 - mov r5, r5, lsr #24 - strb r5, [dest], #1 - - add r7, r7, #0x8000 - mov r7, r7, lsr #24 - strb r7, [dest], #1 - - ldrb r3, [src] - strb r3, [dest], #1 - - ldmia sp!, {r4 - r11, pc} - ENDP ;|vp8cx_horizontal_line_4_5_scale_c| - -;/**************************************************************************** -; * -; * ROUTINE : vertical_band_4_5_scale_armv4 -; * -; * INPUTS : unsigned char *dest : Pointer to destination data. -; * unsigned int dest_pitch : Stride of destination data. -; * unsigned int dest_width : Width of destination data. -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Scales vertical band of pixels by scale 4 to 5. The -; * height of the band scaled is 4-pixels. -; * -; * SPECIAL NOTES : The routine uses the first line of the band below -; * the current band. -; * -; ****************************************************************************/ -;void vertical_band_4_5_scale_armv4 -;( -; r0 = UINT8 *dest -; r1 = UINT32 dest_pitch -; r2 = UINT32 dest_width -;) -|vertical_band_4_5_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - - ldr c51_205, =0x3300cd - ldr c102_154, =0x66009a - -vl45_loop - mov r3, src - ldrb r4, [r3], r1 ; a = des [0] - ldrb r5, [r3], r1 ; b = des [dest_pitch] - ldrb r7, [r3], r1 ; c = des[dest_pitch*2] - add lr, src, r1 - - orr r6, r4, r5, lsl #16 ; b | a - mul r6, c51_205, r6 ; a * 51 + 205 * b - - ldrb r8, [r3], r1 ; d = des[dest_pitch*3] - orr r5, r5, r7, lsl #16 ; c | b - mul r5, c102_154, r5 ; b * 102 + 154 * c - add r6, r6, #0x8000 - orr r7, r8, r7, lsl #16 ; c | d - mov r6, r6, lsr #24 - strb r6, [lr], r1 - - ldrb r9, [r3, r1] ; e = des [dest_pitch * 5] - mul r7, c102_154, r7 ; c * 154 + 102 * d - add r5, r5, #0x8000 - orr r9, r9, r8, lsl #16 ; d | e - mov r5, r5, lsr #24 - strb r5, [lr], r1 - - mul r9, c51_205, r9 ; d * 205 + 51 * e - add r7, r7, #0x8000 - add src, src, #1 - mov r7, r7, lsr #24 - strb r7, [lr], r1 - - add r9, r9, #0x8000 - subs r2, r2, #1 - mov r9, r9, lsr #24 - strb r9, [lr], r1 - - bne vl45_loop - - ldmia sp!, {r4 - r11, pc} - ENDP ;|vertical_band_4_5_scale_armv4| - -;/**************************************************************************** -; * -; * ROUTINE : horizontal_line_2_3_scale_armv4 -; * -; * INPUTS : const unsigned char *source : Pointer to source data. -; * unsigned int source_width : Stride of source. -; * unsigned char *dest : Pointer to destination data. -; * unsigned int dest_width : Stride of destination (NOT USED). -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Copies horizontal line of pixels from source to -; * destination scaling up by 2 to 3. -; * -; * SPECIAL NOTES : None. -; * -; * -; ****************************************************************************/ -;void horizontal_line_2_3_scale_armv4 -;( -; const unsigned char *source, -; unsigned int source_width, -; unsigned char *dest, -; unsigned int dest_width -;) -|horizontal_line_2_3_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - ldr lr, =85 - ldr r12, =171 - -hl23_loop - - ldrb r3, [src], #1 ; a - ldrb r4, [src], #1 ; b - ldrb r5, [src] ; c - - strb r3, [dest], #1 - mul r4, r12, r4 ; b * 171 - mla r6, lr, r3, r4 ; a * 85 - mla r7, lr, r5, r4 ; c * 85 - - add r6, r6, #128 - mov r6, r6, lsr #8 - strb r6, [dest], #1 - - add r7, r7, #128 - mov r7, r7, lsr #8 - strb r7, [dest], #1 - - subs srcw, srcw, #2 - bne hl23_loop - - ldrb r4, [src, #1] ; b - strb r5, [dest], #1 - strb r4, [dest, #1] - - mul r4, r12, r4 ; b * 171 - mla r6, lr, r5, r4 ; a * 85 + b *171 - - add r6, r6, #128 - mov r6, r6, lsr #8 - strb r6, [dest] - - ldmia sp!, {r4 - r11, pc} - ENDP ;|horizontal_line_2_3_scale_armv4| - -;/**************************************************************************** -; * -; * ROUTINE : vertical_band_2_3_scale_armv4 -; * -; * INPUTS : unsigned char *dest : Pointer to destination data. -; * unsigned int dest_pitch : Stride of destination data. -; * unsigned int dest_width : Width of destination data. -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Scales vertical band of pixels by scale 2 to 3. The -; * height of the band scaled is 2-pixels. -; * -; * SPECIAL NOTES : The routine uses the first line of the band below -; * the current band. -; * -; ****************************************************************************/ -;void vertical_band_2_3_scale_armv4 -;( -; r0 = UINT8 *dest -; r1 = UINT32 dest_pitch -; r2 = UINT32 dest_width -;) -|vertical_band_2_3_scale_armv4| PROC - stmdb sp!, {r4 - r8, lr} - ldr lr, =85 - ldr r12, =171 - add r3, r1, r1, lsl #1 ; 3 * dest_pitch - -vl23_loop - ldrb r4, [src] ; a = des [0] - ldrb r5, [src, r1] ; b = des [dest_pitch] - ldrb r7, [src, r3] ; c = des [dest_pitch*3] - subs r2, r2, #1 - - mul r5, r12, r5 ; b * 171 - mla r6, lr, r4, r5 ; a * 85 - mla r8, lr, r7, r5 ; c * 85 - - add r6, r6, #128 - mov r6, r6, lsr #8 - strb r6, [src, r1] - - add r8, r8, #128 - mov r8, r8, lsr #8 - strb r8, [src, r1, lsl #1] - - add src, src, #1 - - bne vl23_loop - - ldmia sp!, {r4 - r8, pc} - ENDP ;|vertical_band_2_3_scale_armv4| - -;/**************************************************************************** -; * -; * ROUTINE : vp8cx_horizontal_line_3_5_scale_c -; * -; * INPUTS : const unsigned char *source : Pointer to source data. -; * unsigned int source_width : Stride of source. -; * unsigned char *dest : Pointer to destination data. -; * unsigned int dest_width : Stride of destination (NOT USED). -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Copies horizontal line of pixels from source to -; * destination scaling up by 3 to 5. -; * -; * SPECIAL NOTES : None. -; * -; * -; ****************************************************************************/ -;void vp8cx_horizontal_line_3_5_scale_c -;( -; const unsigned char *source, -; unsigned int source_width, -; unsigned char *dest, -; unsigned int dest_width -;) -|horizontal_line_3_5_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - - ldr c51_205, =0x3300cd - ldr c102_154, =0x66009a - - ldrb r4, [src], #1 ; a = src[0] - -hl35_loop - - ldrb r8, [src], #1 ; b = src[1] - strb r4, [dest], #1 - - orr r6, r4, r8, lsl #16 ; b | a - ldrb r9, [src], #1 ; c = src[2] - mul r6, c102_154, r6 ; a * 102 + 154 * b - - orr r5, r9, r8, lsl #16 ; b | c - mul r5, c51_205, r5 ; b * 205 + 51 * c - add r6, r6, #0x8000 - ldrb r4, [src], #1 ; d = src[3] - mov r6, r6, lsr #24 - strb r6, [dest], #1 - - orr r7, r8, r9, lsl #16 ; c | b - mul r7, c51_205, r7 ; c * 205 + 154 * b - add r5, r5, #0x8000 - mov r5, r5, lsr #24 - strb r5, [dest], #1 - - orr r9, r4, r9, lsl #16 ; c | d - mul r9, c102_154, r9 ; c * 154 + 102 * d - add r7, r7, #0x8000 - mov r7, r7, lsr #24 - strb r7, [dest], #1 - - add r9, r9, #0x8000 - subs srcw, srcw, #3 - mov r9, r9, lsr #24 - strb r9, [dest], #1 - - bpl hl35_loop - - ldrb r5, [src], #1 ; b = src[1] - strb r4, [dest], #1 - - orr r6, r4, r8, lsl #16 ; b | a - ldrb r9, [src], #1 ; c = src[2] - mul r6, c102_154, r6 ; a * 102 + 154 * b - - orr r5, r9, r8, lsl #16 ; b | c - mul r5, c51_205, r5 ; b * 205 + 51 * c - add r6, r6, #0x8000 - mov r6, r6, lsr #24 - strb r6, [dest], #1 - - orr r7, r8, r9, lsl #16 ; c | b - mul r7, c51_205, r7 ; c * 205 + 154 * b - add r5, r5, #0x8000 - mov r5, r5, lsr #24 - strb r5, [dest], #1 - - add r7, r7, #0x8000 - mov r7, r7, lsr #24 - strb r7, [dest], #1 - strb r9, [dest], #1 - - ldmia sp!, {r4 - r11, pc} - ENDP ;|vp8cx_horizontal_line_3_5_scale_c| - - -;/**************************************************************************** -; * -; * ROUTINE : vp8cx_vertical_band_3_5_scale_c -; * -; * INPUTS : unsigned char *dest : Pointer to destination data. -; * unsigned int dest_pitch : Stride of destination data. -; * unsigned int dest_width : Width of destination data. -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Scales vertical band of pixels by scale 3 to 5. The -; * height of the band scaled is 3-pixels. -; * -; * SPECIAL NOTES : The routine uses the first line of the band below -; * the current band. -; * -; ****************************************************************************/ -;void vertical_band_4_5_scale_armv4 -;( -; r0 = UINT8 *dest -; r1 = UINT32 dest_pitch -; r2 = UINT32 dest_width -;) -|vertical_band_3_5_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - - ldr c51_205, =0x3300cd - ldr c102_154, =0x66009a - -vl35_loop - mov r3, src - ldrb r4, [r3], r1 ; a = des [0] - ldrb r5, [r3], r1 ; b = des [dest_pitch] - ldrb r7, [r3], r1 ; c = des[dest_pitch*2] - add lr, src, r1 - - orr r8, r4, r5, lsl #16 ; b | a - mul r6, c102_154, r8 ; a * 102 + 154 * b - - ldrb r8, [r3, r1, lsl #1] ; d = des[dest_pitch*5] - orr r3, r7, r5, lsl #16 ; b | c - mul r9, c51_205, r3 ; b * 205 + 51 * c - add r6, r6, #0x8000 - orr r3, r5, r7, lsl #16 ; c | b - mov r6, r6, lsr #24 - strb r6, [lr], r1 - - mul r5, c51_205, r3 ; c * 205 + 154 * b - add r9, r9, #0x8000 - orr r3, r8, r7, lsl #16 ; c | d - mov r9, r9, lsr #24 - strb r9, [lr], r1 - - mul r7, c102_154, r3 ; c * 154 + 102 * d - add r5, r5, #0x8000 - add src, src, #1 - mov r5, r5, lsr #24 - strb r5, [lr], r1 - - add r7, r7, #0x8000 - subs r2, r2, #1 - mov r7, r7, lsr #24 - strb r7, [lr], r1 - - - bne vl35_loop - - ldmia sp!, {r4 - r11, pc} - ENDP ;|vertical_band_3_5_scale_armv4| - -;/**************************************************************************** -; * -; * ROUTINE : horizontal_line_3_4_scale_armv4 -; * -; * INPUTS : const unsigned char *source : Pointer to source data. -; * unsigned int source_width : Stride of source. -; * unsigned char *dest : Pointer to destination data. -; * unsigned int dest_width : Stride of destination (NOT USED). -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Copies horizontal line of pixels from source to -; * destination scaling up by 3 to 4. -; * -; * SPECIAL NOTES : None. -; * -; * -; ****************************************************************************/ -;void horizontal_line_3_4_scale_armv4 -;( -; const unsigned char *source, -; unsigned int source_width, -; unsigned char *dest, -; unsigned int dest_width -;) -|horizontal_line_3_4_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - - ldr r10, =64 - ldr r11, =192 - mov r9, #128 - - ldrb r4, [src], #1 ; a = src[0] - -hl34_loop - - ldrb r8, [src], #1 ; b = src[1] - ldrb r7, [src], #1 ; c = src[2] - strb r4, [dest], #1 - - mla r4, r10, r4, r9 ; a*64 + 128 - mla r4, r11, r8, r4 ; a*64 + b*192 + 1 - - add r8, r8, #1 ; b + 1 - add r8, r8, r7 ; b + c + 1 - mov r8, r8, asr #1 ; (b + c + 1) >> 1 - - mov r4, r4, asr #8 ; (a*64 + b*192 + 1) >> 8 - strb r4, [dest], #1 - - strb r8, [dest], #1 - - ldrb r4, [src], #1 ; [a+1] - - mla r7, r11, r7, r9 ; c*192 + 128 - mla r7, r4, r10, r7 ; a*64 + b*192 + 128 - - subs srcw, srcw, #3 - - mov r7, r7, asr #8 ; (a*64 + b*192 + 128) >> 8 - strb r7, [dest], #1 - - bpl hl34_loop - - ldrb r8, [src], #1 ; b = src[1] - ldrb r7, [src], #1 ; c = src[2] - strb r4, [dest], #1 - - mla r4, r10, r4, r9 ; a*64 + 128 - mla r4, r11, r8, r4 ; a*64 + b*192 + 1 - mov r4, r4, asr #8 ; (a*64 + b*192 + 1) >> 8 - strb r4, [dest], #1 - - add r8, r8, #1 ; b + 1 - add r8, r8, r7 ; b + c + 1 - mov r8, r8, asr #1 ; (b + c + 1) >> 1 - strb r8, [dest], #1 - strb r7, [dest], #1 - - ldmia sp!, {r4 - r11, pc} - ENDP ;|vp8cx_horizontal_line_3_4_scale_c| - - -;/**************************************************************************** -; * -; * ROUTINE : vertical_band_3_4_scale_armv4 -; * -; * INPUTS : unsigned char *dest : Pointer to destination data. -; * unsigned int dest_pitch : Stride of destination data. -; * unsigned int dest_width : Width of destination data. -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Scales vertical band of pixels by scale 3 to 4. The -; * height of the band scaled is 3-pixels. -; * -; * SPECIAL NOTES : The routine uses the first line of the band below -; * the current band. -; * -; ****************************************************************************/ -;void vertical_band_3_4_scale_armv4 -;( -; r0 = UINT8 *dest -; r1 = UINT32 dest_pitch -; r2 = UINT32 dest_width -;) -|vertical_band_3_4_scale_armv4| PROC - stmdb sp!, {r4 - r11, lr} - - ldr r10, =64 - ldr r11, =192 - mov r9, #128 - -; ldr r1,[r1] -vl34_loop - mov r3, src - ldrb r4, [r3], r1 ; a = des [0] - ldrb r5, [r3], r1 ; b = des [dest_pitch] - ldrb r7, [r3], r1 ; c = des [dest_pitch*2] - add lr, src, r1 - - mla r4, r10, r4, r9 ; a*64 + 128 - mla r4, r11, r5, r4 ; a*64 + b*192 + 1 - - add r5, r5, #1 ; b + 1 - add r5, r5, r7 ; b + c + 1 - mov r5, r5, asr #1 ; (b + c + 1) >> 1 - - mov r4, r4, asr #8 ; (a*64 + b*192 + 1) >> 8 - strb r4, [lr], r1 - - ldrb r4, [r3, r1] ; a = des [dest_pitch*4] - - strb r5, [lr], r1 - - mla r7, r11, r7, r9 ; c*192 + 128 - mla r7, r4, r10, r7 ; a*64 + b*192 + 128 - mov r7, r7, asr #8 ; (a*64 + b*192 + 128) >> 8 - - add src, src, #1 - subs r2, r2, #1 - - strb r7, [lr] - - bne vl34_loop - - ldmia sp!, {r4 - r11, pc} - ENDP ;|vertical_band_3_4_scale_armv4| - -;/**************************************************************************** -; * -; * ROUTINE : vp8cx_horizontal_line_1_2_scale_c -; * -; * INPUTS : const unsigned char *source : Pointer to source data. -; * unsigned int source_width : Stride of source. -; * unsigned char *dest : Pointer to destination data. -; * unsigned int dest_width : Stride of destination (NOT USED). -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Copies horizontal line of pixels from source to -; * destination scaling up by 1 to 2. -; * -; * SPECIAL NOTES : None. -; * -; ****************************************************************************/ -;void vp8cx_horizontal_line_1_2_scale_c -;( -; const unsigned char *source, -; unsigned int source_width, -; unsigned char *dest, -; unsigned int dest_width -;) -|horizontal_line_1_2_scale_armv4| PROC - stmdb sp!, {r4 - r5, lr} - - sub srcw, srcw, #1 - - ldrb r3, [src], #1 - ldrb r4, [src], #1 -hl12_loop - subs srcw, srcw, #1 - - add r5, r3, r4 - add r5, r5, #1 - mov r5, r5, lsr #1 - - orr r5, r3, r5, lsl #8 - strh r5, [dest], #2 - - mov r3, r4 - - ldrneb r4, [src], #1 - bne hl12_loop - - orr r5, r4, r4, lsl #8 - strh r5, [dest] - - ldmia sp!, {r4 - r5, pc} - ENDP ;|vertical_band_3_5_scale_armv4| - -;/**************************************************************************** -; * -; * ROUTINE : vp8cx_vertical_band_1_2_scale_c -; * -; * INPUTS : unsigned char *dest : Pointer to destination data. -; * unsigned int dest_pitch : Stride of destination data. -; * unsigned int dest_width : Width of destination data. -; * -; * OUTPUTS : None. -; * -; * RETURNS : void -; * -; * FUNCTION : Scales vertical band of pixels by scale 1 to 2. The -; * height of the band scaled is 1-pixel. -; * -; * SPECIAL NOTES : The routine uses the first line of the band below -; * the current band. -; * -; ****************************************************************************/ -;void vp8cx_vertical_band_1_2_scale_c -;( -; r0 = UINT8 *dest -; r1 = UINT32 dest_pitch -; r2 = UINT32 dest_width -;) -|vertical_band_1_2_scale_armv4| PROC - stmdb sp!, {r4 - r7, lr} - - ldr mask, =0xff00ff ; mask for selection - ldr lr, = 0x010001 - -vl12_loop - mov r3, src - ldr r4, [r3], r1 - ldr r5, [r3, r1] - - add src, src, #4 - subs r2, r2, #4 - - and r6, r4, mask - and r7, r5, mask - - add r6, r7, r6 - add r6, r6, lr - - and r4, mask, r4, lsr #8 - and r5, mask, r5, lsr #8 - - mov r6, r6, lsr #1 - and r6, r6, mask - - add r4, r5, r4 - add r4, r4, lr - - mov r4, r4, lsr #1 - and r4, r4, mask - - orr r5, r6, r4, lsl #8 - - str r5, [r3] - - bpl vl12_loop - - ldmia sp!, {r4 - r7, pc} - ENDP ;|vertical_band_3_5_scale_armv4| - - END diff --git a/vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon.asm b/vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon.asm new file mode 100644 index 000000000..9189641b1 --- /dev/null +++ b/vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon.asm @@ -0,0 +1,122 @@ +; +; Copyright (c) 2010 The WebM 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. +; + + + EXPORT |vp8_yv12_copy_y_neon| + + ARM + REQUIRE8 + PRESERVE8 + + INCLUDE asm_com_offsets.asm + + AREA ||.text||, CODE, READONLY, ALIGN=2 + +;void vpxyv12_copy_y_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) +|vp8_yv12_copy_y_neon| PROC + push {r4 - r11, lr} + vpush {d8-d15} + + ldr r4, [r0, #yv12_buffer_config_y_height] + ldr r5, [r0, #yv12_buffer_config_y_width] + ldr r6, [r0, #yv12_buffer_config_y_stride] + ldr r7, [r1, #yv12_buffer_config_y_stride] + ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 + ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1 + + ; copy two rows at one time + mov lr, r4, lsr #1 + +cp_src_to_dst_height_loop1 + mov r8, r2 + mov r9, r3 + add r10, r2, r6 + add r11, r3, r7 + movs r12, r5, lsr #7 + ble extra_copy_needed ; y_width < 128 + +cp_src_to_dst_width_loop1 + vld1.8 {q0, q1}, [r8]! + vld1.8 {q8, q9}, [r10]! + vld1.8 {q2, q3}, [r8]! + vld1.8 {q10, q11}, [r10]! + vld1.8 {q4, q5}, [r8]! + vld1.8 {q12, q13}, [r10]! + vld1.8 {q6, q7}, [r8]! + vld1.8 {q14, q15}, [r10]! + + subs r12, r12, #1 + + vst1.8 {q0, q1}, [r9]! + vst1.8 {q8, q9}, [r11]! + vst1.8 {q2, q3}, [r9]! + vst1.8 {q10, q11}, [r11]! + vst1.8 {q4, q5}, [r9]! + vst1.8 {q12, q13}, [r11]! + vst1.8 {q6, q7}, [r9]! + vst1.8 {q14, q15}, [r11]! + + bne cp_src_to_dst_width_loop1 + + subs lr, lr, #1 + add r2, r2, r6, lsl #1 + add r3, r3, r7, lsl #1 + + bne cp_src_to_dst_height_loop1 + +extra_copy_needed + ands r10, r5, #0x7f ;check to see if extra copy is needed + sub r11, r5, r10 + ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 + ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1 + bne extra_cp_src_to_dst_width1 +end_of_cp_src_to_dst1 + + vpop {d8 - d15} + pop {r4-r11, pc} + +;============================= +extra_cp_src_to_dst_width1 + add r2, r2, r11 + add r3, r3, r11 + add r0, r8, r6 + add r11, r9, r7 + + mov lr, r4, lsr #1 +extra_cp_src_to_dst_height_loop1 + mov r8, r2 + mov r9, r3 + add r0, r8, r6 + add r11, r9, r7 + + mov r12, r10 + +extra_cp_src_to_dst_width_loop1 + vld1.8 {q0}, [r8]! + vld1.8 {q1}, [r0]! + + subs r12, r12, #16 + + vst1.8 {q0}, [r9]! + vst1.8 {q1}, [r11]! + bne extra_cp_src_to_dst_width_loop1 + + subs lr, lr, #1 + + add r2, r2, r6, lsl #1 + add r3, r3, r7, lsl #1 + + bne extra_cp_src_to_dst_height_loop1 + + b end_of_cp_src_to_dst1 + + ENDP + + END diff --git a/vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon.asm b/vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon.asm index e6bb486c8..e55d076d9 100644 --- a/vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon.asm +++ b/vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon.asm @@ -18,7 +18,8 @@ AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); +;void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, +; YV12_BUFFER_CONFIG *dst_ybc); |vp8_yv12_copy_frame_func_neon| PROC push {r4 - r11, lr} @@ -52,7 +53,8 @@ cp_src_to_dst_height_loop mov r9, r3 add r10, r2, r6 add r11, r3, r7 - mov r12, r5, lsr #7 + movs r12, r5, lsr #7 + ble extra_cp_needed ; y_width < 128 cp_src_to_dst_width_loop vld1.8 {q0, q1}, [r8]! @@ -83,6 +85,7 @@ cp_src_to_dst_width_loop bne cp_src_to_dst_height_loop +extra_cp_needed ands r10, r5, #0x7f ;check to see if extra copy is needed sub r11, r5, r10 ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 @@ -110,7 +113,8 @@ cp_src_to_dst_height_uv_loop mov r9, r3 add r10, r2, r6 add r11, r3, r7 - mov r12, r5, lsr #6 + movs r12, r5, lsr #6 + ble extra_uv_cp_needed cp_src_to_dst_width_uv_loop vld1.8 {q0, q1}, [r8]! @@ -133,6 +137,7 @@ cp_src_to_dst_width_uv_loop bne cp_src_to_dst_height_uv_loop +extra_uv_cp_needed ands r10, r5, #0x3f ;check to see if extra copy is needed sub r11, r5, r10 ldr r2, [sp] ;srcptr1 diff --git a/vpx_scale/arm/neon/vp8_vpxyv12_copyframeyonly_neon.asm b/vpx_scale/arm/neon/vp8_vpxyv12_copyframeyonly_neon.asm deleted file mode 100644 index febccc2d8..000000000 --- a/vpx_scale/arm/neon/vp8_vpxyv12_copyframeyonly_neon.asm +++ /dev/null @@ -1,500 +0,0 @@ -; -; Copyright (c) 2010 The WebM 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. -; - - - EXPORT |vp8_yv12_copy_frame_yonly_neon| - EXPORT |vp8_yv12_copy_frame_yonly_no_extend_frame_borders_neon| - - ARM - REQUIRE8 - PRESERVE8 - - INCLUDE asm_com_offsets.asm - - AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vpxyv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -; Note: this is VP8 function, which has border=32 and 16. Internal y_width and y_height -; are always multiples of 16. - -|vp8_yv12_copy_frame_yonly_neon| PROC - push {r4 - r11, lr} - vpush {d8 - d15} - - ldr r4, [r0, #yv12_buffer_config_y_height] - ldr r5, [r0, #yv12_buffer_config_y_width] - ldr r6, [r0, #yv12_buffer_config_y_stride] - ldr r7, [r1, #yv12_buffer_config_y_stride] - ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1 - - ; copy two rows at one time - mov lr, r4, lsr #1 - -cp_src_to_dst_height_loop - mov r8, r2 - mov r9, r3 - add r10, r2, r6 - add r11, r3, r7 - mov r12, r5, lsr #7 - -cp_src_to_dst_width_loop - vld1.8 {q0, q1}, [r8]! - vld1.8 {q8, q9}, [r10]! - vld1.8 {q2, q3}, [r8]! - vld1.8 {q10, q11}, [r10]! - vld1.8 {q4, q5}, [r8]! - vld1.8 {q12, q13}, [r10]! - vld1.8 {q6, q7}, [r8]! - vld1.8 {q14, q15}, [r10]! - - subs r12, r12, #1 - - vst1.8 {q0, q1}, [r9]! - vst1.8 {q8, q9}, [r11]! - vst1.8 {q2, q3}, [r9]! - vst1.8 {q10, q11}, [r11]! - vst1.8 {q4, q5}, [r9]! - vst1.8 {q12, q13}, [r11]! - vst1.8 {q6, q7}, [r9]! - vst1.8 {q14, q15}, [r11]! - - bne cp_src_to_dst_width_loop - - subs lr, lr, #1 - add r2, r2, r6, lsl #1 - add r3, r3, r7, lsl #1 - - bne cp_src_to_dst_height_loop - - ands r10, r5, #0x7f ;check to see if extra copy is needed - sub r11, r5, r10 - ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1 - bne extra_cp_src_to_dst_width -end_of_cp_src_to_dst - - - ;vpxyv12_extend_frame_borders_yonly - mov r0, r1 - ;Not need to load y_width, since: y_width = y_stride - 2*border - ldr r3, [r0, #yv12_buffer_config_border] - ldr r1, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - ldr r4, [r0, #yv12_buffer_config_y_height] - ldr lr, [r0, #yv12_buffer_config_y_stride] - - cmp r3, #16 - beq b16_extend_frame_borders - -;======================= -b32_extend_frame_borders -;border = 32 -;======================= -;Border copy for Y plane -;copy the left and right most columns out - sub r5, r1, r3 ;destptr1 - add r6, r1, lr - sub r6, r6, r3, lsl #1 ;destptr2 - sub r2, r6, #1 ;srcptr2 - - ;Do four rows at one time - mov r12, r4, lsr #2 - -copy_left_right_y - vld1.8 {d0[], d1[]}, [r1], lr - vld1.8 {d4[], d5[]}, [r2], lr - vld1.8 {d8[], d9[]}, [r1], lr - vld1.8 {d12[], d13[]}, [r2], lr - vld1.8 {d16[], d17[]}, [r1], lr - vld1.8 {d20[], d21[]}, [r2], lr - vld1.8 {d24[], d25[]}, [r1], lr - vld1.8 {d28[], d29[]}, [r2], lr - - vmov q1, q0 - vmov q3, q2 - vmov q5, q4 - vmov q7, q6 - vmov q9, q8 - vmov q11, q10 - vmov q13, q12 - vmov q15, q14 - - subs r12, r12, #1 - - vst1.8 {q0, q1}, [r5], lr - vst1.8 {q2, q3}, [r6], lr - vst1.8 {q4, q5}, [r5], lr - vst1.8 {q6, q7}, [r6], lr - vst1.8 {q8, q9}, [r5], lr - vst1.8 {q10, q11}, [r6], lr - vst1.8 {q12, q13}, [r5], lr - vst1.8 {q14, q15}, [r6], lr - - bne copy_left_right_y - -;Now copy the top and bottom source lines into each line of the respective borders - ldr r7, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - mul r8, r3, lr - - mov r12, lr, lsr #7 - - sub r6, r1, r3 ;destptr2 - sub r2, r6, lr ;srcptr2 - sub r1, r7, r3 ;srcptr1 - sub r5, r1, r8 ;destptr1 - -copy_top_bottom_y - vld1.8 {q0, q1}, [r1]! - vld1.8 {q8, q9}, [r2]! - vld1.8 {q2, q3}, [r1]! - vld1.8 {q10, q11}, [r2]! - vld1.8 {q4, q5}, [r1]! - vld1.8 {q12, q13}, [r2]! - vld1.8 {q6, q7}, [r1]! - vld1.8 {q14, q15}, [r2]! - - mov r7, r3 - -top_bottom_32 - subs r7, r7, #1 - - vst1.8 {q0, q1}, [r5]! - vst1.8 {q8, q9}, [r6]! - vst1.8 {q2, q3}, [r5]! - vst1.8 {q10, q11}, [r6]! - vst1.8 {q4, q5}, [r5]! - vst1.8 {q12, q13}, [r6]! - vst1.8 {q6, q7}, [r5]! - vst1.8 {q14, q15}, [r6]! - - add r5, r5, lr - sub r5, r5, #128 - add r6, r6, lr - sub r6, r6, #128 - - bne top_bottom_32 - - sub r5, r1, r8 - add r6, r2, lr - - subs r12, r12, #1 - bne copy_top_bottom_y - - mov r7, lr, lsr #4 ;check to see if extra copy is needed - ands r7, r7, #0x7 - bne extra_top_bottom_y -end_of_border_copy_y - - vpop {d8 - d15} - pop {r4 - r11, pc} - -;===================== -;extra copy part for Y -extra_top_bottom_y - vld1.8 {q0}, [r1]! - vld1.8 {q2}, [r2]! - - mov r9, r3, lsr #3 - -extra_top_bottom_32 - subs r9, r9, #1 - - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - bne extra_top_bottom_32 - - sub r5, r1, r8 - add r6, r2, lr - subs r7, r7, #1 - bne extra_top_bottom_y - - b end_of_border_copy_y - - -;======================= -b16_extend_frame_borders -;border = 16 -;======================= -;Border copy for Y plane -;copy the left and right most columns out - sub r5, r1, r3 ;destptr1 - add r6, r1, lr - sub r6, r6, r3, lsl #1 ;destptr2 - sub r2, r6, #1 ;srcptr2 - - ;Do four rows at one time - mov r12, r4, lsr #2 - -copy_left_right_y_b16 - vld1.8 {d0[], d1[]}, [r1], lr - vld1.8 {d4[], d5[]}, [r2], lr - vld1.8 {d8[], d9[]}, [r1], lr - vld1.8 {d12[], d13[]}, [r2], lr - vld1.8 {d16[], d17[]}, [r1], lr - vld1.8 {d20[], d21[]}, [r2], lr - vld1.8 {d24[], d25[]}, [r1], lr - vld1.8 {d28[], d29[]}, [r2], lr - - subs r12, r12, #1 - - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q4}, [r5], lr - vst1.8 {q6}, [r6], lr - vst1.8 {q8}, [r5], lr - vst1.8 {q10}, [r6], lr - vst1.8 {q12}, [r5], lr - vst1.8 {q14}, [r6], lr - - bne copy_left_right_y_b16 - -;Now copy the top and bottom source lines into each line of the respective borders - ldr r7, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - mul r8, r3, lr - - mov r12, lr, lsr #7 - - sub r6, r1, r3 ;destptr2 - sub r2, r6, lr ;srcptr2 - sub r1, r7, r3 ;srcptr1 - sub r5, r1, r8 ;destptr1 - -copy_top_bottom_y_b16 - vld1.8 {q0, q1}, [r1]! - vld1.8 {q8, q9}, [r2]! - vld1.8 {q2, q3}, [r1]! - vld1.8 {q10, q11}, [r2]! - vld1.8 {q4, q5}, [r1]! - vld1.8 {q12, q13}, [r2]! - vld1.8 {q6, q7}, [r1]! - vld1.8 {q14, q15}, [r2]! - - mov r7, r3 - -top_bottom_16_b16 - subs r7, r7, #1 - - vst1.8 {q0, q1}, [r5]! - vst1.8 {q8, q9}, [r6]! - vst1.8 {q2, q3}, [r5]! - vst1.8 {q10, q11}, [r6]! - vst1.8 {q4, q5}, [r5]! - vst1.8 {q12, q13}, [r6]! - vst1.8 {q6, q7}, [r5]! - vst1.8 {q14, q15}, [r6]! - - add r5, r5, lr - sub r5, r5, #128 - add r6, r6, lr - sub r6, r6, #128 - - bne top_bottom_16_b16 - - sub r5, r1, r8 - add r6, r2, lr - - subs r12, r12, #1 - bne copy_top_bottom_y_b16 - - mov r7, lr, lsr #4 ;check to see if extra copy is needed - ands r7, r7, #0x7 - bne extra_top_bottom_y_b16 -end_of_border_copy_y_b16 - - vpop {d8 - d15} - pop {r4 - r11, pc} - -;===================== -;extra copy part for Y -extra_top_bottom_y_b16 - vld1.8 {q0}, [r1]! - vld1.8 {q2}, [r2]! - - mov r9, r3, lsr #3 - -extra_top_bottom_16_b16 - subs r9, r9, #1 - - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - vst1.8 {q0}, [r5], lr - vst1.8 {q2}, [r6], lr - bne extra_top_bottom_16_b16 - - sub r5, r1, r8 - add r6, r2, lr - subs r7, r7, #1 - bne extra_top_bottom_y_b16 - - b end_of_border_copy_y_b16 - -;============================= -extra_cp_src_to_dst_width - add r2, r2, r11 - add r3, r3, r11 - add r0, r8, r6 - add r11, r9, r7 - - mov lr, r4, lsr #1 -extra_cp_src_to_dst_height_loop - mov r8, r2 - mov r9, r3 - add r0, r8, r6 - add r11, r9, r7 - - mov r12, r10 - -extra_cp_src_to_dst_width_loop - vld1.8 {q0}, [r8]! - vld1.8 {q1}, [r0]! - - subs r12, r12, #16 - - vst1.8 {q0}, [r9]! - vst1.8 {q1}, [r11]! - bne extra_cp_src_to_dst_width_loop - - subs lr, lr, #1 - - add r2, r2, r6, lsl #1 - add r3, r3, r7, lsl #1 - - bne extra_cp_src_to_dst_height_loop - - b end_of_cp_src_to_dst - - ENDP - -;=========================================================== -;In vp8cx_pick_filter_level(), call vp8_yv12_copy_frame_yonly -;without extend_frame_borders. -|vp8_yv12_copy_frame_yonly_no_extend_frame_borders_neon| PROC - push {r4 - r11, lr} - vpush {d8-d15} - - ldr r4, [r0, #yv12_buffer_config_y_height] - ldr r5, [r0, #yv12_buffer_config_y_width] - ldr r6, [r0, #yv12_buffer_config_y_stride] - ldr r7, [r1, #yv12_buffer_config_y_stride] - ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1 - - ; copy two rows at one time - mov lr, r4, lsr #1 - -cp_src_to_dst_height_loop1 - mov r8, r2 - mov r9, r3 - add r10, r2, r6 - add r11, r3, r7 - mov r12, r5, lsr #7 - -cp_src_to_dst_width_loop1 - vld1.8 {q0, q1}, [r8]! - vld1.8 {q8, q9}, [r10]! - vld1.8 {q2, q3}, [r8]! - vld1.8 {q10, q11}, [r10]! - vld1.8 {q4, q5}, [r8]! - vld1.8 {q12, q13}, [r10]! - vld1.8 {q6, q7}, [r8]! - vld1.8 {q14, q15}, [r10]! - - subs r12, r12, #1 - - vst1.8 {q0, q1}, [r9]! - vst1.8 {q8, q9}, [r11]! - vst1.8 {q2, q3}, [r9]! - vst1.8 {q10, q11}, [r11]! - vst1.8 {q4, q5}, [r9]! - vst1.8 {q12, q13}, [r11]! - vst1.8 {q6, q7}, [r9]! - vst1.8 {q14, q15}, [r11]! - - bne cp_src_to_dst_width_loop1 - - subs lr, lr, #1 - add r2, r2, r6, lsl #1 - add r3, r3, r7, lsl #1 - - bne cp_src_to_dst_height_loop1 - - ands r10, r5, #0x7f ;check to see if extra copy is needed - sub r11, r5, r10 - ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1 - ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1 - bne extra_cp_src_to_dst_width1 -end_of_cp_src_to_dst1 - - vpop {d8 - d15} - pop {r4-r11, pc} - -;============================= -extra_cp_src_to_dst_width1 - add r2, r2, r11 - add r3, r3, r11 - add r0, r8, r6 - add r11, r9, r7 - - mov lr, r4, lsr #1 -extra_cp_src_to_dst_height_loop1 - mov r8, r2 - mov r9, r3 - add r0, r8, r6 - add r11, r9, r7 - - mov r12, r10 - -extra_cp_src_to_dst_width_loop1 - vld1.8 {q0}, [r8]! - vld1.8 {q1}, [r0]! - - subs r12, r12, #16 - - vst1.8 {q0}, [r9]! - vst1.8 {q1}, [r11]! - bne extra_cp_src_to_dst_width_loop1 - - subs lr, lr, #1 - - add r2, r2, r6, lsl #1 - add r3, r3, r7, lsl #1 - - bne extra_cp_src_to_dst_height_loop1 - - b end_of_cp_src_to_dst1 - - ENDP - - END diff --git a/vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon.asm b/vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon.asm index 8444b8e03..ebc4242b2 100644 --- a/vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon.asm +++ b/vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon.asm @@ -75,12 +75,13 @@ copy_left_right_y mul r8, r4, lr ; plane_height * plane_stride ; copy width is plane_stride - mov r12, lr, lsr #7 ; plane_stride / 128 + movs r12, lr, lsr #7 ; plane_stride / 128 sub r1, r1, #32 ; src_ptr1 = y_buffer - Border add r6, r1, r8 ; dest_ptr2 = src_ptr2 - plane_stride (src_ptr1 + (plane_height * plane_stride)) sub r2, r6, lr ; src_ptr2 = src_ptr1 + (plane_height * plane_stride) - plane_stride sub r5, r1, lr, asl #5 ; dest_ptr1 = src_ptr1 - (Border * plane_stride) + ble extra_y_copy_needed ; plane stride < 128 copy_top_bottom_y vld1.8 {q0, q1}, [r1]! @@ -119,6 +120,7 @@ top_bottom_32 subs r12, r12, #1 bne copy_top_bottom_y +extra_y_copy_needed mov r7, lr, lsr #4 ; check to see if extra copy is needed ands r7, r7, #0x7 bne extra_top_bottom_y @@ -184,12 +186,13 @@ copy_left_right_uv ;Now copy the top and bottom source lines into each line of the respective borders mov r1, r7 mul r8, r4, lr ; plane_height * plane_stride - mov r12, lr, lsr #6 ; plane_stride / 64 + movs r12, lr, lsr #6 ; plane_stride / 64 sub r1, r1, #16 ; src_ptr1 = u_buffer - Border add r6, r1, r8 ; dest_ptr2 = src_ptr2 + plane_stride (src_ptr1 + (plane_height * plane_stride) sub r2, r6, lr ; src_ptr2 = src_ptr1 + (plane_height * plane_stride) - plane_stride sub r5, r1, lr, asl #4 ; dest_ptr1 = src_ptr1 - (Border * plane_stride) + ble extra_uv_copy_needed ; plane_stride < 64 copy_top_bottom_uv vld1.8 {q0, q1}, [r1]! @@ -219,7 +222,7 @@ top_bottom_16 subs r12, r12, #1 bne copy_top_bottom_uv - +extra_uv_copy_needed mov r7, lr, lsr #3 ; check to see if extra copy is needed ands r7, r7, #0x7 bne extra_top_bottom_uv diff --git a/vpx_scale/arm/neon/yv12extend_arm.c b/vpx_scale/arm/neon/yv12extend_arm.c index 94f499cf7..eabd4951a 100644 --- a/vpx_scale/arm/neon/yv12extend_arm.c +++ b/vpx_scale/arm/neon/yv12extend_arm.c @@ -8,17 +8,14 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "./vpx_rtcd.h" -#include "vpx_scale/yv12config.h" -#include "vpx_mem/vpx_mem.h" -#include "vpx_scale/vpxscale.h" +extern void vp8_yv12_copy_frame_func_neon(struct yv12_buffer_config *src_ybc, + struct yv12_buffer_config *dst_ybc); -void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -void -vp8_yv12_copy_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) { +void vp8_yv12_copy_frame_neon(struct yv12_buffer_config *src_ybc, + struct yv12_buffer_config *dst_ybc) { vp8_yv12_copy_frame_func_neon(src_ybc, dst_ybc); - // printf("Border:%d; plane_stride:%d; plane_height:%d; plane_width:%d\n",dst_ybc->border,dst_ybc->y_stride,dst_ybc->y_height,dst_ybc->y_width); - vp8_yv12_extend_frame_borders_ptr(dst_ybc); + vp8_yv12_extend_frame_borders_neon(dst_ybc); } diff --git a/vpx_scale/arm/scalesystemdependent.c b/vpx_scale/arm/scalesystemdependent.c deleted file mode 100644 index d168d0510..000000000 --- a/vpx_scale/arm/scalesystemdependent.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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. - */ - - -#include "vpx_ports/config.h" -#include "vpx_ports/arm.h" -#include "vpx_scale/vpxscale.h" - - -void (*vp8_yv12_extend_frame_borders_ptr)(YV12_BUFFER_CONFIG *ybf); -extern void vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf); -extern void vp8_yv12_extend_frame_borders_neon(YV12_BUFFER_CONFIG *ybf); - -void (*vp8_yv12_copy_frame_yonly_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_yonly_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -void (*vp8_yv12_copy_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -/**************************************************************************** -* Imports -*****************************************************************************/ - -/**************************************************************************** - * - * ROUTINE : vp8_scale_machine_specific_config - * - * INPUTS : UINT32 Version : Codec version number. - * - * OUTPUTS : None. - * - * RETURNS : void - * - * FUNCTION : Checks for machine specifc features such as MMX support - * sets appropriate flags and function pointers. - * - * SPECIAL NOTES : None. - * - ****************************************************************************/ -void vp8_scale_machine_specific_config() { -#if HAVE_ARMV7 && CONFIG_RUNTIME_CPU_DETECT - int flags; -#endif - /* - vp8_horizontal_line_1_2_scale = horizontal_line_1_2_scale_armv4; - vp8_vertical_band_1_2_scale = vertical_band_1_2_scale_armv4; - vp8_last_vertical_band_1_2_scale = vp8cx_last_vertical_band_1_2_scale_c; - vp8_horizontal_line_3_5_scale = horizontal_line_3_5_scale_armv4; - vp8_vertical_band_3_5_scale = vertical_band_3_5_scale_armv4; - vp8_last_vertical_band_3_5_scale = vp8cx_last_vertical_band_3_5_scale_c; - vp8_horizontal_line_3_4_scale = horizontal_line_3_4_scale_armv4; - vp8_vertical_band_3_4_scale = vertical_band_3_4_scale_armv4; - vp8_last_vertical_band_3_4_scale = vp8cx_last_vertical_band_3_4_scale_c; - vp8_horizontal_line_2_3_scale = horizontal_line_2_3_scale_armv4; - vp8_vertical_band_2_3_scale = vertical_band_2_3_scale_armv4; - vp8_last_vertical_band_2_3_scale = vp8cx_last_vertical_band_2_3_scale_c; - vp8_horizontal_line_4_5_scale = horizontal_line_4_5_scale_armv4; - vp8_vertical_band_4_5_scale = vertical_band_4_5_scale_armv4; - vp8_last_vertical_band_4_5_scale = vp8cx_last_vertical_band_4_5_scale_c; - - vp8_vertical_band_5_4_scale = vp8cx_vertical_band_5_4_scale_c; - vp8_vertical_band_5_3_scale = vp8cx_vertical_band_5_3_scale_c; - vp8_vertical_band_2_1_scale = vp8cx_vertical_band_2_1_scale_c; - vp8_vertical_band_2_1_scale_i = vp8cx_vertical_band_2_1_scale_i_c; - vp8_horizontal_line_2_1_scale = vp8cx_horizontal_line_2_1_scale_c; - vp8_horizontal_line_5_3_scale = vp8cx_horizontal_line_5_3_scale_c; - vp8_horizontal_line_5_4_scale = vp8cx_horizontal_line_5_4_scale_c; - */ - -#if !HAVE_ARMV7 || CONFIG_RUNTIME_CPU_DETECT - vp8_yv12_extend_frame_borders_ptr = vp8_yv12_extend_frame_borders; - vp8_yv12_copy_frame_yonly_ptr = vp8_yv12_copy_frame_yonly; - vp8_yv12_copy_frame_ptr = vp8_yv12_copy_frame; -#endif -#if HAVE_ARMV7 -#if CONFIG_RUNTIME_CPU_DETECT - flags = arm_cpu_caps(); - if (flags & HAS_NEON) -#endif - { -#if VP8BORDERINPIXELS == 32 - vp8_yv12_extend_frame_borders_ptr = vp8_yv12_extend_frame_borders_neon; - vp8_yv12_copy_frame_yonly_ptr = vp8_yv12_copy_frame_yonly_neon; - vp8_yv12_copy_frame_ptr = vp8_yv12_copy_frame_neon; -#endif - } -#endif -} diff --git a/vpx_scale/generic/gen_scalers.c b/vpx_scale/generic/gen_scalers.c index bb1178669..60c21fb3a 100644 --- a/vpx_scale/generic/gen_scalers.c +++ b/vpx_scale/generic/gen_scalers.c @@ -17,7 +17,7 @@ /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_4_5_scale_c + * ROUTINE : vp8_horizontal_line_4_5_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -34,13 +34,10 @@ * SPECIAL NOTES : None. * ****************************************************************************/ -void vp8cx_horizontal_line_4_5_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_4_5_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned i; unsigned int a, b, c; unsigned char *des = dest; @@ -78,7 +75,7 @@ void vp8cx_horizontal_line_4_5_scale_c /**************************************************************************** * - * ROUTINE : vp8cx_vertical_band_4_5_scale_c + * ROUTINE : vp8_vertical_band_4_5_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -95,7 +92,9 @@ void vp8cx_horizontal_line_4_5_scale_c * the current band. * ****************************************************************************/ -void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_4_5_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c, d; unsigned char *des = dest; @@ -122,7 +121,7 @@ void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitc /**************************************************************************** * - * ROUTINE : vp8cx_last_vertical_band_4_5_scale_c + * ROUTINE : vp8_last_vertical_band_4_5_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -140,7 +139,9 @@ void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitc * last band. * ****************************************************************************/ -void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_last_vertical_band_4_5_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c, d; unsigned char *des = dest; @@ -166,7 +167,7 @@ void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_2_3_scale_c + * ROUTINE : vp8_horizontal_line_2_3_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -184,13 +185,10 @@ void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest * * ****************************************************************************/ -void vp8cx_horizontal_line_2_3_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_2_3_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -221,7 +219,7 @@ void vp8cx_horizontal_line_2_3_scale_c /**************************************************************************** * - * ROUTINE : vp8cx_vertical_band_2_3_scale_c + * ROUTINE : vp8_vertical_band_2_3_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -238,7 +236,9 @@ void vp8cx_horizontal_line_2_3_scale_c * the current band. * ****************************************************************************/ -void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_2_3_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -256,7 +256,7 @@ void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitc /**************************************************************************** * - * ROUTINE : vp8cx_last_vertical_band_2_3_scale_c + * ROUTINE : vp8_last_vertical_band_2_3_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -274,7 +274,9 @@ void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitc * last band. * ****************************************************************************/ -void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_last_vertical_band_2_3_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b; unsigned char *des = dest; @@ -291,7 +293,7 @@ void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_3_5_scale_c + * ROUTINE : vp8_horizontal_line_3_5_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -309,13 +311,10 @@ void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest * * ****************************************************************************/ -void vp8cx_horizontal_line_3_5_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_3_5_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -354,7 +353,7 @@ void vp8cx_horizontal_line_3_5_scale_c /**************************************************************************** * - * ROUTINE : vp8cx_vertical_band_3_5_scale_c + * ROUTINE : vp8_vertical_band_3_5_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -371,7 +370,9 @@ void vp8cx_horizontal_line_3_5_scale_c * the current band. * ****************************************************************************/ -void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_3_5_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -395,7 +396,7 @@ void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitc /**************************************************************************** * - * ROUTINE : vp8cx_last_vertical_band_3_5_scale_c + * ROUTINE : vp8_last_vertical_band_3_5_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -413,7 +414,9 @@ void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitc * last band. * ****************************************************************************/ -void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_last_vertical_band_3_5_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -437,7 +440,7 @@ void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_3_4_scale_c + * ROUTINE : vp8_horizontal_line_3_4_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -455,13 +458,10 @@ void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest * * ****************************************************************************/ -void vp8cx_horizontal_line_3_4_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_3_4_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -497,7 +497,7 @@ void vp8cx_horizontal_line_3_4_scale_c /**************************************************************************** * - * ROUTINE : vp8cx_vertical_band_3_4_scale_c + * ROUTINE : vp8_vertical_band_3_4_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -514,7 +514,9 @@ void vp8cx_horizontal_line_3_4_scale_c * the current band. * ****************************************************************************/ -void vp8cx_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_3_4_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -537,7 +539,7 @@ void vp8cx_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitc /**************************************************************************** * - * ROUTINE : vp8cx_last_vertical_band_3_4_scale_c + * ROUTINE : vp8_last_vertical_band_3_4_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -555,7 +557,9 @@ void vp8cx_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitc * last band. * ****************************************************************************/ -void vp8cx_last_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_last_vertical_band_3_4_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c; unsigned char *des = dest; @@ -578,7 +582,7 @@ void vp8cx_last_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_1_2_scale_c + * ROUTINE : vp8_horizontal_line_1_2_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -595,13 +599,10 @@ void vp8cx_last_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest * SPECIAL NOTES : None. * ****************************************************************************/ -void vp8cx_horizontal_line_1_2_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_1_2_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned int i; unsigned int a, b; unsigned char *des = dest; @@ -625,7 +626,7 @@ void vp8cx_horizontal_line_1_2_scale_c /**************************************************************************** * - * ROUTINE : vp8cx_vertical_band_1_2_scale_c + * ROUTINE : vp8_vertical_band_1_2_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -642,7 +643,9 @@ void vp8cx_horizontal_line_1_2_scale_c * the current band. * ****************************************************************************/ -void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_1_2_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b; unsigned char *des = dest; @@ -659,7 +662,7 @@ void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitc /**************************************************************************** * - * ROUTINE : vp8cx_last_vertical_band_1_2_scale_c + * ROUTINE : vp8_last_vertical_band_1_2_scale_c * * INPUTS : unsigned char *dest : Pointer to destination data. * unsigned int dest_pitch : Stride of destination data. @@ -677,7 +680,9 @@ void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitc * last band. * ****************************************************************************/ -void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_last_vertical_band_1_2_scale_c(unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned char *des = dest; @@ -693,7 +698,7 @@ void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_4_5_scale_c + * ROUTINE : vp8_horizontal_line_4_5_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -710,13 +715,10 @@ void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest * SPECIAL NOTES : None. * ****************************************************************************/ -void vp8cx_horizontal_line_5_4_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_5_4_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned i; unsigned int a, b, c, d, e; unsigned char *des = dest; @@ -744,7 +746,11 @@ void vp8cx_horizontal_line_5_4_scale_c -void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_5_4_scale_c(unsigned char *source, + unsigned int src_pitch, + unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c, d, e; unsigned char *des = dest; @@ -772,7 +778,7 @@ void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pit /*7*************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_3_5_scale_c + * ROUTINE : vp8_horizontal_line_3_5_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -790,13 +796,10 @@ void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pit * * ****************************************************************************/ -void vp8cx_horizontal_line_5_3_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_5_3_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c, d, e; unsigned char *des = dest; @@ -821,7 +824,11 @@ void vp8cx_horizontal_line_5_3_scale_c } -void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_5_3_scale_c(unsigned char *source, + unsigned int src_pitch, + unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { unsigned int i; unsigned int a, b, c, d, e; unsigned char *des = dest; @@ -847,7 +854,7 @@ void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pit /**************************************************************************** * - * ROUTINE : vp8cx_horizontal_line_1_2_scale_c + * ROUTINE : vp8_horizontal_line_1_2_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -864,13 +871,10 @@ void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pit * SPECIAL NOTES : None. * ****************************************************************************/ -void vp8cx_horizontal_line_2_1_scale_c -( - const unsigned char *source, - unsigned int source_width, - unsigned char *dest, - unsigned int dest_width -) { +void vp8_horizontal_line_2_1_scale_c(const unsigned char *source, + unsigned int source_width, + unsigned char *dest, + unsigned int dest_width) { unsigned int i; unsigned int a; unsigned char *des = dest; @@ -884,17 +888,23 @@ void vp8cx_horizontal_line_2_1_scale_c src += 2; des += 1; } - - - } -void vp8cx_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { + +void vp8_vertical_band_2_1_scale_c(unsigned char *source, + unsigned int src_pitch, + unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { (void) dest_pitch; (void) src_pitch; vpx_memcpy(dest, source, dest_width); } -void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { +void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, + unsigned int src_pitch, + unsigned char *dest, + unsigned int dest_pitch, + unsigned int dest_width) { int i; int temp; int width = dest_width; @@ -909,5 +919,4 @@ void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_p temp >>= 4; dest[i] = (unsigned char)(temp); } - } diff --git a/vpx_scale/generic/scalesystemdependent.c b/vpx_scale/generic/scalesystemdependent.c deleted file mode 100644 index b9d6de4b1..000000000 --- a/vpx_scale/generic/scalesystemdependent.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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. - */ - - -#include "vpx_ports/config.h" -#include "vpx_scale/vpxscale.h" - - -void (*vp8_yv12_extend_frame_borders_ptr)(YV12_BUFFER_CONFIG *ybf); -extern void vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf); - -void (*vp8_yv12_copy_frame_yonly_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -void (*vp8_yv12_copy_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -/**************************************************************************** -* Imports -*****************************************************************************/ - -/**************************************************************************** - * - * ROUTINE : vp8_scale_machine_specific_config - * - * INPUTS : UINT32 Version : Codec version number. - * - * OUTPUTS : None. - * - * RETURNS : void - * - * FUNCTION : Checks for machine specifc features such as MMX support - * sets appropriate flags and function pointers. - * - * SPECIAL NOTES : None. - * - ****************************************************************************/ -void vp8_scale_machine_specific_config() { - vp8_yv12_extend_frame_borders_ptr = vp8_yv12_extend_frame_borders; - vp8_yv12_copy_frame_yonly_ptr = vp8_yv12_copy_frame_yonly; - vp8_yv12_copy_frame_ptr = vp8_yv12_copy_frame; - -} diff --git a/vpx_scale/generic/vpxscale.c b/vpx_scale/generic/vpxscale.c index 82485c73b..7de85ca34 100644 --- a/vpx_scale/generic/vpxscale.c +++ b/vpx_scale/generic/vpxscale.c @@ -20,41 +20,11 @@ /**************************************************************************** * Header Files ****************************************************************************/ +#include "./vpx_rtcd.h" #include "vpx_mem/vpx_mem.h" #include "vpx_scale/yv12config.h" #include "vpx_scale/scale_mode.h" -/**************************************************************************** -* Exports -****************************************************************************/ -#ifndef VPX_NO_GLOBALS -void (*vp8_vertical_band_4_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_last_vertical_band_4_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_vertical_band_2_3_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_last_vertical_band_2_3_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_vertical_band_3_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_last_vertical_band_3_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_vertical_band_3_4_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_last_vertical_band_3_4_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_1_2_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_3_5_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_3_4_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_2_3_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_4_5_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_vertical_band_1_2_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_last_vertical_band_1_2_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; - -void (*vp8_vertical_band_5_4_scale)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_vertical_band_5_3_scale)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_vertical_band_2_1_scale)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_vertical_band_2_1_scale_i)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_2_1_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_5_3_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -void (*vp8_horizontal_line_5_4_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) = 0; -#else -# include "vpxscale_nofp.h" -#endif - typedef struct { int expanded_frame_width; int expanded_frame_height; diff --git a/vpx_scale/generic/yv12extend.c b/vpx_scale/generic/yv12extend.c index cac8ae9b4..247078c0c 100644 --- a/vpx_scale/generic/yv12extend.c +++ b/vpx_scale/generic/yv12extend.c @@ -21,7 +21,7 @@ * ****************************************************************************/ void -vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf) { +vp8_yv12_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { int i; unsigned char *src_ptr1, *src_ptr2; unsigned char *dest_ptr1, *dest_ptr2; @@ -139,7 +139,7 @@ vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf) { static void -extend_frame_borders_yonly(YV12_BUFFER_CONFIG *ybf) { +extend_frame_borders_yonly_c(YV12_BUFFER_CONFIG *ybf) { int i; unsigned char *src_ptr1, *src_ptr2; unsigned char *dest_ptr1, *dest_ptr2; @@ -211,7 +211,8 @@ extend_frame_borders_yonly(YV12_BUFFER_CONFIG *ybf) { * ****************************************************************************/ void -vp8_yv12_copy_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) { +vp8_yv12_copy_frame_c(YV12_BUFFER_CONFIG *src_ybc, + YV12_BUFFER_CONFIG *dst_ybc) { int row; unsigned char *source, *dest; @@ -242,11 +243,11 @@ vp8_yv12_copy_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) { dest += dst_ybc->uv_stride; } - vp8_yv12_extend_frame_borders_ptr(dst_ybc); + vp8_yv12_extend_frame_borders_c(dst_ybc); } -void -vp8_yv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) { +void vp8_yv12_copy_y_c(YV12_BUFFER_CONFIG *src_ybc, + YV12_BUFFER_CONFIG *dst_ybc) { int row; unsigned char *source, *dest; @@ -259,6 +260,4 @@ vp8_yv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_y source += src_ybc->y_stride; dest += dst_ybc->y_stride; } - - extend_frame_borders_yonly(dst_ybc); } diff --git a/vpx_scale/include/arm/vpxscale_nofp.h b/vpx_scale/include/arm/vpxscale_nofp.h deleted file mode 100644 index 3e1a9fa83..000000000 --- a/vpx_scale/include/arm/vpxscale_nofp.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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. - */ - - -void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_1_2_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_3_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_3_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_2_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_4_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - -void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); - -void horizontal_line_4_5_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_2_3_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_3_5_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_3_4_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_1_2_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vertical_band_4_5_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_2_3_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_3_5_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_3_4_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_1_2_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - -#define vp8_vertical_band_4_5_scale vertical_band_4_5_scale_armv4 -#define vp8_last_vertical_band_4_5_scale vp8cx_last_vertical_band_4_5_scale_c -#define vp8_vertical_band_2_3_scale vertical_band_2_3_scale_armv4 -#define vp8_last_vertical_band_2_3_scale vp8cx_last_vertical_band_2_3_scale_c -#define vp8_vertical_band_3_5_scale vertical_band_3_5_scale_armv4 -#define vp8_last_vertical_band_3_5_scale vp8cx_last_vertical_band_3_5_scale_c -#define vp8_vertical_band_3_4_scale vertical_band_3_4_scale_armv4 -#define vp8_last_vertical_band_3_4_scale vp8cx_last_vertical_band_3_4_scale_c -#define vp8_horizontal_line_1_2_scale horizontal_line_1_2_scale_armv4 -#define vp8_horizontal_line_3_5_scale horizontal_line_3_5_scale_armv4 -#define vp8_horizontal_line_3_4_scale horizontal_line_3_4_scale_armv4 -#define vp8_horizontal_line_4_5_scale horizontal_line_4_5_scale_armv4 -#define vp8_horizontal_line_2_3_scale horizontal_line_2_3_scale_armv4 -#define vp8_vertical_band_1_2_scale vertical_band_1_2_scale_armv4 -#define vp8_last_vertical_band_1_2_scale vp8cx_last_vertical_band_1_2_scale_c -#define vp8_vertical_band_5_4_scale vp8cx_vertical_band_5_4_scale_c -#define vp8_vertical_band_5_3_scale vp8cx_vertical_band_5_3_scale_c -#define vp8_vertical_band_2_1_scale vp8cx_vertical_band_2_1_scale_c -#define vp8_vertical_band_2_1_scale_i vp8cx_vertical_band_2_1_scale_i_c -#define vp8_horizontal_line_2_1_scale vp8cx_horizontal_line_2_1_scale_c -#define vp8_horizontal_line_5_3_scale vp8cx_horizontal_line_5_3_scale_c -#define vp8_horizontal_line_5_4_scale vp8cx_horizontal_line_5_4_scale_c diff --git a/vpx_scale/include/generic/vpxscale_nofp.h b/vpx_scale/include/generic/vpxscale_nofp.h deleted file mode 100644 index 7b8205a1b..000000000 --- a/vpx_scale/include/generic/vpxscale_nofp.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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. - */ - - -void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_1_2_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_3_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_2_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_4_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - -void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); - -#define vp8_vertical_band_4_5_scale vp8cx_vertical_band_4_5_scale_c -#define vp8_last_vertical_band_4_5_scale vp8cx_last_vertical_band_4_5_scale_c -#define vp8_vertical_band_2_3_scale vp8cx_vertical_band_2_3_scale_c -#define vp8_last_vertical_band_2_3_scale vp8cx_last_vertical_band_2_3_scale_c -#define vp8_vertical_band_3_5_scale vp8cx_vertical_band_3_5_scale_c -#define vp8_last_vertical_band_3_5_scale vp8cx_last_vertical_band_3_5_scale_c -#define vp8_horizontal_line_1_2_scale vp8cx_horizontal_line_1_2_scale_c -#define vp8_horizontal_line_3_5_scale vp8cx_horizontal_line_3_5_scale_c -#define vp8_horizontal_line_4_5_scale vp8cx_horizontal_line_4_5_scale_c -#define vp8_horizontal_line_2_3_scale vp8cx_horizontal_line_2_3_scale_c -#define vp8_vertical_band_1_2_scale vp8cx_vertical_band_1_2_scale_c -#define vp8_last_vertical_band_1_2_scale vp8cx_last_vertical_band_1_2_scale_c -#define vp8_vertical_band_5_4_scale vp8cx_vertical_band_5_4_scale_c -#define vp8_vertical_band_5_3_scale vp8cx_vertical_band_5_3_scale_c -#define vp8_vertical_band_2_1_scale vp8cx_vertical_band_2_1_scale_c -#define vp8_vertical_band_2_1_scale_i vp8cx_vertical_band_2_1_scale_i_c -#define vp8_horizontal_line_2_1_scale vp8cx_horizontal_line_2_1_scale_c -#define vp8_horizontal_line_5_3_scale vp8cx_horizontal_line_5_3_scale_c -#define vp8_horizontal_line_5_4_scale vp8cx_horizontal_line_5_4_scale_c diff --git a/vpx_scale/include/symbian/vpxscale_nofp.h b/vpx_scale/include/symbian/vpxscale_nofp.h deleted file mode 100644 index 3e1a9fa83..000000000 --- a/vpx_scale/include/symbian/vpxscale_nofp.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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. - */ - - -void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_1_2_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_3_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_3_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_2_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_4_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - -void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); - -void horizontal_line_4_5_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_2_3_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_3_5_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_3_4_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_1_2_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vertical_band_4_5_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_2_3_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_3_5_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_3_4_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_1_2_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - -#define vp8_vertical_band_4_5_scale vertical_band_4_5_scale_armv4 -#define vp8_last_vertical_band_4_5_scale vp8cx_last_vertical_band_4_5_scale_c -#define vp8_vertical_band_2_3_scale vertical_band_2_3_scale_armv4 -#define vp8_last_vertical_band_2_3_scale vp8cx_last_vertical_band_2_3_scale_c -#define vp8_vertical_band_3_5_scale vertical_band_3_5_scale_armv4 -#define vp8_last_vertical_band_3_5_scale vp8cx_last_vertical_band_3_5_scale_c -#define vp8_vertical_band_3_4_scale vertical_band_3_4_scale_armv4 -#define vp8_last_vertical_band_3_4_scale vp8cx_last_vertical_band_3_4_scale_c -#define vp8_horizontal_line_1_2_scale horizontal_line_1_2_scale_armv4 -#define vp8_horizontal_line_3_5_scale horizontal_line_3_5_scale_armv4 -#define vp8_horizontal_line_3_4_scale horizontal_line_3_4_scale_armv4 -#define vp8_horizontal_line_4_5_scale horizontal_line_4_5_scale_armv4 -#define vp8_horizontal_line_2_3_scale horizontal_line_2_3_scale_armv4 -#define vp8_vertical_band_1_2_scale vertical_band_1_2_scale_armv4 -#define vp8_last_vertical_band_1_2_scale vp8cx_last_vertical_band_1_2_scale_c -#define vp8_vertical_band_5_4_scale vp8cx_vertical_band_5_4_scale_c -#define vp8_vertical_band_5_3_scale vp8cx_vertical_band_5_3_scale_c -#define vp8_vertical_band_2_1_scale vp8cx_vertical_band_2_1_scale_c -#define vp8_vertical_band_2_1_scale_i vp8cx_vertical_band_2_1_scale_i_c -#define vp8_horizontal_line_2_1_scale vp8cx_horizontal_line_2_1_scale_c -#define vp8_horizontal_line_5_3_scale vp8cx_horizontal_line_5_3_scale_c -#define vp8_horizontal_line_5_4_scale vp8cx_horizontal_line_5_4_scale_c diff --git a/vpx_scale/include/vpxscale_nofp.h b/vpx_scale/include/vpxscale_nofp.h deleted file mode 100644 index a704bd92c..000000000 --- a/vpx_scale/include/vpxscale_nofp.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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. - */ - - -#if defined(__S60_V20__) || defined(__SYMBIAN32__) && !defined(__WINS__) -#include "symbian\vpxscale_nofp.h" -#else -#include "generic\vpxscale_nofp.h" -#endif diff --git a/vpx_scale/vpx_scale.mk b/vpx_scale/vpx_scale.mk index 9680ded3c..dc89478bd 100644 --- a/vpx_scale/vpx_scale.mk +++ b/vpx_scale/vpx_scale.mk @@ -1,23 +1,18 @@ SCALE_SRCS-yes += vpx_scale.mk SCALE_SRCS-yes += scale_mode.h -SCALE_SRCS-yes += yv12extend.h SCALE_SRCS-yes += yv12config.h SCALE_SRCS-yes += vpxscale.h SCALE_SRCS-yes += generic/vpxscale.c SCALE_SRCS-yes += generic/yv12config.c SCALE_SRCS-yes += generic/yv12extend.c -SCALE_SRCS-yes += generic/scalesystemdependent.c +SCALE_SRCS-yes += generic/yv12extend_generic.h SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c -#arm -SCALE_SRCS-$(HAVE_ARMV7) += arm/scalesystemdependent.c -SCALE_SRCS_REMOVE-$(HAVE_ARMV7) += generic/scalesystemdependent.c - #neon -SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM) -SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_copyframeyonly_neon$(ASM) -SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_copysrcframe_func_neon$(ASM) -SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_extendframeborders_neon$(ASM) -SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/yv12extend_arm.c +SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM) +SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_copy_y_neon$(ASM) +SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_copysrcframe_func_neon$(ASM) +SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_extendframeborders_neon$(ASM) +SCALE_SRCS-$(HAVE_NEON) += arm/neon/yv12extend_arm.c SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes) diff --git a/vpx_scale/vpxscale.h b/vpx_scale/vpxscale.h index 899a50a89..3c2194d65 100644 --- a/vpx_scale/vpxscale.h +++ b/vpx_scale/vpxscale.h @@ -13,102 +13,25 @@ #define VPXSCALE_H #include "vpx_scale/yv12config.h" -void vp8cx_horizontal_line_4_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_4_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_2_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_2_3_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_3_5_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_5_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_3_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_3_4_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_1_2_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_last_vertical_band_1_2_scale_c(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - -extern void (*vp8_vertical_band_4_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_last_vertical_band_4_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_2_3_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_last_vertical_band_2_3_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_3_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_last_vertical_band_3_5_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_3_4_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_last_vertical_band_3_4_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_horizontal_line_1_2_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_horizontal_line_3_4_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_horizontal_line_3_5_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_horizontal_line_2_3_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_horizontal_line_4_5_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_vertical_band_1_2_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_last_vertical_band_1_2_scale)(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_5_4_scale)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_5_3_scale)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_2_1_scale)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_vertical_band_2_1_scale_i)(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -extern void (*vp8_horizontal_line_2_1_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_horizontal_line_5_3_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -extern void (*vp8_horizontal_line_5_4_scale)(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); - -void horizontal_line_4_5_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_2_3_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_3_5_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_3_4_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void horizontal_line_1_2_scale_armv4(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width); -void vertical_band_4_5_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_2_3_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_3_5_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_3_4_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); -void vertical_band_1_2_scale_armv4(unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width); - - -extern void dmachine_specific_config(int mmx_enabled, int xmm_enabled, int wmt_enabled); -extern void vp8_yv12_scale_or_center -( - YV12_BUFFER_CONFIG *src_yuv_config, - YV12_BUFFER_CONFIG *dst_yuv_config, - int expanded_frame_width, - int expanded_frame_height, - int scaling_mode, - int HScale, - int HRatio, - int VScale, - int VRatio -); -extern void vp8_scale_frame -( - YV12_BUFFER_CONFIG *src, - YV12_BUFFER_CONFIG *dst, - unsigned char *temp_area, - unsigned char temp_height, - unsigned int hscale, - unsigned int hratio, - unsigned int vscale, - unsigned int vratio, - unsigned int interlaced -); -extern void vp8_scale_machine_specific_config(void); - -extern void (*vp8_yv12_extend_frame_borders_ptr)(YV12_BUFFER_CONFIG *ybf); -extern void vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf); -extern void vp8_yv12_extend_frame_borders_neon(YV12_BUFFER_CONFIG *ybf); - -extern void (*vp8_yv12_copy_frame_yonly_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_yonly_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -extern void (*vp8_yv12_copy_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); -extern void vp8_yv12_copy_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); +extern void vp8_yv12_scale_or_center(YV12_BUFFER_CONFIG *src_yuv_config, + YV12_BUFFER_CONFIG *dst_yuv_config, + int expanded_frame_width, + int expanded_frame_height, + int scaling_mode, + int HScale, + int HRatio, + int VScale, + int VRatio); + +extern void vp8_scale_frame(YV12_BUFFER_CONFIG *src, + YV12_BUFFER_CONFIG *dst, + unsigned char *temp_area, + unsigned char temp_height, + unsigned int hscale, + unsigned int hratio, + unsigned int vscale, + unsigned int vratio, + unsigned int interlaced); #endif diff --git a/vpx_scale/yv12config.h b/vpx_scale/yv12config.h index 83523e253..6a8a1fc52 100644 --- a/vpx_scale/yv12config.h +++ b/vpx_scale/yv12config.h @@ -11,18 +11,14 @@ #ifndef YV12_CONFIG_H #define YV12_CONFIG_H - -#include "vpx_config.h" - #ifdef __cplusplus extern "C" { #endif -#define VP7BORDERINPIXELS 48 - -#define VP8BORDERINPIXELS 64 -#define INTERP_EXTEND 4 +#define VP8BORDERINPIXELS 32 +#define VP9BORDERINPIXELS 64 +#define VP9_INTERP_EXTEND 4 /************************************* For INT_YUV: @@ -42,7 +38,7 @@ extern "C" } YUV_TYPE; - typedef struct { + typedef struct yv12_buffer_config { int y_width; int y_height; int y_stride; diff --git a/vpx_scale/yv12extend.h b/vpx_scale/yv12extend.h deleted file mode 100644 index c7fcedf21..000000000 --- a/vpx_scale/yv12extend.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 The WebM 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 YV12_EXTEND_H -#define YV12_EXTEND_H - -#include "vpx_scale/yv12config.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - - void vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf); - - /* Copy Y,U,V buffer data from src to dst, filling border of dst as well. */ - - void vp8_yv12_copy_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - void vp8_yv12_copy_frame_yonly(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -#ifdef __cplusplus -} -#endif - -#endif |