Merge remote branch 'internal/upstream' into HEAD
This commit is contained in:
commit
b3b2657f21
@ -1,31 +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 "vp8/encoder/encodemb.h"
|
||||
#include "vp8/common/reconinter.h"
|
||||
#include "vp8/encoder/quantize.h"
|
||||
#include "vp8/common/invtrans.h"
|
||||
#include "vp8/common/recon.h"
|
||||
#include "vp8/common/reconintra.h"
|
||||
#include "vp8/encoder/dct.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
extern void vp8_subtract_b_neon_func(short *diff, unsigned char *src, unsigned char *pred, int stride, int pitch);
|
||||
|
||||
void vp8_subtract_b_neon(BLOCK *be, BLOCKD *bd, int pitch)
|
||||
{
|
||||
unsigned char *src_ptr = (*(be->base_src) + be->src);
|
||||
short *diff_ptr = be->src_diff;
|
||||
unsigned char *pred_ptr = bd->predictor;
|
||||
int src_stride = be->src_stride;
|
||||
|
||||
vp8_subtract_b_neon_func(diff_ptr, src_ptr, pred_ptr, src_stride, pitch);
|
||||
}
|
@ -8,45 +8,58 @@
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_subtract_b_neon_func|
|
||||
EXPORT |vp8_subtract_b_neon|
|
||||
EXPORT |vp8_subtract_mby_neon|
|
||||
EXPORT |vp8_subtract_mbuv_neon|
|
||||
|
||||
INCLUDE asm_enc_offsets.asm
|
||||
|
||||
ARM
|
||||
REQUIRE8
|
||||
PRESERVE8
|
||||
|
||||
AREA ||.text||, CODE, READONLY, ALIGN=2
|
||||
;=========================================
|
||||
;void vp8_subtract_b_neon_func(short *diff, unsigned char *src, unsigned char *pred, int stride, int pitch);
|
||||
|vp8_subtract_b_neon_func| PROC
|
||||
ldr r12, [sp] ;load pitch
|
||||
|
||||
vld1.8 {d0}, [r1], r3 ;load src
|
||||
vld1.8 {d1}, [r2], r12 ;load pred
|
||||
vld1.8 {d2}, [r1], r3
|
||||
vld1.8 {d3}, [r2], r12
|
||||
vld1.8 {d4}, [r1], r3
|
||||
vld1.8 {d5}, [r2], r12
|
||||
vld1.8 {d6}, [r1], r3
|
||||
vld1.8 {d7}, [r2], r12
|
||||
;void vp8_subtract_b_neon(BLOCK *be, BLOCKD *bd, int pitch)
|
||||
|vp8_subtract_b_neon| PROC
|
||||
|
||||
stmfd sp!, {r4-r7}
|
||||
|
||||
ldr r3, [r0, #vp8_block_base_src]
|
||||
ldr r4, [r0, #vp8_block_src]
|
||||
ldr r5, [r0, #vp8_block_src_diff]
|
||||
ldr r3, [r3]
|
||||
ldr r6, [r0, #vp8_block_src_stride]
|
||||
add r3, r3, r4 ; src = *base_src + src
|
||||
ldr r7, [r1, #vp8_blockd_predictor]
|
||||
|
||||
vld1.8 {d0}, [r3], r6 ;load src
|
||||
vld1.8 {d1}, [r7], r2 ;load pred
|
||||
vld1.8 {d2}, [r3], r6
|
||||
vld1.8 {d3}, [r7], r2
|
||||
vld1.8 {d4}, [r3], r6
|
||||
vld1.8 {d5}, [r7], r2
|
||||
vld1.8 {d6}, [r3], r6
|
||||
vld1.8 {d7}, [r7], r2
|
||||
|
||||
vsubl.u8 q10, d0, d1
|
||||
vsubl.u8 q11, d2, d3
|
||||
vsubl.u8 q12, d4, d5
|
||||
vsubl.u8 q13, d6, d7
|
||||
|
||||
mov r12, r12, lsl #1
|
||||
mov r2, r2, lsl #1
|
||||
|
||||
vst1.16 {d20}, [r0], r12 ;store diff
|
||||
vst1.16 {d22}, [r0], r12
|
||||
vst1.16 {d24}, [r0], r12
|
||||
vst1.16 {d26}, [r0], r12
|
||||
vst1.16 {d20}, [r5], r2 ;store diff
|
||||
vst1.16 {d22}, [r5], r2
|
||||
vst1.16 {d24}, [r5], r2
|
||||
vst1.16 {d26}, [r5], r2
|
||||
|
||||
ldmfd sp!, {r4-r7}
|
||||
bx lr
|
||||
|
||||
ENDP
|
||||
|
||||
|
||||
;==========================================
|
||||
;void vp8_subtract_mby_neon(short *diff, unsigned char *src, unsigned char *pred, int stride)
|
||||
|vp8_subtract_mby_neon| PROC
|
||||
|
@ -15,7 +15,6 @@
|
||||
# encoder
|
||||
VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/arm_csystemdependent.c
|
||||
|
||||
VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/encodemb_arm.c
|
||||
VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/quantize_arm.c
|
||||
VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/picklpf_arm.c
|
||||
VP8_CX_SRCS-$(HAVE_ARMV6) += encoder/arm/dct_arm.c
|
||||
|
22
vpxenc.c
22
vpxenc.c
@ -240,7 +240,13 @@ void stats_write(stats_io_t *stats, const void *pkt, size_t len)
|
||||
stats->buf_ptr = new_ptr + (stats->buf_ptr - (char *)stats->buf.buf);
|
||||
stats->buf.buf = new_ptr;
|
||||
stats->buf_alloc_sz = new_sz;
|
||||
} /* else ... */
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr,
|
||||
"\nFailed to realloc firstpass stats buffer.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(stats->buf_ptr, pkt, len);
|
||||
@ -702,10 +708,18 @@ write_webm_block(EbmlGlobal *glob,
|
||||
/* Save a cue point if this is a keyframe. */
|
||||
if(is_keyframe)
|
||||
{
|
||||
struct cue_entry *cue;
|
||||
struct cue_entry *cue, *new_cue_list;
|
||||
|
||||
new_cue_list = realloc(glob->cue_list,
|
||||
(glob->cues+1) * sizeof(struct cue_entry));
|
||||
if(new_cue_list)
|
||||
glob->cue_list = new_cue_list;
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "\nFailed to realloc cue list.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
glob->cue_list = realloc(glob->cue_list,
|
||||
(glob->cues+1) * sizeof(struct cue_entry));
|
||||
cue = &glob->cue_list[glob->cues];
|
||||
cue->time = glob->cluster_timecode;
|
||||
cue->loc = glob->cluster_pos;
|
||||
|
Loading…
Reference in New Issue
Block a user