Remove vp8 in local symbols.
For non-static functions, change the prefix to vp9_. For static functions, remove the prefix. Also fix some comments, remove unused code or unused function prototypes. Change-Id: I1f8be05362f66060fe421c3d4c9a906fdf835de5
This commit is contained in:
parent
982deebb5e
commit
6a4b1e5958
@ -19,8 +19,6 @@
|
||||
#include "systemdependent.h"
|
||||
|
||||
|
||||
extern void vp8_init_scan_order_mask();
|
||||
|
||||
void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi_base) {
|
||||
int stride = cpi->mode_info_stride;
|
||||
int i;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "vp8/common/idct.h"
|
||||
#include "vp8/common/onyxc_int.h"
|
||||
|
||||
void vp8_arch_arm_common_init(VP9_COMMON *ctx) {
|
||||
void vp9_arch_arm_common_init(VP9_COMMON *ctx) {
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
VP9_COMMON_RTCD *rtcd = &ctx->rtcd;
|
||||
int flags = arm_cpu_caps();
|
||||
|
@ -9,8 +9,8 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_filter_block2d_bil_first_pass_armv6|
|
||||
EXPORT |vp8_filter_block2d_bil_second_pass_armv6|
|
||||
EXPORT |vp9_filter_block2d_bil_first_pass_armv6|
|
||||
EXPORT |vp9_filter_block2d_bil_second_pass_armv6|
|
||||
|
||||
AREA |.text|, CODE, READONLY ; name this block of code
|
||||
|
||||
@ -20,13 +20,13 @@
|
||||
; r2 unsigned int src_pitch,
|
||||
; r3 unsigned int height,
|
||||
; stack unsigned int width,
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;-------------------------------------
|
||||
; The output is transposed stroed in output array to make it easy for second pass filtering.
|
||||
|vp8_filter_block2d_bil_first_pass_armv6| PROC
|
||||
|vp9_filter_block2d_bil_first_pass_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #40] ; vp8_filter address
|
||||
ldr r11, [sp, #40] ; vp9_filter address
|
||||
ldr r4, [sp, #36] ; width
|
||||
|
||||
mov r12, r3 ; outer-loop counter
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
|
||||
ENDP ; |vp8_filter_block2d_bil_first_pass_armv6|
|
||||
ENDP ; |vp9_filter_block2d_bil_first_pass_armv6|
|
||||
|
||||
|
||||
;---------------------------------
|
||||
@ -143,12 +143,12 @@
|
||||
; r2 int dst_pitch,
|
||||
; r3 unsigned int height,
|
||||
; stack unsigned int width,
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;---------------------------------
|
||||
|vp8_filter_block2d_bil_second_pass_armv6| PROC
|
||||
|vp9_filter_block2d_bil_second_pass_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #40] ; vp8_filter address
|
||||
ldr r11, [sp, #40] ; vp9_filter address
|
||||
ldr r4, [sp, #36] ; width
|
||||
|
||||
ldr r5, [r11] ; load up filter coefficients
|
||||
@ -232,6 +232,6 @@
|
||||
bne bil_height_loop_null_2nd
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_filter_block2d_second_pass_armv6|
|
||||
ENDP ; |vp9_filter_block2d_second_pass_armv6|
|
||||
|
||||
END
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_copy_mem16x16_v6|
|
||||
EXPORT |vp9_copy_mem16x16_v6|
|
||||
; ARM
|
||||
; REQUIRE8
|
||||
; PRESERVE8
|
||||
@ -17,7 +17,7 @@
|
||||
AREA Block, CODE, READONLY ; name this block of code
|
||||
;void copy_mem16x16_v6( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|vp8_copy_mem16x16_v6| PROC
|
||||
|vp9_copy_mem16x16_v6| PROC
|
||||
stmdb sp!, {r4 - r7}
|
||||
;push {r4-r7}
|
||||
|
||||
@ -181,6 +181,6 @@ copy_mem16x16_fast_loop
|
||||
;pop {r4-r7}
|
||||
mov pc, lr
|
||||
|
||||
ENDP ; |vp8_copy_mem16x16_v6|
|
||||
ENDP ; |vp9_copy_mem16x16_v6|
|
||||
|
||||
END
|
||||
|
@ -9,15 +9,15 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_copy_mem8x4_v6|
|
||||
EXPORT |vp9_copy_mem8x4_v6|
|
||||
; ARM
|
||||
; REQUIRE8
|
||||
; PRESERVE8
|
||||
|
||||
AREA Block, CODE, READONLY ; name this block of code
|
||||
;void vp8_copy_mem8x4_v6( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;void vp9_copy_mem8x4_v6( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|vp8_copy_mem8x4_v6| PROC
|
||||
|vp9_copy_mem8x4_v6| PROC
|
||||
;push {r4-r5}
|
||||
stmdb sp!, {r4-r5}
|
||||
|
||||
@ -123,6 +123,6 @@ copy_mem8x4_fast_loop
|
||||
;pop {r4-r5}
|
||||
mov pc, lr
|
||||
|
||||
ENDP ; |vp8_copy_mem8x4_v6|
|
||||
ENDP ; |vp9_copy_mem8x4_v6|
|
||||
|
||||
END
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_copy_mem8x8_v6|
|
||||
EXPORT |vp9_copy_mem8x8_v6|
|
||||
; ARM
|
||||
; REQUIRE8
|
||||
; PRESERVE8
|
||||
@ -17,7 +17,7 @@
|
||||
AREA Block, CODE, READONLY ; name this block of code
|
||||
;void copy_mem8x8_v6( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|vp8_copy_mem8x8_v6| PROC
|
||||
|vp9_copy_mem8x8_v6| PROC
|
||||
;push {r4-r5}
|
||||
stmdb sp!, {r4-r5}
|
||||
|
||||
@ -123,6 +123,6 @@ copy_mem8x8_fast_loop
|
||||
;pop {r4-r5}
|
||||
mov pc, lr
|
||||
|
||||
ENDP ; |vp8_copy_mem8x8_v6|
|
||||
ENDP ; |vp9_copy_mem8x8_v6|
|
||||
|
||||
END
|
||||
|
@ -9,13 +9,13 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_filter_block2d_first_pass_armv6|
|
||||
EXPORT |vp8_filter_block2d_first_pass_16x16_armv6|
|
||||
EXPORT |vp8_filter_block2d_first_pass_8x8_armv6|
|
||||
EXPORT |vp8_filter_block2d_second_pass_armv6|
|
||||
EXPORT |vp8_filter4_block2d_second_pass_armv6|
|
||||
EXPORT |vp8_filter_block2d_first_pass_only_armv6|
|
||||
EXPORT |vp8_filter_block2d_second_pass_only_armv6|
|
||||
EXPORT |vp9_filter_block2d_first_pass_armv6|
|
||||
EXPORT |vp9_filter_block2d_first_pass_16x16_armv6|
|
||||
EXPORT |vp9_filter_block2d_first_pass_8x8_armv6|
|
||||
EXPORT |vp9_filter_block2d_second_pass_armv6|
|
||||
EXPORT |vp9_filter4_block2d_second_pass_armv6|
|
||||
EXPORT |vp9_filter_block2d_first_pass_only_armv6|
|
||||
EXPORT |vp9_filter_block2d_second_pass_only_armv6|
|
||||
|
||||
AREA |.text|, CODE, READONLY ; name this block of code
|
||||
;-------------------------------------
|
||||
@ -24,14 +24,14 @@
|
||||
; r2 unsigned int src_pixels_per_line
|
||||
; r3 unsigned int output_width
|
||||
; stack unsigned int output_height
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;-------------------------------------
|
||||
; vp8_filter the input and put in the output array. Apply the 6 tap FIR filter with
|
||||
; vp9_filter the input and put in the output array. Apply the 6 tap FIR filter with
|
||||
; the output being a 2 byte value and the intput being a 1 byte value.
|
||||
|vp8_filter_block2d_first_pass_armv6| PROC
|
||||
|vp9_filter_block2d_first_pass_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #40] ; vp8_filter address
|
||||
ldr r11, [sp, #40] ; vp9_filter address
|
||||
ldr r7, [sp, #36] ; output height
|
||||
|
||||
sub r2, r2, r3 ; inside loop increments input array,
|
||||
@ -115,10 +115,10 @@
|
||||
; --------------------------
|
||||
; 16x16 version
|
||||
; -----------------------------
|
||||
|vp8_filter_block2d_first_pass_16x16_armv6| PROC
|
||||
|vp9_filter_block2d_first_pass_16x16_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #40] ; vp8_filter address
|
||||
ldr r11, [sp, #40] ; vp9_filter address
|
||||
ldr r7, [sp, #36] ; output height
|
||||
|
||||
add r4, r2, #18 ; preload next low
|
||||
@ -208,10 +208,10 @@
|
||||
; --------------------------
|
||||
; 8x8 version
|
||||
; -----------------------------
|
||||
|vp8_filter_block2d_first_pass_8x8_armv6| PROC
|
||||
|vp9_filter_block2d_first_pass_8x8_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #40] ; vp8_filter address
|
||||
ldr r11, [sp, #40] ; vp9_filter address
|
||||
ldr r7, [sp, #36] ; output height
|
||||
|
||||
add r4, r2, #10 ; preload next low
|
||||
@ -303,12 +303,12 @@
|
||||
; r1 unsigned char *output_ptr,
|
||||
; r2 unsigned int output_pitch,
|
||||
; r3 unsigned int cnt,
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;---------------------------------
|
||||
|vp8_filter_block2d_second_pass_armv6| PROC
|
||||
|vp9_filter_block2d_second_pass_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #36] ; vp8_filter address
|
||||
ldr r11, [sp, #36] ; vp9_filter address
|
||||
sub sp, sp, #4
|
||||
mov r7, r3, lsl #16 ; height is top part of counter
|
||||
str r1, [sp] ; push destination to stack
|
||||
@ -376,12 +376,12 @@
|
||||
; r1 unsigned char *output_ptr,
|
||||
; r2 unsigned int output_pitch,
|
||||
; r3 unsigned int cnt,
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;---------------------------------
|
||||
|vp8_filter4_block2d_second_pass_armv6| PROC
|
||||
|vp9_filter4_block2d_second_pass_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #36] ; vp8_filter address
|
||||
ldr r11, [sp, #36] ; vp9_filter address
|
||||
mov r7, r3, lsl #16 ; height is top part of counter
|
||||
|
||||
ldr r4, [r11] ; load up packed filter coefficients
|
||||
@ -435,9 +435,9 @@
|
||||
; r2 unsigned int src_pixels_per_line
|
||||
; r3 unsigned int cnt,
|
||||
; stack unsigned int output_pitch,
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;------------------------------------
|
||||
|vp8_filter_block2d_first_pass_only_armv6| PROC
|
||||
|vp9_filter_block2d_first_pass_only_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
add r7, r2, r3 ; preload next low
|
||||
@ -527,7 +527,7 @@
|
||||
|
||||
add sp, sp, #8
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_filter_block2d_first_pass_only_armv6|
|
||||
ENDP ; |vp9_filter_block2d_first_pass_only_armv6|
|
||||
|
||||
|
||||
;------------------------------------
|
||||
@ -536,9 +536,9 @@
|
||||
; r2 unsigned int src_pixels_per_line
|
||||
; r3 unsigned int cnt,
|
||||
; stack unsigned int output_pitch,
|
||||
; stack const short *vp8_filter
|
||||
; stack const short *vp9_filter
|
||||
;------------------------------------
|
||||
|vp8_filter_block2d_second_pass_only_armv6| PROC
|
||||
|vp9_filter_block2d_second_pass_only_armv6| PROC
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r11, [sp, #40] ; VFilter address
|
||||
@ -619,6 +619,6 @@
|
||||
add sp, sp, #8
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_filter_block2d_second_pass_only_armv6|
|
||||
ENDP ; |vp9_filter_block2d_second_pass_only_armv6|
|
||||
|
||||
END
|
||||
|
@ -9,10 +9,10 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_loop_filter_horizontal_edge_armv6|
|
||||
EXPORT |vp8_mbloop_filter_horizontal_edge_armv6|
|
||||
EXPORT |vp8_loop_filter_vertical_edge_armv6|
|
||||
EXPORT |vp8_mbloop_filter_vertical_edge_armv6|
|
||||
EXPORT |vp9_loop_filter_horizontal_edge_armv6|
|
||||
EXPORT |vp9_mbloop_filter_horizontal_edge_armv6|
|
||||
EXPORT |vp9_loop_filter_vertical_edge_armv6|
|
||||
EXPORT |vp9_mbloop_filter_vertical_edge_armv6|
|
||||
|
||||
AREA |.text|, CODE, READONLY ; name this block of code
|
||||
|
||||
@ -59,7 +59,7 @@ count RN r5
|
||||
;stack int count
|
||||
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|vp8_loop_filter_horizontal_edge_armv6| PROC
|
||||
|vp9_loop_filter_horizontal_edge_armv6| PROC
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
@ -83,7 +83,7 @@ count RN r5
|
||||
orr r3, r3, r3, lsl #16
|
||||
|
||||
|Hnext8|
|
||||
; vp8_filter_mask() function
|
||||
; vp9_filter_mask() function
|
||||
; calculate breakout conditions
|
||||
ldr r12, [src], pstep ; p0
|
||||
|
||||
@ -94,7 +94,7 @@ count RN r5
|
||||
|
||||
orr r6, r6, r7 ; abs (p3-p2)
|
||||
orr r8, r8, r10 ; abs (p2-p1)
|
||||
uqsub8 lr, r6, r2 ; compare to limit. lr: vp8_filter_mask
|
||||
uqsub8 lr, r6, r2 ; compare to limit. lr: vp9_filter_mask
|
||||
uqsub8 r8, r8, r2 ; compare to limit
|
||||
uqsub8 r6, r11, r12 ; p1 - p0
|
||||
orr lr, lr, r8
|
||||
@ -163,7 +163,7 @@ count RN r5
|
||||
usub8 r10, r12, r10 ; use usub8 instead of ssub8
|
||||
sel r6, r12, r11 ; obtain vp8_hevmask: r6
|
||||
|
||||
;vp8_filter() function
|
||||
;vp9_filter() function
|
||||
ldr r8, [src], pstep ; p0
|
||||
ldr r12, c0x80808080
|
||||
ldr r9, [src], pstep ; q0
|
||||
@ -179,10 +179,10 @@ count RN r5
|
||||
str r10, [sp, #8] ; store qs1 temporarily
|
||||
str r7, [sp, #12] ; store ps1 temporarily
|
||||
|
||||
qsub8 r7, r7, r10 ; vp8_signed_char_clamp(ps1-qs1)
|
||||
qsub8 r8, r9, r8 ; vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
qsub8 r7, r7, r10 ; vp9_signed_char_clamp(ps1-qs1)
|
||||
qsub8 r8, r9, r8 ; vp9_signed_char_clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
|
||||
and r7, r7, r6 ; vp8_filter (r7) &= hev
|
||||
and r7, r7, r6 ; vp9_filter (r7) &= hev
|
||||
|
||||
qadd8 r7, r7, r8
|
||||
ldr r9, c0x03030303 ; r9 = 3 --modified for vp8
|
||||
@ -191,15 +191,15 @@ count RN r5
|
||||
ldr r10, c0x04040404
|
||||
|
||||
qadd8 r7, r7, r8
|
||||
and r7, r7, lr ; vp8_filter &= mask;
|
||||
and r7, r7, lr ; vp9_filter &= mask;
|
||||
|
||||
;modify code for vp8 -- Filter1 = vp8_filter (r7)
|
||||
qadd8 r8 , r7 , r9 ; Filter2 (r8) = vp8_signed_char_clamp(vp8_filter+3)
|
||||
qadd8 r7 , r7 , r10 ; vp8_filter = vp8_signed_char_clamp(vp8_filter+4)
|
||||
;modify code for vp8 -- Filter1 = vp9_filter (r7)
|
||||
qadd8 r8 , r7 , r9 ; Filter2 (r8) = vp9_signed_char_clamp(vp9_filter+3)
|
||||
qadd8 r7 , r7 , r10 ; vp9_filter = vp9_signed_char_clamp(vp9_filter+4)
|
||||
|
||||
mov r9, #0
|
||||
shadd8 r8 , r8 , r9 ; Filter2 >>= 3
|
||||
shadd8 r7 , r7 , r9 ; vp8_filter >>= 3
|
||||
shadd8 r7 , r7 , r9 ; vp9_filter >>= 3
|
||||
shadd8 r8 , r8 , r9
|
||||
shadd8 r7 , r7 , r9
|
||||
shadd8 lr , r8 , r9 ; lr: Filter2
|
||||
@ -212,30 +212,30 @@ count RN r5
|
||||
;and r8, r8, lr ; -1 for each element that equals 4
|
||||
|
||||
;calculate output
|
||||
;qadd8 lr, r8, r7 ; u = vp8_signed_char_clamp(s + vp8_filter)
|
||||
;qadd8 lr, r8, r7 ; u = vp9_signed_char_clamp(s + vp9_filter)
|
||||
|
||||
ldr r8, [sp] ; load qs0
|
||||
ldr r9, [sp, #4] ; load ps0
|
||||
|
||||
ldr r10, c0x01010101
|
||||
|
||||
qsub8 r8 ,r8, r7 ; u = vp8_signed_char_clamp(qs0 - vp8_filter)
|
||||
qadd8 r9, r9, lr ; u = vp8_signed_char_clamp(ps0 + Filter2)
|
||||
qsub8 r8 ,r8, r7 ; u = vp9_signed_char_clamp(qs0 - vp9_filter)
|
||||
qadd8 r9, r9, lr ; u = vp9_signed_char_clamp(ps0 + Filter2)
|
||||
|
||||
;end of modification for vp8
|
||||
|
||||
mov lr, #0
|
||||
sadd8 r7, r7 , r10 ; vp8_filter += 1
|
||||
shadd8 r7, r7, lr ; vp8_filter >>= 1
|
||||
sadd8 r7, r7 , r10 ; vp9_filter += 1
|
||||
shadd8 r7, r7, lr ; vp9_filter >>= 1
|
||||
|
||||
ldr r11, [sp, #12] ; load ps1
|
||||
ldr r10, [sp, #8] ; load qs1
|
||||
|
||||
bic r7, r7, r6 ; vp8_filter &= ~hev
|
||||
bic r7, r7, r6 ; vp9_filter &= ~hev
|
||||
sub src, src, pstep, lsl #2
|
||||
|
||||
qadd8 r11, r11, r7 ; u = vp8_signed_char_clamp(ps1 + vp8_filter)
|
||||
qsub8 r10, r10,r7 ; u = vp8_signed_char_clamp(qs1 - vp8_filter)
|
||||
qadd8 r11, r11, r7 ; u = vp9_signed_char_clamp(ps1 + vp9_filter)
|
||||
qsub8 r10, r10,r7 ; u = vp9_signed_char_clamp(qs1 - vp9_filter)
|
||||
|
||||
eor r11, r11, r12 ; *op1 = u^0x80
|
||||
str r11, [src], pstep ; store op1
|
||||
@ -262,7 +262,7 @@ count RN r5
|
||||
|
||||
add sp, sp, #16
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_loop_filter_horizontal_edge_armv6|
|
||||
ENDP ; |vp9_loop_filter_horizontal_edge_armv6|
|
||||
|
||||
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
@ -291,7 +291,7 @@ count RN r5
|
||||
|
||||
|MBHnext8|
|
||||
|
||||
; vp8_filter_mask() function
|
||||
; vp9_filter_mask() function
|
||||
; calculate breakout conditions
|
||||
ldr r12, [src], pstep ; p0
|
||||
|
||||
@ -302,7 +302,7 @@ count RN r5
|
||||
|
||||
orr r6, r6, r7 ; abs (p3-p2)
|
||||
orr r8, r8, r10 ; abs (p2-p1)
|
||||
uqsub8 lr, r6, r2 ; compare to limit. lr: vp8_filter_mask
|
||||
uqsub8 lr, r6, r2 ; compare to limit. lr: vp9_filter_mask
|
||||
uqsub8 r8, r8, r2 ; compare to limit
|
||||
|
||||
uqsub8 r6, r11, r12 ; p1 - p0
|
||||
@ -385,28 +385,28 @@ count RN r5
|
||||
eor r9, r9, r12 ; qs0
|
||||
eor r10, r10, r12 ; qs1
|
||||
|
||||
qsub8 r12, r9, r8 ; vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
qsub8 r12, r9, r8 ; vp9_signed_char_clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
str r7, [sp, #12] ; store ps1 temporarily
|
||||
qsub8 r7, r7, r10 ; vp8_signed_char_clamp(ps1-qs1)
|
||||
qsub8 r7, r7, r10 ; vp9_signed_char_clamp(ps1-qs1)
|
||||
str r10, [sp, #8] ; store qs1 temporarily
|
||||
qadd8 r7, r7, r12
|
||||
str r9, [sp] ; store qs0 temporarily
|
||||
qadd8 r7, r7, r12
|
||||
str r8, [sp, #4] ; store ps0 temporarily
|
||||
qadd8 r7, r7, r12 ; vp8_filter: r7
|
||||
qadd8 r7, r7, r12 ; vp9_filter: r7
|
||||
|
||||
ldr r10, c0x03030303 ; r10 = 3 --modified for vp8
|
||||
ldr r9, c0x04040404
|
||||
|
||||
and r7, r7, lr ; vp8_filter &= mask (lr is free)
|
||||
and r7, r7, lr ; vp9_filter &= mask (lr is free)
|
||||
|
||||
mov r12, r7 ; Filter2: r12
|
||||
and r12, r12, r6 ; Filter2 &= hev
|
||||
|
||||
;modify code for vp8
|
||||
;save bottom 3 bits so that we round one side +4 and the other +3
|
||||
qadd8 r8 , r12 , r9 ; Filter1 (r8) = vp8_signed_char_clamp(Filter2+4)
|
||||
qadd8 r12 , r12 , r10 ; Filter2 (r12) = vp8_signed_char_clamp(Filter2+3)
|
||||
qadd8 r8 , r12 , r9 ; Filter1 (r8) = vp9_signed_char_clamp(Filter2+4)
|
||||
qadd8 r12 , r12 , r10 ; Filter2 (r12) = vp9_signed_char_clamp(Filter2+3)
|
||||
|
||||
mov r10, #0
|
||||
shadd8 r8 , r8 , r10 ; Filter1 >>= 3
|
||||
@ -419,12 +419,12 @@ count RN r5
|
||||
ldr r9, [sp] ; load qs0
|
||||
ldr r11, [sp, #4] ; load ps0
|
||||
|
||||
qsub8 r9 , r9, r8 ; qs0 = vp8_signed_char_clamp(qs0 - Filter1)
|
||||
qadd8 r11, r11, r12 ; ps0 = vp8_signed_char_clamp(ps0 + Filter2)
|
||||
qsub8 r9 , r9, r8 ; qs0 = vp9_signed_char_clamp(qs0 - Filter1)
|
||||
qadd8 r11, r11, r12 ; ps0 = vp9_signed_char_clamp(ps0 + Filter2)
|
||||
|
||||
;save bottom 3 bits so that we round one side +4 and the other +3
|
||||
;and r8, r12, r10 ; s = Filter2 & 7 (s: r8)
|
||||
;qadd8 r12 , r12 , r9 ; Filter2 = vp8_signed_char_clamp(Filter2+4)
|
||||
;qadd8 r12 , r12 , r9 ; Filter2 = vp9_signed_char_clamp(Filter2+4)
|
||||
;mov r10, #0
|
||||
;shadd8 r12 , r12 , r10 ; Filter2 >>= 3
|
||||
;usub8 lr, r8, r9 ; s = (s==4)*-1
|
||||
@ -436,13 +436,13 @@ count RN r5
|
||||
;ldr r11, [sp, #4] ; load ps0
|
||||
;shadd8 r12 , r12 , r10
|
||||
;and r8, r8, lr ; -1 for each element that equals 4
|
||||
;qadd8 r10, r8, r12 ; u = vp8_signed_char_clamp(s + Filter2)
|
||||
;qsub8 r9 , r9, r12 ; qs0 = vp8_signed_char_clamp(qs0 - Filter2)
|
||||
;qadd8 r11, r11, r10 ; ps0 = vp8_signed_char_clamp(ps0 + u)
|
||||
;qadd8 r10, r8, r12 ; u = vp9_signed_char_clamp(s + Filter2)
|
||||
;qsub8 r9 , r9, r12 ; qs0 = vp9_signed_char_clamp(qs0 - Filter2)
|
||||
;qadd8 r11, r11, r10 ; ps0 = vp9_signed_char_clamp(ps0 + u)
|
||||
|
||||
;end of modification for vp8
|
||||
|
||||
bic r12, r7, r6 ; vp8_filter &= ~hev ( r6 is free)
|
||||
bic r12, r7, r6 ; vp9_filter &= ~hev ( r6 is free)
|
||||
;mov r12, r7
|
||||
|
||||
;roughly 3/7th difference across boundary
|
||||
@ -470,10 +470,10 @@ count RN r5
|
||||
|
||||
sub src, src, pstep
|
||||
|
||||
orr r10, r6, r10, lsl #8 ; u = vp8_signed_char_clamp((63 + Filter2 * 27)>>7)
|
||||
orr r10, r6, r10, lsl #8 ; u = vp9_signed_char_clamp((63 + Filter2 * 27)>>7)
|
||||
|
||||
qsub8 r8, r9, r10 ; s = vp8_signed_char_clamp(qs0 - u)
|
||||
qadd8 r10, r11, r10 ; s = vp8_signed_char_clamp(ps0 + u)
|
||||
qsub8 r8, r9, r10 ; s = vp9_signed_char_clamp(qs0 - u)
|
||||
qadd8 r10, r11, r10 ; s = vp9_signed_char_clamp(ps0 + u)
|
||||
eor r8, r8, lr ; *oq0 = s^0x80
|
||||
str r8, [src] ; store *oq0
|
||||
sub src, src, pstep
|
||||
@ -508,10 +508,10 @@ count RN r5
|
||||
|
||||
sub src, src, pstep
|
||||
|
||||
orr r10, r6, r10, lsl #8 ; u = vp8_signed_char_clamp((63 + Filter2 * 18)>>7)
|
||||
orr r10, r6, r10, lsl #8 ; u = vp9_signed_char_clamp((63 + Filter2 * 18)>>7)
|
||||
|
||||
qadd8 r11, r11, r10 ; s = vp8_signed_char_clamp(ps1 + u)
|
||||
qsub8 r8, r9, r10 ; s = vp8_signed_char_clamp(qs1 - u)
|
||||
qadd8 r11, r11, r10 ; s = vp9_signed_char_clamp(ps1 + u)
|
||||
qsub8 r8, r9, r10 ; s = vp9_signed_char_clamp(qs1 - u)
|
||||
eor r11, r11, lr ; *op1 = s^0x80
|
||||
str r11, [src], pstep ; store *op1
|
||||
eor r8, r8, lr ; *oq1 = s^0x80
|
||||
@ -552,10 +552,10 @@ count RN r5
|
||||
eor r9, r9, lr
|
||||
eor r11, r11, lr
|
||||
|
||||
orr r10, r6, r10, lsl #8 ; u = vp8_signed_char_clamp((63 + Filter2 * 9)>>7)
|
||||
orr r10, r6, r10, lsl #8 ; u = vp9_signed_char_clamp((63 + Filter2 * 9)>>7)
|
||||
|
||||
qadd8 r8, r11, r10 ; s = vp8_signed_char_clamp(ps2 + u)
|
||||
qsub8 r10, r9, r10 ; s = vp8_signed_char_clamp(qs2 - u)
|
||||
qadd8 r8, r11, r10 ; s = vp9_signed_char_clamp(ps2 + u)
|
||||
qsub8 r10, r9, r10 ; s = vp9_signed_char_clamp(qs2 - u)
|
||||
eor r8, r8, lr ; *op2 = s^0x80
|
||||
str r8, [src], pstep, lsl #2 ; store *op2
|
||||
add src, src, pstep
|
||||
@ -579,7 +579,7 @@ count RN r5
|
||||
|
||||
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|vp8_loop_filter_vertical_edge_armv6| PROC
|
||||
|vp9_loop_filter_vertical_edge_armv6| PROC
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
@ -605,7 +605,7 @@ count RN r5
|
||||
|
||||
|Vnext8|
|
||||
|
||||
; vp8_filter_mask() function
|
||||
; vp9_filter_mask() function
|
||||
; calculate breakout conditions
|
||||
; transpose the source data for 4-in-parallel operation
|
||||
TRANSPOSE_MATRIX r6, r7, r8, lr, r9, r10, r11, r12
|
||||
@ -616,7 +616,7 @@ count RN r5
|
||||
uqsub8 r10, r11, r10 ; p1 - p2
|
||||
orr r7, r7, r8 ; abs (p3-p2)
|
||||
orr r10, r9, r10 ; abs (p2-p1)
|
||||
uqsub8 lr, r7, r2 ; compare to limit. lr: vp8_filter_mask
|
||||
uqsub8 lr, r7, r2 ; compare to limit. lr: vp9_filter_mask
|
||||
uqsub8 r10, r10, r2 ; compare to limit
|
||||
|
||||
sub src, src, pstep, lsl #2 ; move src pointer down by 4 lines
|
||||
@ -702,7 +702,7 @@ count RN r5
|
||||
usub8 r9, r12, r9
|
||||
sel r6, r12, r11 ; hev mask: r6
|
||||
|
||||
;vp8_filter() function
|
||||
;vp9_filter() function
|
||||
; load soure data to r6, r11, r12, lr
|
||||
ldrh r9, [src, #-2]
|
||||
ldrh r10, [src], pstep
|
||||
@ -742,10 +742,10 @@ count RN r5
|
||||
str r10, [sp, #8] ; store qs1 temporarily
|
||||
str r7, [sp, #12] ; store ps1 temporarily
|
||||
|
||||
qsub8 r7, r7, r10 ; vp8_signed_char_clamp(ps1-qs1)
|
||||
qsub8 r8, r9, r8 ; vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
qsub8 r7, r7, r10 ; vp9_signed_char_clamp(ps1-qs1)
|
||||
qsub8 r8, r9, r8 ; vp9_signed_char_clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
|
||||
and r7, r7, r6 ; vp8_filter (r7) &= hev (r7 : filter)
|
||||
and r7, r7, r6 ; vp9_filter (r7) &= hev (r7 : filter)
|
||||
|
||||
qadd8 r7, r7, r8
|
||||
ldr r9, c0x03030303 ; r9 = 3 --modified for vp8
|
||||
@ -756,15 +756,15 @@ count RN r5
|
||||
qadd8 r7, r7, r8
|
||||
;mvn r11, #0 ; r11 == -1
|
||||
|
||||
and r7, r7, lr ; vp8_filter &= mask
|
||||
and r7, r7, lr ; vp9_filter &= mask
|
||||
|
||||
;modify code for vp8 -- Filter1 = vp8_filter (r7)
|
||||
qadd8 r8 , r7 , r9 ; Filter2 (r8) = vp8_signed_char_clamp(vp8_filter+3)
|
||||
qadd8 r7 , r7 , r10 ; vp8_filter = vp8_signed_char_clamp(vp8_filter+4)
|
||||
;modify code for vp8 -- Filter1 = vp9_filter (r7)
|
||||
qadd8 r8 , r7 , r9 ; Filter2 (r8) = vp9_signed_char_clamp(vp9_filter+3)
|
||||
qadd8 r7 , r7 , r10 ; vp9_filter = vp9_signed_char_clamp(vp9_filter+4)
|
||||
|
||||
mov r9, #0
|
||||
shadd8 r8 , r8 , r9 ; Filter2 >>= 3
|
||||
shadd8 r7 , r7 , r9 ; vp8_filter >>= 3
|
||||
shadd8 r7 , r7 , r9 ; vp9_filter >>= 3
|
||||
shadd8 r8 , r8 , r9
|
||||
shadd8 r7 , r7 , r9
|
||||
shadd8 lr , r8 , r9 ; lr: filter2
|
||||
@ -777,15 +777,15 @@ count RN r5
|
||||
;and r8, r8, lr ; -1 for each element that equals 4 -- r8: s
|
||||
|
||||
;calculate output
|
||||
;qadd8 lr, r8, r7 ; u = vp8_signed_char_clamp(s + vp8_filter)
|
||||
;qadd8 lr, r8, r7 ; u = vp9_signed_char_clamp(s + vp9_filter)
|
||||
|
||||
ldr r8, [sp] ; load qs0
|
||||
ldr r9, [sp, #4] ; load ps0
|
||||
|
||||
ldr r10, c0x01010101
|
||||
|
||||
qsub8 r8, r8, r7 ; u = vp8_signed_char_clamp(qs0 - vp8_filter)
|
||||
qadd8 r9, r9, lr ; u = vp8_signed_char_clamp(ps0 + Filter2)
|
||||
qsub8 r8, r8, r7 ; u = vp9_signed_char_clamp(qs0 - vp9_filter)
|
||||
qadd8 r9, r9, lr ; u = vp9_signed_char_clamp(ps0 + Filter2)
|
||||
;end of modification for vp8
|
||||
|
||||
eor r8, r8, r12
|
||||
@ -799,10 +799,10 @@ count RN r5
|
||||
ldr r10, [sp, #8] ; load qs1
|
||||
ldr r11, [sp, #12] ; load ps1
|
||||
|
||||
bic r7, r7, r6 ; r7: vp8_filter
|
||||
bic r7, r7, r6 ; r7: vp9_filter
|
||||
|
||||
qsub8 r10 , r10, r7 ; u = vp8_signed_char_clamp(qs1 - vp8_filter)
|
||||
qadd8 r11, r11, r7 ; u = vp8_signed_char_clamp(ps1 + vp8_filter)
|
||||
qsub8 r10 , r10, r7 ; u = vp9_signed_char_clamp(qs1 - vp9_filter)
|
||||
qadd8 r11, r11, r7 ; u = vp9_signed_char_clamp(ps1 + vp9_filter)
|
||||
eor r10, r10, r12
|
||||
eor r11, r11, r12
|
||||
|
||||
@ -848,7 +848,7 @@ count RN r5
|
||||
add sp, sp, #16
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_loop_filter_vertical_edge_armv6|
|
||||
ENDP ; |vp9_loop_filter_vertical_edge_armv6|
|
||||
|
||||
|
||||
|
||||
@ -882,7 +882,7 @@ count RN r5
|
||||
orr r3, r3, r3, lsl #16
|
||||
|
||||
|MBVnext8|
|
||||
; vp8_filter_mask() function
|
||||
; vp9_filter_mask() function
|
||||
; calculate breakout conditions
|
||||
; transpose the source data for 4-in-parallel operation
|
||||
TRANSPOSE_MATRIX r6, r7, r8, lr, r9, r10, r11, r12
|
||||
@ -893,7 +893,7 @@ count RN r5
|
||||
uqsub8 r10, r11, r10 ; p1 - p2
|
||||
orr r7, r7, r8 ; abs (p3-p2)
|
||||
orr r10, r9, r10 ; abs (p2-p1)
|
||||
uqsub8 lr, r7, r2 ; compare to limit. lr: vp8_filter_mask
|
||||
uqsub8 lr, r7, r2 ; compare to limit. lr: vp9_filter_mask
|
||||
uqsub8 r10, r10, r2 ; compare to limit
|
||||
|
||||
sub src, src, pstep, lsl #2 ; move src pointer down by 4 lines
|
||||
@ -1019,29 +1019,29 @@ count RN r5
|
||||
eor r9, r9, r12 ; qs0
|
||||
eor r10, r10, r12 ; qs1
|
||||
|
||||
qsub8 r12, r9, r8 ; vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
qsub8 r12, r9, r8 ; vp9_signed_char_clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
str r7, [sp, #12] ; store ps1 temporarily
|
||||
qsub8 r7, r7, r10 ; vp8_signed_char_clamp(ps1-qs1)
|
||||
qsub8 r7, r7, r10 ; vp9_signed_char_clamp(ps1-qs1)
|
||||
str r10, [sp, #8] ; store qs1 temporarily
|
||||
qadd8 r7, r7, r12
|
||||
str r9, [sp] ; store qs0 temporarily
|
||||
qadd8 r7, r7, r12
|
||||
str r8, [sp, #4] ; store ps0 temporarily
|
||||
qadd8 r7, r7, r12 ; vp8_filter: r7
|
||||
qadd8 r7, r7, r12 ; vp9_filter: r7
|
||||
|
||||
ldr r10, c0x03030303 ; r10 = 3 --modified for vp8
|
||||
ldr r9, c0x04040404
|
||||
;mvn r11, #0 ; r11 == -1
|
||||
|
||||
and r7, r7, lr ; vp8_filter &= mask (lr is free)
|
||||
and r7, r7, lr ; vp9_filter &= mask (lr is free)
|
||||
|
||||
mov r12, r7 ; Filter2: r12
|
||||
and r12, r12, r6 ; Filter2 &= hev
|
||||
|
||||
;modify code for vp8
|
||||
;save bottom 3 bits so that we round one side +4 and the other +3
|
||||
qadd8 r8 , r12 , r9 ; Filter1 (r8) = vp8_signed_char_clamp(Filter2+4)
|
||||
qadd8 r12 , r12 , r10 ; Filter2 (r12) = vp8_signed_char_clamp(Filter2+3)
|
||||
qadd8 r8 , r12 , r9 ; Filter1 (r8) = vp9_signed_char_clamp(Filter2+4)
|
||||
qadd8 r12 , r12 , r10 ; Filter2 (r12) = vp9_signed_char_clamp(Filter2+3)
|
||||
|
||||
mov r10, #0
|
||||
shadd8 r8 , r8 , r10 ; Filter1 >>= 3
|
||||
@ -1054,12 +1054,12 @@ count RN r5
|
||||
ldr r9, [sp] ; load qs0
|
||||
ldr r11, [sp, #4] ; load ps0
|
||||
|
||||
qsub8 r9 , r9, r8 ; qs0 = vp8_signed_char_clamp(qs0 - Filter1)
|
||||
qadd8 r11, r11, r12 ; ps0 = vp8_signed_char_clamp(ps0 + Filter2)
|
||||
qsub8 r9 , r9, r8 ; qs0 = vp9_signed_char_clamp(qs0 - Filter1)
|
||||
qadd8 r11, r11, r12 ; ps0 = vp9_signed_char_clamp(ps0 + Filter2)
|
||||
|
||||
;save bottom 3 bits so that we round one side +4 and the other +3
|
||||
;and r8, r12, r10 ; s = Filter2 & 7 (s: r8)
|
||||
;qadd8 r12 , r12 , r9 ; Filter2 = vp8_signed_char_clamp(Filter2+4)
|
||||
;qadd8 r12 , r12 , r9 ; Filter2 = vp9_signed_char_clamp(Filter2+4)
|
||||
;mov r10, #0
|
||||
;shadd8 r12 , r12 , r10 ; Filter2 >>= 3
|
||||
;usub8 lr, r8, r9 ; s = (s==4)*-1
|
||||
@ -1071,13 +1071,13 @@ count RN r5
|
||||
;ldr r11, [sp, #4] ; load ps0
|
||||
;shadd8 r12 , r12 , r10
|
||||
;and r8, r8, lr ; -1 for each element that equals 4
|
||||
;qadd8 r10, r8, r12 ; u = vp8_signed_char_clamp(s + Filter2)
|
||||
;qsub8 r9 , r9, r12 ; qs0 = vp8_signed_char_clamp(qs0 - Filter2)
|
||||
;qadd8 r11, r11, r10 ; ps0 = vp8_signed_char_clamp(ps0 + u)
|
||||
;qadd8 r10, r8, r12 ; u = vp9_signed_char_clamp(s + Filter2)
|
||||
;qsub8 r9 , r9, r12 ; qs0 = vp9_signed_char_clamp(qs0 - Filter2)
|
||||
;qadd8 r11, r11, r10 ; ps0 = vp9_signed_char_clamp(ps0 + u)
|
||||
|
||||
;end of modification for vp8
|
||||
|
||||
bic r12, r7, r6 ;vp8_filter &= ~hev ( r6 is free)
|
||||
bic r12, r7, r6 ;vp9_filter &= ~hev ( r6 is free)
|
||||
;mov r12, r7
|
||||
|
||||
;roughly 3/7th difference across boundary
|
||||
@ -1105,10 +1105,10 @@ count RN r5
|
||||
|
||||
sub src, src, pstep, lsl #2 ; move src pointer down by 4 lines
|
||||
|
||||
orr r10, r6, r10, lsl #8 ; u = vp8_signed_char_clamp((63 + Filter2 * 27)>>7)
|
||||
orr r10, r6, r10, lsl #8 ; u = vp9_signed_char_clamp((63 + Filter2 * 27)>>7)
|
||||
|
||||
qsub8 r8, r9, r10 ; s = vp8_signed_char_clamp(qs0 - u)
|
||||
qadd8 r10, r11, r10 ; s = vp8_signed_char_clamp(ps0 + u)
|
||||
qsub8 r8, r9, r10 ; s = vp9_signed_char_clamp(qs0 - u)
|
||||
qadd8 r10, r11, r10 ; s = vp9_signed_char_clamp(ps0 + u)
|
||||
eor r8, r8, lr ; *oq0 = s^0x80
|
||||
eor r10, r10, lr ; *op0 = s^0x80
|
||||
|
||||
@ -1157,10 +1157,10 @@ count RN r5
|
||||
|
||||
add src, src, #2
|
||||
|
||||
orr r10, r6, r10, lsl #8 ; u = vp8_signed_char_clamp((63 + Filter2 * 18)>>7)
|
||||
orr r10, r6, r10, lsl #8 ; u = vp9_signed_char_clamp((63 + Filter2 * 18)>>7)
|
||||
|
||||
qsub8 r8, r9, r10 ; s = vp8_signed_char_clamp(qs1 - u)
|
||||
qadd8 r10, r11, r10 ; s = vp8_signed_char_clamp(ps1 + u)
|
||||
qsub8 r8, r9, r10 ; s = vp9_signed_char_clamp(qs1 - u)
|
||||
qadd8 r10, r11, r10 ; s = vp9_signed_char_clamp(ps1 + u)
|
||||
eor r8, r8, lr ; *oq1 = s^0x80
|
||||
eor r10, r10, lr ; *op1 = s^0x80
|
||||
|
||||
@ -1227,10 +1227,10 @@ count RN r5
|
||||
|
||||
ldr lr, c0x80808080
|
||||
|
||||
orr r10, r6, r10, lsl #8 ; u = vp8_signed_char_clamp((63 + Filter2 * 9)>>7)
|
||||
orr r10, r6, r10, lsl #8 ; u = vp9_signed_char_clamp((63 + Filter2 * 9)>>7)
|
||||
|
||||
qadd8 r8, r11, r10 ; s = vp8_signed_char_clamp(ps2 + u)
|
||||
qsub8 r10, r9, r10 ; s = vp8_signed_char_clamp(qs2 - u)
|
||||
qadd8 r8, r11, r10 ; s = vp9_signed_char_clamp(ps2 + u)
|
||||
qsub8 r10, r9, r10 ; s = vp9_signed_char_clamp(qs2 - u)
|
||||
eor r8, r8, lr ; *op2 = s^0x80
|
||||
eor r10, r10, lr ; *oq2 = s^0x80
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_loop_filter_simple_horizontal_edge_armv6|
|
||||
EXPORT |vp8_loop_filter_simple_vertical_edge_armv6|
|
||||
EXPORT |vp9_loop_filter_simple_horizontal_edge_armv6|
|
||||
EXPORT |vp9_loop_filter_simple_vertical_edge_armv6|
|
||||
|
||||
AREA |.text|, CODE, READONLY ; name this block of code
|
||||
|
||||
@ -54,7 +54,7 @@ pstep RN r1
|
||||
;r2 const char *blimit
|
||||
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|vp8_loop_filter_simple_horizontal_edge_armv6| PROC
|
||||
|vp9_loop_filter_simple_horizontal_edge_armv6| PROC
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
@ -94,18 +94,18 @@ pstep RN r1
|
||||
eor r4, r4, r2 ; p0 offset to convert to a signed value
|
||||
eor r5, r5, r2 ; q0 offset to convert to a signed value
|
||||
|
||||
qsub8 r3, r3, r6 ; vp8_filter = p1 - q1
|
||||
qsub8 r3, r3, r6 ; vp9_filter = p1 - q1
|
||||
qsub8 r6, r5, r4 ; q0 - p0
|
||||
qadd8 r3, r3, r6 ; += q0 - p0
|
||||
ldr r7, c0x04040404
|
||||
qadd8 r3, r3, r6 ; += q0 - p0
|
||||
ldr r8, c0x03030303
|
||||
qadd8 r3, r3, r6 ; vp8_filter = p1-q1 + 3*(q0-p0))
|
||||
qadd8 r3, r3, r6 ; vp9_filter = p1-q1 + 3*(q0-p0))
|
||||
;STALL
|
||||
and r3, r3, r10 ; vp8_filter &= mask
|
||||
and r3, r3, r10 ; vp9_filter &= mask
|
||||
|
||||
qadd8 r7 , r3 , r7 ; Filter1 = vp8_filter + 4
|
||||
qadd8 r8 , r3 , r8 ; Filter2 = vp8_filter + 3
|
||||
qadd8 r7 , r3 , r7 ; Filter1 = vp9_filter + 4
|
||||
qadd8 r8 , r3 , r8 ; Filter2 = vp9_filter + 3
|
||||
|
||||
shadd8 r7 , r7 , lr
|
||||
shadd8 r8 , r8 , lr
|
||||
@ -133,11 +133,11 @@ pstep RN r1
|
||||
bne simple_hnext8
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_loop_filter_simple_horizontal_edge_armv6|
|
||||
ENDP ; |vp9_loop_filter_simple_horizontal_edge_armv6|
|
||||
|
||||
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|vp8_loop_filter_simple_vertical_edge_armv6| PROC
|
||||
|vp9_loop_filter_simple_vertical_edge_armv6| PROC
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
@ -200,21 +200,21 @@ pstep RN r1
|
||||
eor r4, r4, r2 ; p0 offset to convert to a signed value
|
||||
eor r5, r5, r2 ; q0 offset to convert to a signed value
|
||||
|
||||
qsub8 r3, r3, r6 ; vp8_filter = p1 - q1
|
||||
qsub8 r3, r3, r6 ; vp9_filter = p1 - q1
|
||||
qsub8 r6, r5, r4 ; q0 - p0
|
||||
|
||||
qadd8 r3, r3, r6 ; vp8_filter += q0 - p0
|
||||
qadd8 r3, r3, r6 ; vp9_filter += q0 - p0
|
||||
ldr r9, c0x03030303 ; r9 = 3
|
||||
|
||||
qadd8 r3, r3, r6 ; vp8_filter += q0 - p0
|
||||
qadd8 r3, r3, r6 ; vp9_filter += q0 - p0
|
||||
ldr r7, c0x04040404
|
||||
|
||||
qadd8 r3, r3, r6 ; vp8_filter = p1-q1 + 3*(q0-p0))
|
||||
qadd8 r3, r3, r6 ; vp9_filter = p1-q1 + 3*(q0-p0))
|
||||
;STALL
|
||||
and r3, r3, lr ; vp8_filter &= mask
|
||||
and r3, r3, lr ; vp9_filter &= mask
|
||||
|
||||
qadd8 r9 , r3 , r9 ; Filter2 = vp8_filter + 3
|
||||
qadd8 r3 , r3 , r7 ; Filter1 = vp8_filter + 4
|
||||
qadd8 r9 , r3 , r9 ; Filter2 = vp9_filter + 3
|
||||
qadd8 r3 , r3 , r7 ; Filter1 = vp9_filter + 4
|
||||
|
||||
shadd8 r9 , r9 , r8
|
||||
shadd8 r3 , r3 , r8
|
||||
@ -276,7 +276,7 @@ pstep RN r1
|
||||
bne simple_vnext8
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_loop_filter_simple_vertical_edge_armv6|
|
||||
ENDP ; |vp9_loop_filter_simple_vertical_edge_armv6|
|
||||
|
||||
; Constant Pool
|
||||
c0x80808080 DCD 0x80808080
|
||||
|
@ -65,18 +65,18 @@
|
||||
pkhbt r9, r9, r10, lsl #16 ; r10 | r9
|
||||
|
||||
|first_pass_wloop_v6|
|
||||
smuad r11, r6, r3 ; vp8_filter[0], vp8_filter[1]
|
||||
smuad r11, r6, r3 ; vp9_filter[0], vp9_filter[1]
|
||||
smuad r12, r7, r3
|
||||
|
||||
ldrb r6, [r0], #1
|
||||
|
||||
smlad r11, r8, r4, r11 ; vp8_filter[2], vp8_filter[3]
|
||||
smlad r11, r8, r4, r11 ; vp9_filter[2], vp9_filter[3]
|
||||
ldrb r7, [r0], #1
|
||||
smlad r12, r9, r4, r12
|
||||
|
||||
pkhbt r10, r10, r6, lsl #16 ; r10 | r9
|
||||
pkhbt r6, r6, r7, lsl #16 ; r11 | r10
|
||||
smlad r11, r10, r5, r11 ; vp8_filter[4], vp8_filter[5]
|
||||
smlad r11, r10, r5, r11 ; vp9_filter[4], vp9_filter[5]
|
||||
smlad r12, r6, r5, r12
|
||||
|
||||
sub r2, r2, #1
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "vp8/common/subpixel.h"
|
||||
#include "bilinearfilter_arm.h"
|
||||
|
||||
void vp8_filter_block2d_bil_armv6
|
||||
void vp9_filter_block2d_bil_armv6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
@ -28,10 +28,10 @@ void vp8_filter_block2d_bil_armv6
|
||||
unsigned short FData[36 * 16]; /* Temp data buffer used in filtering */
|
||||
|
||||
/* First filter 1-D horizontally... */
|
||||
vp8_filter_block2d_bil_first_pass_armv6(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
|
||||
vp9_filter_block2d_bil_first_pass_armv6(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
|
||||
|
||||
/* then 1-D vertically... */
|
||||
vp8_filter_block2d_bil_second_pass_armv6(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
|
||||
vp9_filter_block2d_bil_second_pass_armv6(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ void vp9_bilinear_predict4x4_armv6
|
||||
HFilter = vp8_bilinear_filters[xoffset];
|
||||
VFilter = vp8_bilinear_filters[yoffset];
|
||||
|
||||
vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 4, 4);
|
||||
vp9_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 4, 4);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict8x8_armv6
|
||||
@ -68,7 +68,7 @@ void vp9_bilinear_predict8x8_armv6
|
||||
HFilter = vp8_bilinear_filters[xoffset];
|
||||
VFilter = vp8_bilinear_filters[yoffset];
|
||||
|
||||
vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 8);
|
||||
vp9_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 8);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict8x4_armv6
|
||||
@ -86,7 +86,7 @@ void vp9_bilinear_predict8x4_armv6
|
||||
HFilter = vp8_bilinear_filters[xoffset];
|
||||
VFilter = vp8_bilinear_filters[yoffset];
|
||||
|
||||
vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 4);
|
||||
vp9_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 4);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict16x16_armv6
|
||||
@ -104,5 +104,5 @@ void vp9_bilinear_predict16x16_armv6
|
||||
HFilter = vp8_bilinear_filters[xoffset];
|
||||
VFilter = vp8_bilinear_filters[yoffset];
|
||||
|
||||
vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16);
|
||||
vp9_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16);
|
||||
}
|
||||
|
@ -12,24 +12,24 @@
|
||||
#ifndef BILINEARFILTER_ARM_H
|
||||
#define BILINEARFILTER_ARM_H
|
||||
|
||||
extern void vp8_filter_block2d_bil_first_pass_armv6
|
||||
extern void vp9_filter_block2d_bil_first_pass_armv6
|
||||
(
|
||||
const unsigned char *src_ptr,
|
||||
unsigned short *dst_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
extern void vp8_filter_block2d_bil_second_pass_armv6
|
||||
extern void vp9_filter_block2d_bil_second_pass_armv6
|
||||
(
|
||||
const unsigned short *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
#endif /* BILINEARFILTER_ARM_H */
|
||||
|
@ -15,75 +15,75 @@
|
||||
#include "vp8/common/subpixel.h"
|
||||
#include "vpx_ports/mem.h"
|
||||
|
||||
extern void vp8_filter_block2d_first_pass_armv6
|
||||
extern void vp9_filter_block2d_first_pass_armv6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int output_width,
|
||||
unsigned int output_height,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
// 8x8
|
||||
extern void vp8_filter_block2d_first_pass_8x8_armv6
|
||||
extern void vp9_filter_block2d_first_pass_8x8_armv6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int output_width,
|
||||
unsigned int output_height,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
// 16x16
|
||||
extern void vp8_filter_block2d_first_pass_16x16_armv6
|
||||
extern void vp9_filter_block2d_first_pass_16x16_armv6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int output_width,
|
||||
unsigned int output_height,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
extern void vp8_filter_block2d_second_pass_armv6
|
||||
extern void vp9_filter_block2d_second_pass_armv6
|
||||
(
|
||||
short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int cnt,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
extern void vp8_filter4_block2d_second_pass_armv6
|
||||
extern void vp9_filter4_block2d_second_pass_armv6
|
||||
(
|
||||
short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int cnt,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
extern void vp8_filter_block2d_first_pass_only_armv6
|
||||
extern void vp9_filter_block2d_first_pass_only_armv6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int cnt,
|
||||
unsigned int output_pitch,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
|
||||
extern void vp8_filter_block2d_second_pass_only_armv6
|
||||
extern void vp9_filter_block2d_second_pass_only_armv6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int cnt,
|
||||
unsigned int output_pitch,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
|
||||
#if HAVE_ARMV6
|
||||
@ -106,24 +106,24 @@ void vp9_sixtap_predict_armv6
|
||||
|
||||
/* Vfilter is null. First pass only */
|
||||
if (xoffset && !yoffset) {
|
||||
/*vp8_filter_block2d_first_pass_armv6 ( src_ptr, FData+2, src_pixels_per_line, 4, 4, HFilter );
|
||||
vp8_filter_block2d_second_pass_armv6 ( FData+2, dst_ptr, dst_pitch, 4, VFilter );*/
|
||||
/*vp9_filter_block2d_first_pass_armv6 ( src_ptr, FData+2, src_pixels_per_line, 4, 4, HFilter );
|
||||
vp9_filter_block2d_second_pass_armv6 ( FData+2, dst_ptr, dst_pitch, 4, VFilter );*/
|
||||
|
||||
vp8_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 4, dst_pitch, HFilter);
|
||||
vp9_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 4, dst_pitch, HFilter);
|
||||
}
|
||||
/* Hfilter is null. Second pass only */
|
||||
else if (!xoffset && yoffset) {
|
||||
vp8_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 4, dst_pitch, VFilter);
|
||||
vp9_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 4, dst_pitch, VFilter);
|
||||
} else {
|
||||
/* Vfilter is a 4 tap filter */
|
||||
if (yoffset & 0x1) {
|
||||
vp8_filter_block2d_first_pass_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 4, 7, HFilter);
|
||||
vp8_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 4, VFilter);
|
||||
vp9_filter_block2d_first_pass_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 4, 7, HFilter);
|
||||
vp9_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 4, VFilter);
|
||||
}
|
||||
/* Vfilter is 6 tap filter */
|
||||
else {
|
||||
vp8_filter_block2d_first_pass_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 4, 9, HFilter);
|
||||
vp8_filter_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 4, VFilter);
|
||||
vp9_filter_block2d_first_pass_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 4, 9, HFilter);
|
||||
vp9_filter_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 4, VFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -145,18 +145,18 @@ void vp9_sixtap_predict8x8_armv6
|
||||
VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
|
||||
|
||||
if (xoffset && !yoffset) {
|
||||
vp8_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, HFilter);
|
||||
vp9_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, HFilter);
|
||||
}
|
||||
/* Hfilter is null. Second pass only */
|
||||
else if (!xoffset && yoffset) {
|
||||
vp8_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, VFilter);
|
||||
vp9_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, VFilter);
|
||||
} else {
|
||||
if (yoffset & 0x1) {
|
||||
vp8_filter_block2d_first_pass_8x8_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 8, 11, HFilter);
|
||||
vp8_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 8, VFilter);
|
||||
vp9_filter_block2d_first_pass_8x8_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 8, 11, HFilter);
|
||||
vp9_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 8, VFilter);
|
||||
} else {
|
||||
vp8_filter_block2d_first_pass_8x8_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 8, 13, HFilter);
|
||||
vp8_filter_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 8, VFilter);
|
||||
vp9_filter_block2d_first_pass_8x8_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 8, 13, HFilter);
|
||||
vp9_filter_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 8, VFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -179,18 +179,18 @@ void vp9_sixtap_predict16x16_armv6
|
||||
VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
|
||||
|
||||
if (xoffset && !yoffset) {
|
||||
vp8_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 16, dst_pitch, HFilter);
|
||||
vp9_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 16, dst_pitch, HFilter);
|
||||
}
|
||||
/* Hfilter is null. Second pass only */
|
||||
else if (!xoffset && yoffset) {
|
||||
vp8_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 16, dst_pitch, VFilter);
|
||||
vp9_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 16, dst_pitch, VFilter);
|
||||
} else {
|
||||
if (yoffset & 0x1) {
|
||||
vp8_filter_block2d_first_pass_16x16_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 16, 19, HFilter);
|
||||
vp8_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 16, VFilter);
|
||||
vp9_filter_block2d_first_pass_16x16_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 16, 19, HFilter);
|
||||
vp9_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 16, VFilter);
|
||||
} else {
|
||||
vp8_filter_block2d_first_pass_16x16_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 16, 21, HFilter);
|
||||
vp8_filter_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 16, VFilter);
|
||||
vp9_filter_block2d_first_pass_16x16_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 16, 21, HFilter);
|
||||
vp9_filter_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 16, VFilter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,14 +20,14 @@ extern prototype_second_order(vp9_short_inv_walsh4x4_1_v6);
|
||||
extern prototype_second_order(vp9_short_inv_walsh4x4_v6);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_idct_idct1
|
||||
#define vp8_idct_idct1 vp9_short_idct4x4llm_1_v6
|
||||
#undef vp9_idct_idct1
|
||||
#define vp9_idct_idct1 vp9_short_idct4x4llm_1_v6
|
||||
|
||||
#undef vp8_idct_idct16
|
||||
#define vp8_idct_idct16 vp9_short_idct4x4llm_v6_dual
|
||||
#undef vp9_idct_idct16
|
||||
#define vp9_idct_idct16 vp9_short_idct4x4llm_v6_dual
|
||||
|
||||
#undef vp8_idct_idct1_scalar_add
|
||||
#define vp8_idct_idct1_scalar_add vp9_dc_only_idct_add_v6
|
||||
#undef vp9_idct_idct1_scalar_add
|
||||
#define vp9_idct_idct1_scalar_add vp9_dc_only_idct_add_v6
|
||||
|
||||
#undef vp8_idct_iwalsh1
|
||||
#define vp8_idct_iwalsh1 vp9_short_inv_walsh4x4_1_v6
|
||||
@ -45,14 +45,14 @@ extern prototype_second_order(vp9_short_inv_walsh4x4_1_neon);
|
||||
extern prototype_second_order(vp9_short_inv_walsh4x4_neon);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_idct_idct1
|
||||
#define vp8_idct_idct1 vp9_short_idct4x4llm_1_neon
|
||||
#undef vp9_idct_idct1
|
||||
#define vp9_idct_idct1 vp9_short_idct4x4llm_1_neon
|
||||
|
||||
#undef vp8_idct_idct16
|
||||
#define vp8_idct_idct16 vp9_short_idct4x4llm_neon
|
||||
#undef vp9_idct_idct16
|
||||
#define vp9_idct_idct16 vp9_short_idct4x4llm_neon
|
||||
|
||||
#undef vp8_idct_idct1_scalar_add
|
||||
#define vp8_idct_idct1_scalar_add vp9_dc_only_idct_add_neon
|
||||
#undef vp9_idct_idct1_scalar_add
|
||||
#define vp9_idct_idct1_scalar_add vp9_dc_only_idct_add_neon
|
||||
|
||||
#undef vp8_idct_iwalsh1
|
||||
#define vp8_idct_iwalsh1 vp9_short_inv_walsh4x4_1_neon
|
||||
|
@ -59,7 +59,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q7, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q7, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q8, d3, d0
|
||||
vmull.u8 q9, d5, d0
|
||||
vmull.u8 q10, d6, d0
|
||||
@ -73,7 +73,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d8, d8, d9, #1
|
||||
vext.8 d11, d11, d12, #1
|
||||
|
||||
vmlal.u8 q7, d2, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q7, d2, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q9, d5, d1
|
||||
vmlal.u8 q11, d8, d1
|
||||
vmlal.u8 q13, d11, d1
|
||||
@ -83,7 +83,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d9, d9, d10, #1
|
||||
vext.8 d12, d12, d13, #1
|
||||
|
||||
vmlal.u8 q8, d3, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q8, d3, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q10, d6, d1
|
||||
vmlal.u8 q12, d9, d1
|
||||
vmlal.u8 q14, d12, d1
|
||||
@ -112,7 +112,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
;First-pass filtering for rest 5 lines
|
||||
vld1.u8 {d14, d15, d16}, [r0], r1
|
||||
|
||||
vmull.u8 q9, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q9, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q10, d3, d0
|
||||
vmull.u8 q11, d5, d0
|
||||
vmull.u8 q12, d6, d0
|
||||
@ -123,7 +123,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d5, d5, d6, #1
|
||||
vext.8 d8, d8, d9, #1
|
||||
|
||||
vmlal.u8 q9, d2, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q9, d2, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q11, d5, d1
|
||||
vmlal.u8 q13, d8, d1
|
||||
|
||||
@ -131,7 +131,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d6, d6, d7, #1
|
||||
vext.8 d9, d9, d10, #1
|
||||
|
||||
vmlal.u8 q10, d3, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q10, d3, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q12, d6, d1
|
||||
vmlal.u8 q14, d9, d1
|
||||
|
||||
@ -143,13 +143,13 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d11, d11, d12, #1 ;construct src_ptr[1]
|
||||
vext.8 d14, d14, d15, #1
|
||||
|
||||
vmlal.u8 q1, d11, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q1, d11, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q3, d14, d1
|
||||
|
||||
vext.8 d12, d12, d13, #1
|
||||
vext.8 d15, d15, d16, #1
|
||||
|
||||
vmlal.u8 q2, d12, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q2, d12, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q4, d15, d1
|
||||
|
||||
vqrshrn.u16 d10, q9, #7 ;shift/round/saturate to u8
|
||||
@ -182,7 +182,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
|
||||
filt_blk2d_sp16x16_loop_neon
|
||||
vld1.u8 {d24, d25}, [lr]!
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vld1.u8 {d26, d27}, [lr]!
|
||||
vmull.u8 q2, d23, d0
|
||||
vld1.u8 {d28, d29}, [lr]!
|
||||
@ -195,7 +195,7 @@ filt_blk2d_sp16x16_loop_neon
|
||||
vmull.u8 q7, d28, d0
|
||||
vmull.u8 q8, d29, d0
|
||||
|
||||
vmlal.u8 q1, d24, d1 ;(src_ptr[pixel_step] * vp8_filter[1])
|
||||
vmlal.u8 q1, d24, d1 ;(src_ptr[pixel_step] * vp9_filter[1])
|
||||
vmlal.u8 q2, d25, d1
|
||||
vmlal.u8 q3, d26, d1
|
||||
vmlal.u8 q4, d27, d1
|
||||
@ -244,7 +244,7 @@ filt_blk2d_fpo16x16_loop_neon
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q7, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q7, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q8, d3, d0
|
||||
vmull.u8 q9, d5, d0
|
||||
vmull.u8 q10, d6, d0
|
||||
@ -258,7 +258,7 @@ filt_blk2d_fpo16x16_loop_neon
|
||||
vext.8 d8, d8, d9, #1
|
||||
vext.8 d11, d11, d12, #1
|
||||
|
||||
vmlal.u8 q7, d2, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q7, d2, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q9, d5, d1
|
||||
vmlal.u8 q11, d8, d1
|
||||
vmlal.u8 q13, d11, d1
|
||||
@ -268,7 +268,7 @@ filt_blk2d_fpo16x16_loop_neon
|
||||
vext.8 d9, d9, d10, #1
|
||||
vext.8 d12, d12, d13, #1
|
||||
|
||||
vmlal.u8 q8, d3, d1 ;(src_ptr[0] * vp8_filter[1])
|
||||
vmlal.u8 q8, d3, d1 ;(src_ptr[0] * vp9_filter[1])
|
||||
vmlal.u8 q10, d6, d1
|
||||
vmlal.u8 q12, d9, d1
|
||||
vmlal.u8 q14, d12, d1
|
||||
@ -306,7 +306,7 @@ secondpass_bfilter16x16_only
|
||||
|
||||
filt_blk2d_spo16x16_loop_neon
|
||||
vld1.u8 {d24, d25}, [r0], r1
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vld1.u8 {d26, d27}, [r0], r1
|
||||
vmull.u8 q2, d23, d0
|
||||
vld1.u8 {d28, d29}, [r0], r1
|
||||
@ -319,7 +319,7 @@ filt_blk2d_spo16x16_loop_neon
|
||||
vmull.u8 q7, d28, d0
|
||||
vmull.u8 q8, d29, d0
|
||||
|
||||
vmlal.u8 q1, d24, d1 ;(src_ptr[pixel_step] * vp8_filter[1])
|
||||
vmlal.u8 q1, d24, d1 ;(src_ptr[pixel_step] * vp9_filter[1])
|
||||
vmlal.u8 q2, d25, d1
|
||||
vmlal.u8 q3, d26, d1
|
||||
vmlal.u8 q4, d27, d1
|
||||
|
@ -54,11 +54,11 @@
|
||||
vzip.32 d8, d9 ;put 2-line data in 1 register (src_ptr[1])
|
||||
vzip.32 d10, d11
|
||||
|
||||
vmull.u8 q7, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q7, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q8, d4, d0
|
||||
vmull.u8 q9, d6, d0
|
||||
|
||||
vmlal.u8 q7, d8, d1 ;(src_ptr[1] * vp8_filter[1])
|
||||
vmlal.u8 q7, d8, d1 ;(src_ptr[1] * vp9_filter[1])
|
||||
vmlal.u8 q8, d10, d1
|
||||
vmlal.u8 q9, d12, d1
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
vdup.8 d1, d31[4]
|
||||
vld1.u8 {q4}, [r0], r1
|
||||
|
||||
vmull.u8 q6, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q6, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vld1.u8 {q5}, [r0], r1
|
||||
vmull.u8 q7, d4, d0
|
||||
vmull.u8 q8, d6, d0
|
||||
@ -56,7 +56,7 @@
|
||||
vext.8 d9, d8, d9, #1
|
||||
vext.8 d11, d10, d11, #1
|
||||
|
||||
vmlal.u8 q6, d3, d1 ;(src_ptr[1] * vp8_filter[1])
|
||||
vmlal.u8 q6, d3, d1 ;(src_ptr[1] * vp9_filter[1])
|
||||
vmlal.u8 q7, d5, d1
|
||||
vmlal.u8 q8, d7, d1
|
||||
vmlal.u8 q9, d9, d1
|
||||
@ -82,12 +82,12 @@ secondpass_filter
|
||||
vdup.8 d0, d31[0] ;second_pass filter parameters (d0 d1)
|
||||
vdup.8 d1, d31[4]
|
||||
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q2, d23, d0
|
||||
vmull.u8 q3, d24, d0
|
||||
vmull.u8 q4, d25, d0
|
||||
|
||||
vmlal.u8 q1, d23, d1 ;(src_ptr[pixel_step] * vp8_filter[1])
|
||||
vmlal.u8 q1, d23, d1 ;(src_ptr[pixel_step] * vp9_filter[1])
|
||||
vmlal.u8 q2, d24, d1
|
||||
vmlal.u8 q3, d25, d1
|
||||
vmlal.u8 q4, d26, d1
|
||||
|
@ -43,7 +43,7 @@
|
||||
vdup.8 d1, d31[4]
|
||||
vld1.u8 {q4}, [r0], r1
|
||||
|
||||
vmull.u8 q6, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q6, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q7, d4, d0
|
||||
vmull.u8 q8, d6, d0
|
||||
vmull.u8 q9, d8, d0
|
||||
@ -53,7 +53,7 @@
|
||||
vext.8 d7, d6, d7, #1
|
||||
vext.8 d9, d8, d9, #1
|
||||
|
||||
vmlal.u8 q6, d3, d1 ;(src_ptr[1] * vp8_filter[1])
|
||||
vmlal.u8 q6, d3, d1 ;(src_ptr[1] * vp9_filter[1])
|
||||
vmlal.u8 q7, d5, d1
|
||||
vmlal.u8 q8, d7, d1
|
||||
vmlal.u8 q9, d9, d1
|
||||
@ -70,7 +70,7 @@
|
||||
;first_pass filtering on the rest 5-line data
|
||||
vld1.u8 {q5}, [r0], r1
|
||||
|
||||
vmull.u8 q6, d2, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q6, d2, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q7, d4, d0
|
||||
vmull.u8 q8, d6, d0
|
||||
vmull.u8 q9, d8, d0
|
||||
@ -82,7 +82,7 @@
|
||||
vext.8 d9, d8, d9, #1
|
||||
vext.8 d11, d10, d11, #1
|
||||
|
||||
vmlal.u8 q6, d3, d1 ;(src_ptr[1] * vp8_filter[1])
|
||||
vmlal.u8 q6, d3, d1 ;(src_ptr[1] * vp9_filter[1])
|
||||
vmlal.u8 q7, d5, d1
|
||||
vmlal.u8 q8, d7, d1
|
||||
vmlal.u8 q9, d9, d1
|
||||
@ -108,7 +108,7 @@ secondpass_filter
|
||||
vdup.8 d0, d31[0] ;second_pass filter parameters (d0 d1)
|
||||
vdup.8 d1, d31[4]
|
||||
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp8_filter[0])
|
||||
vmull.u8 q1, d22, d0 ;(src_ptr[0] * vp9_filter[0])
|
||||
vmull.u8 q2, d23, d0
|
||||
vmull.u8 q3, d24, d0
|
||||
vmull.u8 q4, d25, d0
|
||||
@ -117,7 +117,7 @@ secondpass_filter
|
||||
vmull.u8 q7, d28, d0
|
||||
vmull.u8 q8, d29, d0
|
||||
|
||||
vmlal.u8 q1, d23, d1 ;(src_ptr[pixel_step] * vp8_filter[1])
|
||||
vmlal.u8 q1, d23, d1 ;(src_ptr[pixel_step] * vp9_filter[1])
|
||||
vmlal.u8 q2, d24, d1
|
||||
vmlal.u8 q3, d25, d1
|
||||
vmlal.u8 q4, d26, d1
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_copy_mem16x16_neon|
|
||||
EXPORT |vp9_copy_mem16x16_neon|
|
||||
; ARM
|
||||
; REQUIRE8
|
||||
; PRESERVE8
|
||||
@ -17,7 +17,7 @@
|
||||
AREA Block, CODE, READONLY ; name this block of code
|
||||
;void copy_mem16x16_neon( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|vp8_copy_mem16x16_neon| PROC
|
||||
|vp9_copy_mem16x16_neon| PROC
|
||||
|
||||
vld1.u8 {q0}, [r0], r1
|
||||
vld1.u8 {q1}, [r0], r1
|
||||
@ -54,6 +54,6 @@
|
||||
|
||||
mov pc, lr
|
||||
|
||||
ENDP ; |vp8_copy_mem16x16_neon|
|
||||
ENDP ; |vp9_copy_mem16x16_neon|
|
||||
|
||||
END
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_copy_mem8x4_neon|
|
||||
EXPORT |vp9_copy_mem8x4_neon|
|
||||
; ARM
|
||||
; REQUIRE8
|
||||
; PRESERVE8
|
||||
@ -17,7 +17,7 @@
|
||||
AREA Block, CODE, READONLY ; name this block of code
|
||||
;void copy_mem8x4_neon( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|vp8_copy_mem8x4_neon| PROC
|
||||
|vp9_copy_mem8x4_neon| PROC
|
||||
vld1.u8 {d0}, [r0], r1
|
||||
vld1.u8 {d1}, [r0], r1
|
||||
vst1.u8 {d0}, [r2], r3
|
||||
@ -29,6 +29,6 @@
|
||||
|
||||
mov pc, lr
|
||||
|
||||
ENDP ; |vp8_copy_mem8x4_neon|
|
||||
ENDP ; |vp9_copy_mem8x4_neon|
|
||||
|
||||
END
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_copy_mem8x8_neon|
|
||||
EXPORT |vp9_copy_mem8x8_neon|
|
||||
; ARM
|
||||
; REQUIRE8
|
||||
; PRESERVE8
|
||||
@ -17,7 +17,7 @@
|
||||
AREA Block, CODE, READONLY ; name this block of code
|
||||
;void copy_mem8x8_neon( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|vp8_copy_mem8x8_neon| PROC
|
||||
|vp9_copy_mem8x8_neon| PROC
|
||||
|
||||
vld1.u8 {d0}, [r0], r1
|
||||
vld1.u8 {d1}, [r0], r1
|
||||
@ -38,6 +38,6 @@
|
||||
|
||||
mov pc, lr
|
||||
|
||||
ENDP ; |vp8_copy_mem8x8_neon|
|
||||
ENDP ; |vp9_copy_mem8x8_neon|
|
||||
|
||||
END
|
||||
|
@ -9,10 +9,10 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_loop_filter_horizontal_edge_y_neon|
|
||||
EXPORT |vp8_loop_filter_horizontal_edge_uv_neon|
|
||||
EXPORT |vp8_loop_filter_vertical_edge_y_neon|
|
||||
EXPORT |vp8_loop_filter_vertical_edge_uv_neon|
|
||||
EXPORT |vp9_loop_filter_horizontal_edge_y_neon|
|
||||
EXPORT |vp9_loop_filter_horizontal_edge_uv_neon|
|
||||
EXPORT |vp9_loop_filter_vertical_edge_y_neon|
|
||||
EXPORT |vp9_loop_filter_vertical_edge_uv_neon|
|
||||
ARM
|
||||
|
||||
AREA ||.text||, CODE, READONLY, ALIGN=2
|
||||
@ -22,7 +22,7 @@
|
||||
; r2 unsigned char blimit
|
||||
; r3 unsigned char limit
|
||||
; sp unsigned char thresh,
|
||||
|vp8_loop_filter_horizontal_edge_y_neon| PROC
|
||||
|vp9_loop_filter_horizontal_edge_y_neon| PROC
|
||||
push {lr}
|
||||
vdup.u8 q0, r2 ; duplicate blimit
|
||||
vdup.u8 q1, r3 ; duplicate limit
|
||||
@ -45,7 +45,7 @@
|
||||
sub r2, r2, r1, lsl #1
|
||||
sub r12, r12, r1, lsl #1
|
||||
|
||||
bl vp8_loop_filter_neon
|
||||
bl vp9_loop_filter_neon
|
||||
|
||||
vst1.u8 {q5}, [r2@128], r1 ; store op1
|
||||
vst1.u8 {q6}, [r12@128], r1 ; store op0
|
||||
@ -53,7 +53,7 @@
|
||||
vst1.u8 {q8}, [r12@128], r1 ; store oq1
|
||||
|
||||
pop {pc}
|
||||
ENDP ; |vp8_loop_filter_horizontal_edge_y_neon|
|
||||
ENDP ; |vp9_loop_filter_horizontal_edge_y_neon|
|
||||
|
||||
|
||||
; r0 unsigned char *u,
|
||||
@ -62,7 +62,7 @@
|
||||
; r3 unsigned char limit
|
||||
; sp unsigned char thresh,
|
||||
; sp+4 unsigned char *v
|
||||
|vp8_loop_filter_horizontal_edge_uv_neon| PROC
|
||||
|vp9_loop_filter_horizontal_edge_uv_neon| PROC
|
||||
push {lr}
|
||||
vdup.u8 q0, r2 ; duplicate blimit
|
||||
vdup.u8 q1, r3 ; duplicate limit
|
||||
@ -90,7 +90,7 @@
|
||||
vld1.u8 {d20}, [r3@64] ; q3
|
||||
vld1.u8 {d21}, [r12@64] ; q3
|
||||
|
||||
bl vp8_loop_filter_neon
|
||||
bl vp9_loop_filter_neon
|
||||
|
||||
sub r0, r0, r1, lsl #1
|
||||
sub r2, r2, r1, lsl #1
|
||||
@ -105,9 +105,9 @@
|
||||
vst1.u8 {d17}, [r2@64] ; store v oq1
|
||||
|
||||
pop {pc}
|
||||
ENDP ; |vp8_loop_filter_horizontal_edge_uv_neon|
|
||||
ENDP ; |vp9_loop_filter_horizontal_edge_uv_neon|
|
||||
|
||||
; void vp8_loop_filter_vertical_edge_y_neon(unsigned char *src, int pitch,
|
||||
; void vp9_loop_filter_vertical_edge_y_neon(unsigned char *src, int pitch,
|
||||
; const signed char *flimit,
|
||||
; const signed char *limit,
|
||||
; const signed char *thresh,
|
||||
@ -118,7 +118,7 @@
|
||||
; r3 unsigned char limit
|
||||
; sp unsigned char thresh,
|
||||
|
||||
|vp8_loop_filter_vertical_edge_y_neon| PROC
|
||||
|vp9_loop_filter_vertical_edge_y_neon| PROC
|
||||
push {lr}
|
||||
vdup.u8 q0, r2 ; duplicate blimit
|
||||
vdup.u8 q1, r3 ; duplicate limit
|
||||
@ -163,7 +163,7 @@
|
||||
vtrn.8 q7, q8
|
||||
vtrn.8 q9, q10
|
||||
|
||||
bl vp8_loop_filter_neon
|
||||
bl vp9_loop_filter_neon
|
||||
|
||||
vswp d12, d11
|
||||
vswp d16, d13
|
||||
@ -195,9 +195,9 @@
|
||||
vst4.8 {d14[7], d15[7], d16[7], d17[7]}, [r12]
|
||||
|
||||
pop {pc}
|
||||
ENDP ; |vp8_loop_filter_vertical_edge_y_neon|
|
||||
ENDP ; |vp9_loop_filter_vertical_edge_y_neon|
|
||||
|
||||
; void vp8_loop_filter_vertical_edge_uv_neon(unsigned char *u, int pitch
|
||||
; void vp9_loop_filter_vertical_edge_uv_neon(unsigned char *u, int pitch
|
||||
; const signed char *flimit,
|
||||
; const signed char *limit,
|
||||
; const signed char *thresh,
|
||||
@ -208,7 +208,7 @@
|
||||
; r3 unsigned char limit
|
||||
; sp unsigned char thresh,
|
||||
; sp+4 unsigned char *v
|
||||
|vp8_loop_filter_vertical_edge_uv_neon| PROC
|
||||
|vp9_loop_filter_vertical_edge_uv_neon| PROC
|
||||
push {lr}
|
||||
vdup.u8 q0, r2 ; duplicate blimit
|
||||
sub r12, r0, #4 ; move u pointer down by 4 columns
|
||||
@ -253,7 +253,7 @@
|
||||
vtrn.8 q7, q8
|
||||
vtrn.8 q9, q10
|
||||
|
||||
bl vp8_loop_filter_neon
|
||||
bl vp9_loop_filter_neon
|
||||
|
||||
vswp d12, d11
|
||||
vswp d16, d13
|
||||
@ -282,9 +282,9 @@
|
||||
vst4.8 {d14[7], d15[7], d16[7], d17[7]}, [r2]
|
||||
|
||||
pop {pc}
|
||||
ENDP ; |vp8_loop_filter_vertical_edge_uv_neon|
|
||||
ENDP ; |vp9_loop_filter_vertical_edge_uv_neon|
|
||||
|
||||
; void vp8_loop_filter_neon();
|
||||
; void vp9_loop_filter_neon();
|
||||
; This is a helper function for the loopfilters. The invidual functions do the
|
||||
; necessary load, transpose (if necessary) and store.
|
||||
|
||||
@ -300,9 +300,9 @@
|
||||
; q8 q1
|
||||
; q9 q2
|
||||
; q10 q3
|
||||
|vp8_loop_filter_neon| PROC
|
||||
|vp9_loop_filter_neon| PROC
|
||||
|
||||
; vp8_filter_mask
|
||||
; vp9_filter_mask
|
||||
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
|
||||
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
|
||||
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
|
||||
@ -329,7 +329,7 @@
|
||||
|
||||
vcge.u8 q15, q1, q15
|
||||
|
||||
; vp8_filter() function
|
||||
; vp9_filter() function
|
||||
; convert to signed
|
||||
veor q7, q7, q10 ; qs0
|
||||
vshr.u8 q2, q2, #1 ; a = a / 2
|
||||
@ -349,27 +349,27 @@
|
||||
|
||||
vmovl.u8 q4, d20
|
||||
|
||||
vqsub.s8 q1, q5, q8 ; vp8_filter = clamp(ps1-qs1)
|
||||
vqsub.s8 q1, q5, q8 ; vp9_filter = clamp(ps1-qs1)
|
||||
vorr q14, q13, q14 ; vp8_hevmask
|
||||
|
||||
vmul.i16 q2, q2, q4 ; 3 * ( qs0 - ps0)
|
||||
vmul.i16 q11, q11, q4
|
||||
|
||||
vand q1, q1, q14 ; vp8_filter &= hev
|
||||
vand q15, q15, q9 ; vp8_filter_mask
|
||||
vand q1, q1, q14 ; vp9_filter &= hev
|
||||
vand q15, q15, q9 ; vp9_filter_mask
|
||||
|
||||
vaddw.s8 q2, q2, d2
|
||||
vaddw.s8 q11, q11, d3
|
||||
|
||||
vmov.u8 q9, #4 ; #4
|
||||
|
||||
; vp8_filter = clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
; vp9_filter = clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
vqmovn.s16 d2, q2
|
||||
vqmovn.s16 d3, q11
|
||||
vand q1, q1, q15 ; vp8_filter &= mask
|
||||
vand q1, q1, q15 ; vp9_filter &= mask
|
||||
|
||||
vqadd.s8 q2, q1, q10 ; Filter2 = clamp(vp8_filter+3)
|
||||
vqadd.s8 q1, q1, q9 ; Filter1 = clamp(vp8_filter+4)
|
||||
vqadd.s8 q2, q1, q10 ; Filter2 = clamp(vp9_filter+3)
|
||||
vqadd.s8 q1, q1, q9 ; Filter1 = clamp(vp9_filter+4)
|
||||
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
|
||||
vshr.s8 q1, q1, #3 ; Filter1 >>= 3
|
||||
|
||||
@ -377,12 +377,12 @@
|
||||
vqadd.s8 q11, q6, q2 ; u = clamp(ps0 + Filter2)
|
||||
vqsub.s8 q10, q7, q1 ; u = clamp(qs0 - Filter1)
|
||||
|
||||
; outer tap adjustments: ++vp8_filter >> 1
|
||||
; outer tap adjustments: ++vp9_filter >> 1
|
||||
vrshr.s8 q1, q1, #1
|
||||
vbic q1, q1, q14 ; vp8_filter &= ~hev
|
||||
vbic q1, q1, q14 ; vp9_filter &= ~hev
|
||||
vmov.u8 q0, #0x80 ; 0x80
|
||||
vqadd.s8 q13, q5, q1 ; u = clamp(ps1 + vp8_filter)
|
||||
vqsub.s8 q12, q8, q1 ; u = clamp(qs1 - vp8_filter)
|
||||
vqadd.s8 q13, q5, q1 ; u = clamp(ps1 + vp9_filter)
|
||||
vqsub.s8 q12, q8, q1 ; u = clamp(qs1 - vp9_filter)
|
||||
|
||||
veor q6, q11, q0 ; *op0 = u^0x80
|
||||
veor q7, q10, q0 ; *oq0 = u^0x80
|
||||
@ -390,7 +390,7 @@
|
||||
veor q8, q12, q0 ; *oq1 = u^0x80
|
||||
|
||||
bx lr
|
||||
ENDP ; |vp8_loop_filter_horizontal_edge_y_neon|
|
||||
ENDP ; |vp9_loop_filter_horizontal_edge_y_neon|
|
||||
|
||||
;-----------------
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
;
|
||||
|
||||
|
||||
;EXPORT |vp8_loop_filter_simple_horizontal_edge_neon|
|
||||
EXPORT |vp8_loop_filter_bhs_neon|
|
||||
EXPORT |vp8_loop_filter_mbhs_neon|
|
||||
;EXPORT |vp9_loop_filter_simple_horizontal_edge_neon|
|
||||
EXPORT |vp9_loop_filter_bhs_neon|
|
||||
EXPORT |vp9_loop_filter_mbhs_neon|
|
||||
ARM
|
||||
PRESERVE8
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
; r1 int p, PRESERVE
|
||||
; q1 limit, PRESERVE
|
||||
|
||||
|vp8_loop_filter_simple_horizontal_edge_neon| PROC
|
||||
|vp9_loop_filter_simple_horizontal_edge_neon| PROC
|
||||
|
||||
sub r3, r0, r1, lsl #1 ; move src pointer down by 2 lines
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
|
||||
vsubl.s8 q3, d15, d13
|
||||
|
||||
vqsub.s8 q4, q5, q8 ; q4: vp8_filter = vp8_signed_char_clamp(ps1-qs1)
|
||||
vqsub.s8 q4, q5, q8 ; q4: vp9_filter = vp9_signed_char_clamp(ps1-qs1)
|
||||
|
||||
vmul.s16 q2, q2, q13 ; 3 * ( qs0 - ps0)
|
||||
vmul.s16 q3, q3, q13
|
||||
@ -57,24 +57,24 @@
|
||||
vmov.u8 q10, #0x03 ; 0x03
|
||||
vmov.u8 q9, #0x04 ; 0x04
|
||||
|
||||
vaddw.s8 q2, q2, d8 ; vp8_filter + 3 * ( qs0 - ps0)
|
||||
vaddw.s8 q2, q2, d8 ; vp9_filter + 3 * ( qs0 - ps0)
|
||||
vaddw.s8 q3, q3, d9
|
||||
|
||||
vqmovn.s16 d8, q2 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
vqmovn.s16 d8, q2 ; vp9_filter = vp9_signed_char_clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
vqmovn.s16 d9, q3
|
||||
|
||||
vand q14, q4, q15 ; vp8_filter &= mask
|
||||
vand q14, q4, q15 ; vp9_filter &= mask
|
||||
|
||||
vqadd.s8 q2, q14, q10 ; Filter2 = vp8_signed_char_clamp(vp8_filter+3)
|
||||
vqadd.s8 q3, q14, q9 ; Filter1 = vp8_signed_char_clamp(vp8_filter+4)
|
||||
vqadd.s8 q2, q14, q10 ; Filter2 = vp9_signed_char_clamp(vp9_filter+3)
|
||||
vqadd.s8 q3, q14, q9 ; Filter1 = vp9_signed_char_clamp(vp9_filter+4)
|
||||
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
|
||||
vshr.s8 q4, q3, #3 ; Filter1 >>= 3
|
||||
|
||||
sub r0, r0, r1
|
||||
|
||||
;calculate output
|
||||
vqadd.s8 q11, q6, q2 ; u = vp8_signed_char_clamp(ps0 + Filter2)
|
||||
vqsub.s8 q10, q7, q4 ; u = vp8_signed_char_clamp(qs0 - Filter1)
|
||||
vqadd.s8 q11, q6, q2 ; u = vp9_signed_char_clamp(ps0 + Filter2)
|
||||
vqsub.s8 q10, q7, q4 ; u = vp9_signed_char_clamp(qs0 - Filter1)
|
||||
|
||||
veor q6, q11, q0 ; *op0 = u^0x80
|
||||
veor q7, q10, q0 ; *oq0 = u^0x80
|
||||
@ -83,35 +83,35 @@
|
||||
vst1.u8 {q7}, [r0@128] ; store oq0
|
||||
|
||||
bx lr
|
||||
ENDP ; |vp8_loop_filter_simple_horizontal_edge_neon|
|
||||
ENDP ; |vp9_loop_filter_simple_horizontal_edge_neon|
|
||||
|
||||
; r0 unsigned char *y
|
||||
; r1 int ystride
|
||||
; r2 const unsigned char *blimit
|
||||
|
||||
|vp8_loop_filter_bhs_neon| PROC
|
||||
|vp9_loop_filter_bhs_neon| PROC
|
||||
push {r4, lr}
|
||||
ldrb r3, [r2] ; load blim from mem
|
||||
vdup.s8 q1, r3 ; duplicate blim
|
||||
|
||||
add r0, r0, r1, lsl #2 ; src = y_ptr + 4 * y_stride
|
||||
bl vp8_loop_filter_simple_horizontal_edge_neon
|
||||
; vp8_loop_filter_simple_horizontal_edge_neon preserves r0, r1 and q1
|
||||
bl vp9_loop_filter_simple_horizontal_edge_neon
|
||||
; vp9_loop_filter_simple_horizontal_edge_neon preserves r0, r1 and q1
|
||||
add r0, r0, r1, lsl #2 ; src = y_ptr + 8* y_stride
|
||||
bl vp8_loop_filter_simple_horizontal_edge_neon
|
||||
bl vp9_loop_filter_simple_horizontal_edge_neon
|
||||
add r0, r0, r1, lsl #2 ; src = y_ptr + 12 * y_stride
|
||||
pop {r4, lr}
|
||||
b vp8_loop_filter_simple_horizontal_edge_neon
|
||||
ENDP ;|vp8_loop_filter_bhs_neon|
|
||||
b vp9_loop_filter_simple_horizontal_edge_neon
|
||||
ENDP ;|vp9_loop_filter_bhs_neon|
|
||||
|
||||
; r0 unsigned char *y
|
||||
; r1 int ystride
|
||||
; r2 const unsigned char *blimit
|
||||
|
||||
|vp8_loop_filter_mbhs_neon| PROC
|
||||
|vp9_loop_filter_mbhs_neon| PROC
|
||||
ldrb r3, [r2] ; load blim from mem
|
||||
vdup.s8 q1, r3 ; duplicate mblim
|
||||
b vp8_loop_filter_simple_horizontal_edge_neon
|
||||
ENDP ;|vp8_loop_filter_bhs_neon|
|
||||
b vp9_loop_filter_simple_horizontal_edge_neon
|
||||
ENDP ;|vp9_loop_filter_bhs_neon|
|
||||
|
||||
END
|
||||
|
@ -9,9 +9,9 @@
|
||||
;
|
||||
|
||||
|
||||
;EXPORT |vp8_loop_filter_simple_vertical_edge_neon|
|
||||
EXPORT |vp8_loop_filter_bvs_neon|
|
||||
EXPORT |vp8_loop_filter_mbvs_neon|
|
||||
;EXPORT |vp9_loop_filter_simple_vertical_edge_neon|
|
||||
EXPORT |vp9_loop_filter_bvs_neon|
|
||||
EXPORT |vp9_loop_filter_mbvs_neon|
|
||||
ARM
|
||||
PRESERVE8
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
; r1 int p, PRESERVE
|
||||
; q1 limit, PRESERVE
|
||||
|
||||
|vp8_loop_filter_simple_vertical_edge_neon| PROC
|
||||
|vp9_loop_filter_simple_vertical_edge_neon| PROC
|
||||
sub r0, r0, #2 ; move src pointer down by 2 columns
|
||||
add r12, r1, r1
|
||||
add r3, r0, r1
|
||||
@ -47,7 +47,7 @@
|
||||
vswp d7, d10
|
||||
vswp d12, d9
|
||||
|
||||
;vp8_filter_mask() function
|
||||
;vp9_filter_mask() function
|
||||
;vp8_hevmask() function
|
||||
sub r0, r0, r1, lsl #4
|
||||
vabd.u8 q15, q5, q4 ; abs(p0 - q0)
|
||||
@ -69,7 +69,7 @@
|
||||
vsubl.s8 q2, d8, d10 ; ( qs0 - ps0)
|
||||
vsubl.s8 q13, d9, d11
|
||||
|
||||
vqsub.s8 q14, q3, q6 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
|
||||
vqsub.s8 q14, q3, q6 ; vp9_filter = vp9_signed_char_clamp(ps1-qs1)
|
||||
|
||||
vmul.s16 q2, q2, q11 ; 3 * ( qs0 - ps0)
|
||||
vmul.s16 q13, q13, q11
|
||||
@ -77,25 +77,25 @@
|
||||
vmov.u8 q11, #0x03 ; 0x03
|
||||
vmov.u8 q12, #0x04 ; 0x04
|
||||
|
||||
vaddw.s8 q2, q2, d28 ; vp8_filter + 3 * ( qs0 - ps0)
|
||||
vaddw.s8 q2, q2, d28 ; vp9_filter + 3 * ( qs0 - ps0)
|
||||
vaddw.s8 q13, q13, d29
|
||||
|
||||
vqmovn.s16 d28, q2 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
vqmovn.s16 d28, q2 ; vp9_filter = vp9_signed_char_clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
vqmovn.s16 d29, q13
|
||||
|
||||
add r0, r0, #1
|
||||
add r3, r0, r1
|
||||
|
||||
vand q14, q14, q15 ; vp8_filter &= mask
|
||||
vand q14, q14, q15 ; vp9_filter &= mask
|
||||
|
||||
vqadd.s8 q2, q14, q11 ; Filter2 = vp8_signed_char_clamp(vp8_filter+3)
|
||||
vqadd.s8 q3, q14, q12 ; Filter1 = vp8_signed_char_clamp(vp8_filter+4)
|
||||
vqadd.s8 q2, q14, q11 ; Filter2 = vp9_signed_char_clamp(vp9_filter+3)
|
||||
vqadd.s8 q3, q14, q12 ; Filter1 = vp9_signed_char_clamp(vp9_filter+4)
|
||||
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
|
||||
vshr.s8 q14, q3, #3 ; Filter1 >>= 3
|
||||
|
||||
;calculate output
|
||||
vqadd.s8 q11, q5, q2 ; u = vp8_signed_char_clamp(ps0 + Filter2)
|
||||
vqsub.s8 q10, q4, q14 ; u = vp8_signed_char_clamp(qs0 - Filter1)
|
||||
vqadd.s8 q11, q5, q2 ; u = vp9_signed_char_clamp(ps0 + Filter2)
|
||||
vqsub.s8 q10, q4, q14 ; u = vp9_signed_char_clamp(qs0 - Filter1)
|
||||
|
||||
veor q6, q11, q0 ; *op0 = u^0x80
|
||||
veor q7, q10, q0 ; *oq0 = u^0x80
|
||||
@ -121,34 +121,34 @@
|
||||
vst2.8 {d14[7], d15[7]}, [r3]
|
||||
|
||||
bx lr
|
||||
ENDP ; |vp8_loop_filter_simple_vertical_edge_neon|
|
||||
ENDP ; |vp9_loop_filter_simple_vertical_edge_neon|
|
||||
|
||||
; r0 unsigned char *y
|
||||
; r1 int ystride
|
||||
; r2 const unsigned char *blimit
|
||||
|
||||
|vp8_loop_filter_bvs_neon| PROC
|
||||
|vp9_loop_filter_bvs_neon| PROC
|
||||
push {r4, lr}
|
||||
ldrb r3, [r2] ; load blim from mem
|
||||
mov r4, r0
|
||||
add r0, r0, #4
|
||||
vdup.s8 q1, r3 ; duplicate blim
|
||||
bl vp8_loop_filter_simple_vertical_edge_neon
|
||||
; vp8_loop_filter_simple_vertical_edge_neon preserves r1 and q1
|
||||
bl vp9_loop_filter_simple_vertical_edge_neon
|
||||
; vp9_loop_filter_simple_vertical_edge_neon preserves r1 and q1
|
||||
add r0, r4, #8
|
||||
bl vp8_loop_filter_simple_vertical_edge_neon
|
||||
bl vp9_loop_filter_simple_vertical_edge_neon
|
||||
add r0, r4, #12
|
||||
pop {r4, lr}
|
||||
b vp8_loop_filter_simple_vertical_edge_neon
|
||||
ENDP ;|vp8_loop_filter_bvs_neon|
|
||||
b vp9_loop_filter_simple_vertical_edge_neon
|
||||
ENDP ;|vp9_loop_filter_bvs_neon|
|
||||
|
||||
; r0 unsigned char *y
|
||||
; r1 int ystride
|
||||
; r2 const unsigned char *blimit
|
||||
|
||||
|vp8_loop_filter_mbvs_neon| PROC
|
||||
|vp9_loop_filter_mbvs_neon| PROC
|
||||
ldrb r3, [r2] ; load mblim from mem
|
||||
vdup.s8 q1, r3 ; duplicate mblim
|
||||
b vp8_loop_filter_simple_vertical_edge_neon
|
||||
ENDP ;|vp8_loop_filter_bvs_neon|
|
||||
b vp9_loop_filter_simple_vertical_edge_neon
|
||||
ENDP ;|vp9_loop_filter_bvs_neon|
|
||||
END
|
||||
|
@ -327,7 +327,7 @@
|
||||
|
||||
|vp8_mbloop_filter_neon| PROC
|
||||
|
||||
; vp8_filter_mask
|
||||
; vp9_filter_mask
|
||||
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
|
||||
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
|
||||
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
|
||||
@ -358,7 +358,7 @@
|
||||
vqadd.u8 q12, q12, q12 ; b = abs(p0 - q0) * 2
|
||||
vmov.u16 q11, #3 ; #3
|
||||
|
||||
; vp8_filter
|
||||
; vp9_filter
|
||||
; convert to signed
|
||||
veor q7, q7, q0 ; qs0
|
||||
vshr.u8 q1, q1, #1 ; a = a / 2
|
||||
@ -378,26 +378,26 @@
|
||||
vsubl.s8 q2, d14, d12 ; qs0 - ps0
|
||||
vsubl.s8 q13, d15, d13
|
||||
|
||||
vqsub.s8 q1, q5, q8 ; vp8_filter = clamp(ps1-qs1)
|
||||
vqsub.s8 q1, q5, q8 ; vp9_filter = clamp(ps1-qs1)
|
||||
|
||||
vmul.i16 q2, q2, q11 ; 3 * ( qs0 - ps0)
|
||||
|
||||
vand q15, q15, q12 ; vp8_filter_mask
|
||||
vand q15, q15, q12 ; vp9_filter_mask
|
||||
|
||||
vmul.i16 q13, q13, q11
|
||||
|
||||
vmov.u8 q12, #3 ; #3
|
||||
|
||||
vaddw.s8 q2, q2, d2 ; vp8_filter + 3 * ( qs0 - ps0)
|
||||
vaddw.s8 q2, q2, d2 ; vp9_filter + 3 * ( qs0 - ps0)
|
||||
vaddw.s8 q13, q13, d3
|
||||
|
||||
vmov.u8 q11, #4 ; #4
|
||||
|
||||
; vp8_filter = clamp(vp8_filter + 3 * ( qs0 - ps0))
|
||||
; vp9_filter = clamp(vp9_filter + 3 * ( qs0 - ps0))
|
||||
vqmovn.s16 d2, q2
|
||||
vqmovn.s16 d3, q13
|
||||
|
||||
vand q1, q1, q15 ; vp8_filter &= mask
|
||||
vand q1, q1, q15 ; vp9_filter &= mask
|
||||
|
||||
vmov.u16 q15, #63 ; #63
|
||||
|
||||
@ -418,7 +418,7 @@
|
||||
|
||||
vqadd.s8 q6, q6, q13 ; ps0 = clamp(ps0 + Filter2)
|
||||
|
||||
vbic q1, q1, q14 ; vp8_filter &= ~hev
|
||||
vbic q1, q1, q14 ; vp9_filter &= ~hev
|
||||
|
||||
; roughly 1/7th difference across boundary
|
||||
; roughly 2/7th difference across boundary
|
||||
|
@ -9,8 +9,8 @@
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_push_neon|
|
||||
EXPORT |vp8_pop_neon|
|
||||
EXPORT |vp9_push_neon|
|
||||
EXPORT |vp9_pop_neon|
|
||||
|
||||
ARM
|
||||
REQUIRE8
|
||||
@ -18,14 +18,14 @@
|
||||
|
||||
AREA ||.text||, CODE, READONLY, ALIGN=2
|
||||
|
||||
|vp8_push_neon| PROC
|
||||
|vp9_push_neon| PROC
|
||||
vst1.i64 {d8, d9, d10, d11}, [r0]!
|
||||
vst1.i64 {d12, d13, d14, d15}, [r0]!
|
||||
bx lr
|
||||
|
||||
ENDP
|
||||
|
||||
|vp8_pop_neon| PROC
|
||||
|vp9_pop_neon| PROC
|
||||
vld1.i64 {d8, d9, d10, d11}, [r0]!
|
||||
vld1.i64 {d12, d13, d14, d15}, [r0]!
|
||||
bx lr
|
||||
|
@ -86,7 +86,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q8, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q8, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q9, d7, d0
|
||||
vmull.u8 q10, d9, d0
|
||||
vmull.u8 q11, d10, d0
|
||||
@ -97,7 +97,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d9, d10, #1
|
||||
vext.8 d30, d12, d13, #1
|
||||
|
||||
vmlsl.u8 q8, d28, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q8, d28, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q10, d29, d1
|
||||
vmlsl.u8 q12, d30, d1
|
||||
|
||||
@ -105,7 +105,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d10, d11, #1
|
||||
vext.8 d30, d13, d14, #1
|
||||
|
||||
vmlsl.u8 q9, d28, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q9, d28, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q11, d29, d1
|
||||
vmlsl.u8 q13, d30, d1
|
||||
|
||||
@ -113,7 +113,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d9, d10, #4
|
||||
vext.8 d30, d12, d13, #4
|
||||
|
||||
vmlsl.u8 q8, d28, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q8, d28, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q10, d29, d4
|
||||
vmlsl.u8 q12, d30, d4
|
||||
|
||||
@ -121,7 +121,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d10, d11, #4
|
||||
vext.8 d30, d13, d14, #4
|
||||
|
||||
vmlsl.u8 q9, d28, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q9, d28, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q11, d29, d4
|
||||
vmlsl.u8 q13, d30, d4
|
||||
|
||||
@ -129,7 +129,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d9, d10, #5
|
||||
vext.8 d30, d12, d13, #5
|
||||
|
||||
vmlal.u8 q8, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q8, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q10, d29, d5
|
||||
vmlal.u8 q12, d30, d5
|
||||
|
||||
@ -137,7 +137,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d10, d11, #5
|
||||
vext.8 d30, d13, d14, #5
|
||||
|
||||
vmlal.u8 q9, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q9, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q11, d29, d5
|
||||
vmlal.u8 q13, d30, d5
|
||||
|
||||
@ -145,7 +145,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d9, d10, #2
|
||||
vext.8 d30, d12, d13, #2
|
||||
|
||||
vmlal.u8 q8, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q8, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q10, d29, d2
|
||||
vmlal.u8 q12, d30, d2
|
||||
|
||||
@ -153,7 +153,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d29, d10, d11, #2
|
||||
vext.8 d30, d13, d14, #2
|
||||
|
||||
vmlal.u8 q9, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q9, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q11, d29, d2
|
||||
vmlal.u8 q13, d30, d2
|
||||
|
||||
@ -165,7 +165,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vext.8 d31, d10, d11, #3
|
||||
vext.8 d6, d13, d14, #3
|
||||
|
||||
vmull.u8 q4, d28, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q4, d28, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q5, d29, d3
|
||||
vmull.u8 q6, d30, d3
|
||||
|
||||
@ -173,7 +173,7 @@ filt_blk2d_fp16x16_loop_neon
|
||||
vqadd.s16 q10, q5
|
||||
vqadd.s16 q12, q6
|
||||
|
||||
vmull.u8 q6, d15, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q6, d15, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q7, d31, d3
|
||||
vmull.u8 q3, d6, d3
|
||||
|
||||
@ -229,32 +229,32 @@ secondpass_inner_loop_neon
|
||||
vld1.u8 {d25}, [lr], r2
|
||||
vld1.u8 {d26}, [lr], r2
|
||||
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d19, d0
|
||||
vmull.u8 q5, d20, d0
|
||||
vmull.u8 q6, d21, d0
|
||||
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q4, d20, d1
|
||||
vmlsl.u8 q5, d21, d1
|
||||
vmlsl.u8 q6, d22, d1
|
||||
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d23, d4
|
||||
vmlsl.u8 q5, d24, d4
|
||||
vmlsl.u8 q6, d25, d4
|
||||
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d21, d2
|
||||
vmlal.u8 q5, d22, d2
|
||||
vmlal.u8 q6, d23, d2
|
||||
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q4, d24, d5
|
||||
vmlal.u8 q5, d25, d5
|
||||
vmlal.u8 q6, d26, d5
|
||||
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q8, d22, d3
|
||||
vmull.u8 q9, d23, d3
|
||||
vmull.u8 q10, d24, d3
|
||||
@ -316,7 +316,7 @@ filt_blk2d_fpo16x16_loop_neon
|
||||
pld [r0]
|
||||
pld [r0, r1]
|
||||
|
||||
vmull.u8 q6, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q6, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q7, d7, d0
|
||||
vmull.u8 q8, d9, d0
|
||||
vmull.u8 q9, d10, d0
|
||||
@ -332,15 +332,15 @@ filt_blk2d_fpo16x16_loop_neon
|
||||
vext.8 d28, d6, d7, #5 ;construct src_ptr[3]
|
||||
vext.8 d29, d9, d10, #5
|
||||
|
||||
vmlsl.u8 q6, d20, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q6, d20, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d21, d1
|
||||
vmlsl.u8 q7, d22, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d22, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q9, d23, d1
|
||||
vmlsl.u8 q6, d24, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q6, d24, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d25, d4
|
||||
vmlsl.u8 q7, d26, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d26, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q9, d27, d4
|
||||
vmlal.u8 q6, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q6, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q8, d29, d5
|
||||
|
||||
vext.8 d20, d7, d8, #5
|
||||
@ -355,16 +355,16 @@ filt_blk2d_fpo16x16_loop_neon
|
||||
vext.8 d28, d7, d8, #3
|
||||
vext.8 d29, d10, d11, #3
|
||||
|
||||
vmlal.u8 q7, d20, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q7, d20, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q9, d21, d5
|
||||
vmlal.u8 q6, d22, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q6, d22, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d23, d2
|
||||
vmlal.u8 q7, d24, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d24, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q9, d25, d2
|
||||
|
||||
vmull.u8 q10, d26, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q10, d26, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q11, d27, d3
|
||||
vmull.u8 q12, d28, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q12, d28, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q15, d29, d3
|
||||
|
||||
vqadd.s16 q6, q10 ;sum of all (src_data*filter_parameters)
|
||||
@ -419,32 +419,32 @@ secondpass_only_inner_loop_neon
|
||||
vld1.u8 {d25}, [r0], r1
|
||||
vld1.u8 {d26}, [r0], r1
|
||||
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d19, d0
|
||||
vmull.u8 q5, d20, d0
|
||||
vmull.u8 q6, d21, d0
|
||||
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q4, d20, d1
|
||||
vmlsl.u8 q5, d21, d1
|
||||
vmlsl.u8 q6, d22, d1
|
||||
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d23, d4
|
||||
vmlsl.u8 q5, d24, d4
|
||||
vmlsl.u8 q6, d25, d4
|
||||
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d21, d2
|
||||
vmlal.u8 q5, d22, d2
|
||||
vmlal.u8 q6, d23, d2
|
||||
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q4, d24, d5
|
||||
vmlal.u8 q5, d25, d5
|
||||
vmlal.u8 q6, d26, d5
|
||||
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q8, d22, d3
|
||||
vmull.u8 q9, d23, d3
|
||||
vmull.u8 q10, d24, d3
|
||||
|
@ -82,7 +82,7 @@ filter4_coeff
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[3])
|
||||
vzip.32 d20, d21
|
||||
vmull.u8 q7, d18, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmull.u8 q7, d18, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmull.u8 q8, d20, d5
|
||||
|
||||
vmov q4, q3 ;keep original src data in q4 q6
|
||||
@ -92,33 +92,33 @@ filter4_coeff
|
||||
vzip.32 d10, d11
|
||||
vshr.u64 q9, q4, #8 ;construct src_ptr[-1]
|
||||
vshr.u64 q10, q6, #8
|
||||
vmlal.u8 q7, d6, d0 ;+(src_ptr[-2] * vp8_filter[0])
|
||||
vmlal.u8 q7, d6, d0 ;+(src_ptr[-2] * vp9_filter[0])
|
||||
vmlal.u8 q8, d10, d0
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[-1])
|
||||
vzip.32 d20, d21
|
||||
vshr.u64 q3, q4, #32 ;construct src_ptr[2]
|
||||
vshr.u64 q5, q6, #32
|
||||
vmlsl.u8 q7, d18, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d18, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d20, d1
|
||||
|
||||
vzip.32 d6, d7 ;put 2-line data in 1 register (src_ptr[2])
|
||||
vzip.32 d10, d11
|
||||
vshr.u64 q9, q4, #16 ;construct src_ptr[0]
|
||||
vshr.u64 q10, q6, #16
|
||||
vmlsl.u8 q7, d6, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d6, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d10, d4
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[0])
|
||||
vzip.32 d20, d21
|
||||
vshr.u64 q3, q4, #24 ;construct src_ptr[1]
|
||||
vshr.u64 q5, q6, #24
|
||||
vmlal.u8 q7, d18, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d18, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d20, d2
|
||||
|
||||
vzip.32 d6, d7 ;put 2-line data in 1 register (src_ptr[1])
|
||||
vzip.32 d10, d11
|
||||
vmull.u8 q9, d6, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q9, d6, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q10, d10, d3
|
||||
|
||||
vld1.u8 {q3}, [r0], r1 ;load rest 5-line src data
|
||||
@ -147,9 +147,9 @@ filter4_coeff
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[3])
|
||||
vzip.32 d20, d21
|
||||
vext.8 d31, d22, d23, #5 ;construct src_ptr[3]
|
||||
vmull.u8 q7, d18, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmull.u8 q7, d18, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmull.u8 q8, d20, d5
|
||||
vmull.u8 q12, d31, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmull.u8 q12, d31, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
|
||||
vmov q4, q3 ;keep original src data in q4 q6
|
||||
vmov q6, q5
|
||||
@ -159,9 +159,9 @@ filter4_coeff
|
||||
vshr.u64 q9, q4, #8 ;construct src_ptr[-1]
|
||||
vshr.u64 q10, q6, #8
|
||||
|
||||
vmlal.u8 q7, d6, d0 ;+(src_ptr[-2] * vp8_filter[0])
|
||||
vmlal.u8 q7, d6, d0 ;+(src_ptr[-2] * vp9_filter[0])
|
||||
vmlal.u8 q8, d10, d0
|
||||
vmlal.u8 q12, d22, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmlal.u8 q12, d22, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[-1])
|
||||
vzip.32 d20, d21
|
||||
@ -169,9 +169,9 @@ filter4_coeff
|
||||
vshr.u64 q5, q6, #32
|
||||
vext.8 d31, d22, d23, #1 ;construct src_ptr[-1]
|
||||
|
||||
vmlsl.u8 q7, d18, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d18, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d20, d1
|
||||
vmlsl.u8 q12, d31, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q12, d31, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
|
||||
vzip.32 d6, d7 ;put 2-line data in 1 register (src_ptr[2])
|
||||
vzip.32 d10, d11
|
||||
@ -179,9 +179,9 @@ filter4_coeff
|
||||
vshr.u64 q10, q6, #16
|
||||
vext.8 d31, d22, d23, #4 ;construct src_ptr[2]
|
||||
|
||||
vmlsl.u8 q7, d6, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d6, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d10, d4
|
||||
vmlsl.u8 q12, d31, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q12, d31, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[0])
|
||||
vzip.32 d20, d21
|
||||
@ -189,16 +189,16 @@ filter4_coeff
|
||||
vshr.u64 q5, q6, #24
|
||||
vext.8 d31, d22, d23, #2 ;construct src_ptr[0]
|
||||
|
||||
vmlal.u8 q7, d18, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d18, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d20, d2
|
||||
vmlal.u8 q12, d31, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q12, d31, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
|
||||
vzip.32 d6, d7 ;put 2-line data in 1 register (src_ptr[1])
|
||||
vzip.32 d10, d11
|
||||
vext.8 d31, d22, d23, #3 ;construct src_ptr[1]
|
||||
vmull.u8 q9, d6, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q9, d6, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q10, d10, d3
|
||||
vmull.u8 q11, d31, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q11, d31, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
|
||||
add r3, r12, r3, lsl #5
|
||||
|
||||
@ -228,22 +228,22 @@ filter4_coeff
|
||||
vdup.8 d4, d16[0]
|
||||
vdup.8 d5, d16[4]
|
||||
|
||||
vmull.u8 q3, d27, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d27, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d28, d0
|
||||
|
||||
vmull.u8 q5, d25, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmull.u8 q5, d25, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmull.u8 q6, d26, d5
|
||||
|
||||
vmlsl.u8 q3, d29, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d29, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d30, d4
|
||||
|
||||
vmlsl.u8 q5, d23, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q5, d23, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q6, d24, d1
|
||||
|
||||
vmlal.u8 q3, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d29, d2
|
||||
|
||||
vmlal.u8 q5, d24, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmlal.u8 q5, d24, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmlal.u8 q6, d25, d3
|
||||
|
||||
add r0, r4, lr
|
||||
@ -294,7 +294,7 @@ firstpass_filter4x4_only
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[3])
|
||||
vzip.32 d20, d21
|
||||
vmull.u8 q7, d18, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmull.u8 q7, d18, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmull.u8 q8, d20, d5
|
||||
|
||||
vmov q4, q3 ;keep original src data in q4 q6
|
||||
@ -304,33 +304,33 @@ firstpass_filter4x4_only
|
||||
vzip.32 d10, d11
|
||||
vshr.u64 q9, q4, #8 ;construct src_ptr[-1]
|
||||
vshr.u64 q10, q6, #8
|
||||
vmlal.u8 q7, d6, d0 ;+(src_ptr[-2] * vp8_filter[0])
|
||||
vmlal.u8 q7, d6, d0 ;+(src_ptr[-2] * vp9_filter[0])
|
||||
vmlal.u8 q8, d10, d0
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[-1])
|
||||
vzip.32 d20, d21
|
||||
vshr.u64 q3, q4, #32 ;construct src_ptr[2]
|
||||
vshr.u64 q5, q6, #32
|
||||
vmlsl.u8 q7, d18, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d18, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d20, d1
|
||||
|
||||
vzip.32 d6, d7 ;put 2-line data in 1 register (src_ptr[2])
|
||||
vzip.32 d10, d11
|
||||
vshr.u64 q9, q4, #16 ;construct src_ptr[0]
|
||||
vshr.u64 q10, q6, #16
|
||||
vmlsl.u8 q7, d6, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d6, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d10, d4
|
||||
|
||||
vzip.32 d18, d19 ;put 2-line data in 1 register (src_ptr[0])
|
||||
vzip.32 d20, d21
|
||||
vshr.u64 q3, q4, #24 ;construct src_ptr[1]
|
||||
vshr.u64 q5, q6, #24
|
||||
vmlal.u8 q7, d18, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d18, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d20, d2
|
||||
|
||||
vzip.32 d6, d7 ;put 2-line data in 1 register (src_ptr[1])
|
||||
vzip.32 d10, d11
|
||||
vmull.u8 q9, d6, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q9, d6, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q10, d10, d3
|
||||
|
||||
add r0, r4, lr
|
||||
@ -380,22 +380,22 @@ secondpass_filter4x4_only
|
||||
vext.8 d25, d29, d30, #4
|
||||
vext.8 d26, d30, d31, #4
|
||||
|
||||
vmull.u8 q3, d27, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d27, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d28, d0
|
||||
|
||||
vmull.u8 q5, d25, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmull.u8 q5, d25, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmull.u8 q6, d26, d5
|
||||
|
||||
vmlsl.u8 q3, d29, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d29, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d30, d4
|
||||
|
||||
vmlsl.u8 q5, d23, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q5, d23, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q6, d24, d1
|
||||
|
||||
vmlal.u8 q3, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d29, d2
|
||||
|
||||
vmlal.u8 q5, d24, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmlal.u8 q5, d24, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmlal.u8 q6, d25, d3
|
||||
|
||||
add r0, r4, lr
|
||||
|
@ -76,7 +76,7 @@ filter8_coeff
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q8, d8, d0
|
||||
vmull.u8 q9, d10, d0
|
||||
vmull.u8 q10, d12, d0
|
||||
@ -86,7 +86,7 @@ filter8_coeff
|
||||
vext.8 d30, d10, d11, #1
|
||||
vext.8 d31, d12, d13, #1
|
||||
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d29, d1
|
||||
vmlsl.u8 q9, d30, d1
|
||||
vmlsl.u8 q10, d31, d1
|
||||
@ -96,7 +96,7 @@ filter8_coeff
|
||||
vext.8 d30, d10, d11, #4
|
||||
vext.8 d31, d12, d13, #4
|
||||
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d29, d4
|
||||
vmlsl.u8 q9, d30, d4
|
||||
vmlsl.u8 q10, d31, d4
|
||||
@ -106,7 +106,7 @@ filter8_coeff
|
||||
vext.8 d30, d10, d11, #2
|
||||
vext.8 d31, d12, d13, #2
|
||||
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d29, d2
|
||||
vmlal.u8 q9, d30, d2
|
||||
vmlal.u8 q10, d31, d2
|
||||
@ -116,7 +116,7 @@ filter8_coeff
|
||||
vext.8 d30, d10, d11, #5
|
||||
vext.8 d31, d12, d13, #5
|
||||
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q8, d29, d5
|
||||
vmlal.u8 q9, d30, d5
|
||||
vmlal.u8 q10, d31, d5
|
||||
@ -126,7 +126,7 @@ filter8_coeff
|
||||
vext.8 d30, d10, d11, #3
|
||||
vext.8 d31, d12, d13, #3
|
||||
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q4, d29, d3
|
||||
vmull.u8 q5, d30, d3
|
||||
vmull.u8 q6, d31, d3
|
||||
@ -153,7 +153,7 @@ filter8_coeff
|
||||
vst1.u8 {d25}, [lr]!
|
||||
|
||||
;first_pass filtering on the rest 5-line data
|
||||
vmull.u8 q8, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q8, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q9, d8, d0
|
||||
vmull.u8 q10, d10, d0
|
||||
vmull.u8 q11, d12, d0
|
||||
@ -165,7 +165,7 @@ filter8_coeff
|
||||
vext.8 d30, d12, d13, #1
|
||||
vext.8 d31, d14, d15, #1
|
||||
|
||||
vmlsl.u8 q8, d27, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q8, d27, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q9, d28, d1
|
||||
vmlsl.u8 q10, d29, d1
|
||||
vmlsl.u8 q11, d30, d1
|
||||
@ -177,7 +177,7 @@ filter8_coeff
|
||||
vext.8 d30, d12, d13, #4
|
||||
vext.8 d31, d14, d15, #4
|
||||
|
||||
vmlsl.u8 q8, d27, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q8, d27, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q9, d28, d4
|
||||
vmlsl.u8 q10, d29, d4
|
||||
vmlsl.u8 q11, d30, d4
|
||||
@ -189,7 +189,7 @@ filter8_coeff
|
||||
vext.8 d30, d12, d13, #2
|
||||
vext.8 d31, d14, d15, #2
|
||||
|
||||
vmlal.u8 q8, d27, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q8, d27, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q9, d28, d2
|
||||
vmlal.u8 q10, d29, d2
|
||||
vmlal.u8 q11, d30, d2
|
||||
@ -201,7 +201,7 @@ filter8_coeff
|
||||
vext.8 d30, d12, d13, #5
|
||||
vext.8 d31, d14, d15, #5
|
||||
|
||||
vmlal.u8 q8, d27, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q8, d27, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q9, d28, d5
|
||||
vmlal.u8 q10, d29, d5
|
||||
vmlal.u8 q11, d30, d5
|
||||
@ -213,7 +213,7 @@ filter8_coeff
|
||||
vext.8 d30, d12, d13, #3
|
||||
vext.8 d31, d14, d15, #3
|
||||
|
||||
vmull.u8 q3, d27, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q3, d27, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q4, d28, d3
|
||||
vmull.u8 q5, d29, d3
|
||||
vmull.u8 q6, d30, d3
|
||||
@ -251,32 +251,32 @@ filter8_coeff
|
||||
vdup.8 d4, d16[0]
|
||||
vdup.8 d5, d16[4]
|
||||
|
||||
vmull.u8 q3, d22, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d22, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d23, d0
|
||||
vmull.u8 q5, d24, d0
|
||||
vmull.u8 q6, d25, d0
|
||||
|
||||
vmlsl.u8 q3, d23, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q3, d23, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q4, d24, d1
|
||||
vmlsl.u8 q5, d25, d1
|
||||
vmlsl.u8 q6, d26, d1
|
||||
|
||||
vmlsl.u8 q3, d26, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d26, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d27, d4
|
||||
vmlsl.u8 q5, d28, d4
|
||||
vmlsl.u8 q6, d29, d4
|
||||
|
||||
vmlal.u8 q3, d24, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d24, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d25, d2
|
||||
vmlal.u8 q5, d26, d2
|
||||
vmlal.u8 q6, d27, d2
|
||||
|
||||
vmlal.u8 q3, d27, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q3, d27, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q4, d28, d5
|
||||
vmlal.u8 q5, d29, d5
|
||||
vmlal.u8 q6, d30, d5
|
||||
|
||||
vmull.u8 q7, d25, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q7, d25, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q8, d26, d3
|
||||
vmull.u8 q9, d27, d3
|
||||
vmull.u8 q10, d28, d3
|
||||
@ -322,7 +322,7 @@ firstpass_filter8x4_only
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q8, d8, d0
|
||||
vmull.u8 q9, d10, d0
|
||||
vmull.u8 q10, d12, d0
|
||||
@ -332,7 +332,7 @@ firstpass_filter8x4_only
|
||||
vext.8 d30, d10, d11, #1
|
||||
vext.8 d31, d12, d13, #1
|
||||
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d29, d1
|
||||
vmlsl.u8 q9, d30, d1
|
||||
vmlsl.u8 q10, d31, d1
|
||||
@ -342,7 +342,7 @@ firstpass_filter8x4_only
|
||||
vext.8 d30, d10, d11, #4
|
||||
vext.8 d31, d12, d13, #4
|
||||
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d29, d4
|
||||
vmlsl.u8 q9, d30, d4
|
||||
vmlsl.u8 q10, d31, d4
|
||||
@ -352,7 +352,7 @@ firstpass_filter8x4_only
|
||||
vext.8 d30, d10, d11, #2
|
||||
vext.8 d31, d12, d13, #2
|
||||
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d29, d2
|
||||
vmlal.u8 q9, d30, d2
|
||||
vmlal.u8 q10, d31, d2
|
||||
@ -362,7 +362,7 @@ firstpass_filter8x4_only
|
||||
vext.8 d30, d10, d11, #5
|
||||
vext.8 d31, d12, d13, #5
|
||||
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q8, d29, d5
|
||||
vmlal.u8 q9, d30, d5
|
||||
vmlal.u8 q10, d31, d5
|
||||
@ -372,7 +372,7 @@ firstpass_filter8x4_only
|
||||
vext.8 d30, d10, d11, #3
|
||||
vext.8 d31, d12, d13, #3
|
||||
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q4, d29, d3
|
||||
vmull.u8 q5, d30, d3
|
||||
vmull.u8 q6, d31, d3
|
||||
@ -419,32 +419,32 @@ secondpass_filter8x4_only
|
||||
vdup.8 d5, d16[4]
|
||||
vld1.u8 {d30}, [r0], r1
|
||||
|
||||
vmull.u8 q3, d22, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d22, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d23, d0
|
||||
vmull.u8 q5, d24, d0
|
||||
vmull.u8 q6, d25, d0
|
||||
|
||||
vmlsl.u8 q3, d23, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q3, d23, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q4, d24, d1
|
||||
vmlsl.u8 q5, d25, d1
|
||||
vmlsl.u8 q6, d26, d1
|
||||
|
||||
vmlsl.u8 q3, d26, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d26, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d27, d4
|
||||
vmlsl.u8 q5, d28, d4
|
||||
vmlsl.u8 q6, d29, d4
|
||||
|
||||
vmlal.u8 q3, d24, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d24, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d25, d2
|
||||
vmlal.u8 q5, d26, d2
|
||||
vmlal.u8 q6, d27, d2
|
||||
|
||||
vmlal.u8 q3, d27, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q3, d27, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q4, d28, d5
|
||||
vmlal.u8 q5, d29, d5
|
||||
vmlal.u8 q6, d30, d5
|
||||
|
||||
vmull.u8 q7, d25, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q7, d25, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q8, d26, d3
|
||||
vmull.u8 q9, d27, d3
|
||||
vmull.u8 q10, d28, d3
|
||||
|
@ -80,7 +80,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q8, d8, d0
|
||||
vmull.u8 q9, d10, d0
|
||||
vmull.u8 q10, d12, d0
|
||||
@ -90,7 +90,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #1
|
||||
vext.8 d31, d12, d13, #1
|
||||
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d29, d1
|
||||
vmlsl.u8 q9, d30, d1
|
||||
vmlsl.u8 q10, d31, d1
|
||||
@ -100,7 +100,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #4
|
||||
vext.8 d31, d12, d13, #4
|
||||
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d29, d4
|
||||
vmlsl.u8 q9, d30, d4
|
||||
vmlsl.u8 q10, d31, d4
|
||||
@ -110,7 +110,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #2
|
||||
vext.8 d31, d12, d13, #2
|
||||
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d29, d2
|
||||
vmlal.u8 q9, d30, d2
|
||||
vmlal.u8 q10, d31, d2
|
||||
@ -120,7 +120,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #5
|
||||
vext.8 d31, d12, d13, #5
|
||||
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q8, d29, d5
|
||||
vmlal.u8 q9, d30, d5
|
||||
vmlal.u8 q10, d31, d5
|
||||
@ -130,7 +130,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #3
|
||||
vext.8 d31, d12, d13, #3
|
||||
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q4, d29, d3
|
||||
vmull.u8 q5, d30, d3
|
||||
vmull.u8 q6, d31, d3
|
||||
@ -166,7 +166,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
;vld1.u8 {q6}, [r0], r1
|
||||
vld1.u8 {q7}, [r0], r1
|
||||
|
||||
vmull.u8 q8, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q8, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q9, d8, d0
|
||||
vmull.u8 q10, d10, d0
|
||||
vmull.u8 q11, d12, d0
|
||||
@ -178,7 +178,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d12, d13, #1
|
||||
vext.8 d31, d14, d15, #1
|
||||
|
||||
vmlsl.u8 q8, d27, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q8, d27, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q9, d28, d1
|
||||
vmlsl.u8 q10, d29, d1
|
||||
vmlsl.u8 q11, d30, d1
|
||||
@ -190,7 +190,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d12, d13, #4
|
||||
vext.8 d31, d14, d15, #4
|
||||
|
||||
vmlsl.u8 q8, d27, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q8, d27, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q9, d28, d4
|
||||
vmlsl.u8 q10, d29, d4
|
||||
vmlsl.u8 q11, d30, d4
|
||||
@ -202,7 +202,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d12, d13, #2
|
||||
vext.8 d31, d14, d15, #2
|
||||
|
||||
vmlal.u8 q8, d27, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q8, d27, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q9, d28, d2
|
||||
vmlal.u8 q10, d29, d2
|
||||
vmlal.u8 q11, d30, d2
|
||||
@ -214,7 +214,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d12, d13, #5
|
||||
vext.8 d31, d14, d15, #5
|
||||
|
||||
vmlal.u8 q8, d27, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q8, d27, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q9, d28, d5
|
||||
vmlal.u8 q10, d29, d5
|
||||
vmlal.u8 q11, d30, d5
|
||||
@ -226,7 +226,7 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vext.8 d30, d12, d13, #3
|
||||
vext.8 d31, d14, d15, #3
|
||||
|
||||
vmull.u8 q3, d27, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q3, d27, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q4, d28, d3
|
||||
vmull.u8 q5, d29, d3
|
||||
vmull.u8 q6, d30, d3
|
||||
@ -269,32 +269,32 @@ filt_blk2d_fp8x8_loop_neon
|
||||
vdup.8 d5, d16[4]
|
||||
|
||||
filt_blk2d_sp8x8_loop_neon
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d19, d0
|
||||
vmull.u8 q5, d20, d0
|
||||
vmull.u8 q6, d21, d0
|
||||
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q4, d20, d1
|
||||
vmlsl.u8 q5, d21, d1
|
||||
vmlsl.u8 q6, d22, d1
|
||||
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d23, d4
|
||||
vmlsl.u8 q5, d24, d4
|
||||
vmlsl.u8 q6, d25, d4
|
||||
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d21, d2
|
||||
vmlal.u8 q5, d22, d2
|
||||
vmlal.u8 q6, d23, d2
|
||||
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q4, d24, d5
|
||||
vmlal.u8 q5, d25, d5
|
||||
vmlal.u8 q6, d26, d5
|
||||
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q8, d22, d3
|
||||
vmull.u8 q9, d23, d3
|
||||
vmull.u8 q10, d24, d3
|
||||
@ -354,7 +354,7 @@ filt_blk2d_fpo8x8_loop_neon
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q7, d6, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q8, d8, d0
|
||||
vmull.u8 q9, d10, d0
|
||||
vmull.u8 q10, d12, d0
|
||||
@ -364,7 +364,7 @@ filt_blk2d_fpo8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #1
|
||||
vext.8 d31, d12, d13, #1
|
||||
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q7, d28, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q8, d29, d1
|
||||
vmlsl.u8 q9, d30, d1
|
||||
vmlsl.u8 q10, d31, d1
|
||||
@ -374,7 +374,7 @@ filt_blk2d_fpo8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #4
|
||||
vext.8 d31, d12, d13, #4
|
||||
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q7, d28, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q8, d29, d4
|
||||
vmlsl.u8 q9, d30, d4
|
||||
vmlsl.u8 q10, d31, d4
|
||||
@ -384,7 +384,7 @@ filt_blk2d_fpo8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #2
|
||||
vext.8 d31, d12, d13, #2
|
||||
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q7, d28, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q8, d29, d2
|
||||
vmlal.u8 q9, d30, d2
|
||||
vmlal.u8 q10, d31, d2
|
||||
@ -394,7 +394,7 @@ filt_blk2d_fpo8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #5
|
||||
vext.8 d31, d12, d13, #5
|
||||
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q7, d28, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q8, d29, d5
|
||||
vmlal.u8 q9, d30, d5
|
||||
vmlal.u8 q10, d31, d5
|
||||
@ -404,7 +404,7 @@ filt_blk2d_fpo8x8_loop_neon
|
||||
vext.8 d30, d10, d11, #3
|
||||
vext.8 d31, d12, d13, #3
|
||||
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q3, d28, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q4, d29, d3
|
||||
vmull.u8 q5, d30, d3
|
||||
vmull.u8 q6, d31, d3
|
||||
@ -461,32 +461,32 @@ secondpass_filter8x8_only
|
||||
|
||||
;Second pass: 8x8
|
||||
filt_blk2d_spo8x8_loop_neon
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp8_filter[0])
|
||||
vmull.u8 q3, d18, d0 ;(src_ptr[-2] * vp9_filter[0])
|
||||
vmull.u8 q4, d19, d0
|
||||
vmull.u8 q5, d20, d0
|
||||
vmull.u8 q6, d21, d0
|
||||
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp8_filter[1])
|
||||
vmlsl.u8 q3, d19, d1 ;-(src_ptr[-1] * vp9_filter[1])
|
||||
vmlsl.u8 q4, d20, d1
|
||||
vmlsl.u8 q5, d21, d1
|
||||
vmlsl.u8 q6, d22, d1
|
||||
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp8_filter[4])
|
||||
vmlsl.u8 q3, d22, d4 ;-(src_ptr[2] * vp9_filter[4])
|
||||
vmlsl.u8 q4, d23, d4
|
||||
vmlsl.u8 q5, d24, d4
|
||||
vmlsl.u8 q6, d25, d4
|
||||
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp8_filter[2])
|
||||
vmlal.u8 q3, d20, d2 ;(src_ptr[0] * vp9_filter[2])
|
||||
vmlal.u8 q4, d21, d2
|
||||
vmlal.u8 q5, d22, d2
|
||||
vmlal.u8 q6, d23, d2
|
||||
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp8_filter[5])
|
||||
vmlal.u8 q3, d23, d5 ;(src_ptr[3] * vp9_filter[5])
|
||||
vmlal.u8 q4, d24, d5
|
||||
vmlal.u8 q5, d25, d5
|
||||
vmlal.u8 q6, d26, d5
|
||||
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp8_filter[3])
|
||||
vmull.u8 q7, d21, d3 ;(src_ptr[1] * vp9_filter[3])
|
||||
vmull.u8 q8, d22, d3
|
||||
vmull.u8 q9, d23, d3
|
||||
vmull.u8 q10, d24, d3
|
||||
|
@ -23,29 +23,29 @@ extern prototype_subpixel_predict(vp9_bilinear_predict8x4_armv6);
|
||||
extern prototype_subpixel_predict(vp9_bilinear_predict4x4_armv6);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_subpix_sixtap16x16
|
||||
#define vp8_subpix_sixtap16x16 vp9_sixtap_predict16x16_armv6
|
||||
#undef vp9_subpix_sixtap16x16
|
||||
#define vp9_subpix_sixtap16x16 vp9_sixtap_predict16x16_armv6
|
||||
|
||||
#undef vp8_subpix_sixtap8x8
|
||||
#define vp8_subpix_sixtap8x8 vp9_sixtap_predict8x8_armv6
|
||||
#undef vp9_subpix_sixtap8x8
|
||||
#define vp9_subpix_sixtap8x8 vp9_sixtap_predict8x8_armv6
|
||||
|
||||
#undef vp8_subpix_sixtap8x4
|
||||
#define vp8_subpix_sixtap8x4 vp9_sixtap_predict8x4_armv6
|
||||
#undef vp9_subpix_sixtap8x4
|
||||
#define vp9_subpix_sixtap8x4 vp9_sixtap_predict8x4_armv6
|
||||
|
||||
#undef vp8_subpix_sixtap4x4
|
||||
#define vp8_subpix_sixtap4x4 vp9_sixtap_predict_armv6
|
||||
#undef vp9_subpix_sixtap4x4
|
||||
#define vp9_subpix_sixtap4x4 vp9_sixtap_predict_armv6
|
||||
|
||||
#undef vp8_subpix_bilinear16x16
|
||||
#define vp8_subpix_bilinear16x16 vp9_bilinear_predict16x16_armv6
|
||||
#undef vp9_subpix_bilinear16x16
|
||||
#define vp9_subpix_bilinear16x16 vp9_bilinear_predict16x16_armv6
|
||||
|
||||
#undef vp8_subpix_bilinear8x8
|
||||
#define vp8_subpix_bilinear8x8 vp9_bilinear_predict8x8_armv6
|
||||
#undef vp9_subpix_bilinear8x8
|
||||
#define vp9_subpix_bilinear8x8 vp9_bilinear_predict8x8_armv6
|
||||
|
||||
#undef vp8_subpix_bilinear8x4
|
||||
#define vp8_subpix_bilinear8x4 vp9_bilinear_predict8x4_armv6
|
||||
#undef vp9_subpix_bilinear8x4
|
||||
#define vp9_subpix_bilinear8x4 vp9_bilinear_predict8x4_armv6
|
||||
|
||||
#undef vp8_subpix_bilinear4x4
|
||||
#define vp8_subpix_bilinear4x4 vp9_bilinear_predict4x4_armv6
|
||||
#undef vp9_subpix_bilinear4x4
|
||||
#define vp9_subpix_bilinear4x4 vp9_bilinear_predict4x4_armv6
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -60,29 +60,29 @@ extern prototype_subpixel_predict(vp9_bilinear_predict8x4_neon);
|
||||
extern prototype_subpixel_predict(vp9_bilinear_predict4x4_neon);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_subpix_sixtap16x16
|
||||
#define vp8_subpix_sixtap16x16 vp9_sixtap_predict16x16_neon
|
||||
#undef vp9_subpix_sixtap16x16
|
||||
#define vp9_subpix_sixtap16x16 vp9_sixtap_predict16x16_neon
|
||||
|
||||
#undef vp8_subpix_sixtap8x8
|
||||
#define vp8_subpix_sixtap8x8 vp9_sixtap_predict8x8_neon
|
||||
#undef vp9_subpix_sixtap8x8
|
||||
#define vp9_subpix_sixtap8x8 vp9_sixtap_predict8x8_neon
|
||||
|
||||
#undef vp8_subpix_sixtap8x4
|
||||
#define vp8_subpix_sixtap8x4 vp9_sixtap_predict8x4_neon
|
||||
#undef vp9_subpix_sixtap8x4
|
||||
#define vp9_subpix_sixtap8x4 vp9_sixtap_predict8x4_neon
|
||||
|
||||
#undef vp8_subpix_sixtap4x4
|
||||
#define vp8_subpix_sixtap4x4 vp9_sixtap_predict_neon
|
||||
#undef vp9_subpix_sixtap4x4
|
||||
#define vp9_subpix_sixtap4x4 vp9_sixtap_predict_neon
|
||||
|
||||
#undef vp8_subpix_bilinear16x16
|
||||
#define vp8_subpix_bilinear16x16 vp9_bilinear_predict16x16_neon
|
||||
#undef vp9_subpix_bilinear16x16
|
||||
#define vp9_subpix_bilinear16x16 vp9_bilinear_predict16x16_neon
|
||||
|
||||
#undef vp8_subpix_bilinear8x8
|
||||
#define vp8_subpix_bilinear8x8 vp9_bilinear_predict8x8_neon
|
||||
#undef vp9_subpix_bilinear8x8
|
||||
#define vp9_subpix_bilinear8x8 vp9_bilinear_predict8x8_neon
|
||||
|
||||
#undef vp8_subpix_bilinear8x4
|
||||
#define vp8_subpix_bilinear8x4 vp9_bilinear_predict8x4_neon
|
||||
#undef vp9_subpix_bilinear8x4
|
||||
#define vp9_subpix_bilinear8x4 vp9_bilinear_predict8x4_neon
|
||||
|
||||
#undef vp8_subpix_bilinear4x4
|
||||
#define vp8_subpix_bilinear4x4 vp9_bilinear_predict4x4_neon
|
||||
#undef vp9_subpix_bilinear4x4
|
||||
#define vp9_subpix_bilinear4x4 vp9_bilinear_predict4x4_neon
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -72,7 +72,7 @@ extern const unsigned char vp9_block2above[25];
|
||||
extern const unsigned char vp9_block2left_8x8[25];
|
||||
extern const unsigned char vp9_block2above_8x8[25];
|
||||
|
||||
#define VP8_COMBINEENTROPYCONTEXTS( Dest, A, B) \
|
||||
#define VP9_COMBINEENTROPYCONTEXTS( Dest, A, B) \
|
||||
Dest = ((A)!=0) + ((B)!=0);
|
||||
|
||||
typedef enum {
|
||||
@ -140,12 +140,12 @@ typedef enum {
|
||||
ADST_ADST = 3 // ADST in both directions
|
||||
} TX_TYPE;
|
||||
|
||||
#define VP8_YMODES (B_PRED + 1)
|
||||
#define VP8_UV_MODES (TM_PRED + 1)
|
||||
#define VP8_I8X8_MODES (TM_PRED + 1)
|
||||
#define VP8_I32X32_MODES (TM_PRED + 1)
|
||||
#define VP9_YMODES (B_PRED + 1)
|
||||
#define VP9_UV_MODES (TM_PRED + 1)
|
||||
#define VP9_I8X8_MODES (TM_PRED + 1)
|
||||
#define VP9_I32X32_MODES (TM_PRED + 1)
|
||||
|
||||
#define VP8_MVREFS (1 + SPLITMV - NEARESTMV)
|
||||
#define VP9_MVREFS (1 + SPLITMV - NEARESTMV)
|
||||
|
||||
typedef enum {
|
||||
B_DC_PRED, /* average of above and left pixels */
|
||||
@ -170,8 +170,8 @@ typedef enum {
|
||||
B_MODE_COUNT
|
||||
} B_PREDICTION_MODE;
|
||||
|
||||
#define VP8_BINTRAMODES (B_HU_PRED + 1) /* 10 */
|
||||
#define VP8_SUBMVREFS (1 + NEW4X4 - LEFT4X4)
|
||||
#define VP9_BINTRAMODES (B_HU_PRED + 1) /* 10 */
|
||||
#define VP9_SUBMVREFS (1 + NEW4X4 - LEFT4X4)
|
||||
|
||||
typedef enum {
|
||||
PARTITIONING_16X8 = 0,
|
||||
@ -321,10 +321,10 @@ typedef struct macroblockd {
|
||||
/* are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO */
|
||||
|
||||
// Probability Tree used to code Segment number
|
||||
vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS];
|
||||
vp9_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS];
|
||||
|
||||
#if CONFIG_NEW_MVREF
|
||||
vp8_prob mb_mv_ref_id_probs[MAX_REF_FRAMES][3];
|
||||
vp9_prob mb_mv_ref_id_probs[MAX_REF_FRAMES][3];
|
||||
#endif
|
||||
|
||||
// Segment features
|
||||
@ -349,14 +349,14 @@ typedef struct macroblockd {
|
||||
|
||||
unsigned int frames_since_golden;
|
||||
unsigned int frames_till_alt_ref_frame;
|
||||
vp8_subpix_fn_t subpixel_predict;
|
||||
vp8_subpix_fn_t subpixel_predict8x4;
|
||||
vp8_subpix_fn_t subpixel_predict8x8;
|
||||
vp8_subpix_fn_t subpixel_predict16x16;
|
||||
vp8_subpix_fn_t subpixel_predict_avg;
|
||||
vp8_subpix_fn_t subpixel_predict_avg8x4;
|
||||
vp8_subpix_fn_t subpixel_predict_avg8x8;
|
||||
vp8_subpix_fn_t subpixel_predict_avg16x16;
|
||||
vp9_subpix_fn_t subpixel_predict;
|
||||
vp9_subpix_fn_t subpixel_predict8x4;
|
||||
vp9_subpix_fn_t subpixel_predict8x8;
|
||||
vp9_subpix_fn_t subpixel_predict16x16;
|
||||
vp9_subpix_fn_t subpixel_predict_avg;
|
||||
vp9_subpix_fn_t subpixel_predict_avg8x4;
|
||||
vp9_subpix_fn_t subpixel_predict_avg8x8;
|
||||
vp9_subpix_fn_t subpixel_predict_avg16x16;
|
||||
int allow_high_precision_mv;
|
||||
|
||||
int corrupted;
|
||||
|
@ -22,20 +22,20 @@
|
||||
|
||||
/* Only need this for fixed-size arrays, for structs just assign. */
|
||||
|
||||
#define vp8_copy( Dest, Src) { \
|
||||
#define vp9_copy( Dest, Src) { \
|
||||
assert( sizeof( Dest) == sizeof( Src)); \
|
||||
vpx_memcpy( Dest, Src, sizeof( Src)); \
|
||||
}
|
||||
|
||||
/* Use this for variably-sized arrays. */
|
||||
|
||||
#define vp8_copy_array( Dest, Src, N) { \
|
||||
#define vp9_copy_array( Dest, Src, N) { \
|
||||
assert( sizeof( *Dest) == sizeof( *Src)); \
|
||||
vpx_memcpy( Dest, Src, N * sizeof( *Src)); \
|
||||
}
|
||||
|
||||
#define vp8_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest));
|
||||
#define vp9_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest));
|
||||
|
||||
#define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
|
||||
#define vp9_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
|
||||
|
||||
#endif /* common_h */
|
||||
|
@ -224,7 +224,7 @@ const int default_contexts[vp8_coef_counter_dimen] = {
|
||||
};
|
||||
|
||||
// Update probabilities for the nodes in the token entropy tree.
|
||||
const vp8_prob tree_update_probs[vp9_coef_tree_dimen] = {
|
||||
const vp9_prob tree_update_probs[vp9_coef_tree_dimen] = {
|
||||
{
|
||||
{
|
||||
{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
|
||||
|
@ -12,7 +12,7 @@
|
||||
/*Generated file, included by entropy.c*/
|
||||
|
||||
|
||||
static const vp8_prob default_coef_probs [BLOCK_TYPES]
|
||||
static const vp9_prob default_coef_probs [BLOCK_TYPES]
|
||||
[COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS]
|
||||
[ENTROPY_NODES] = {
|
||||
@ -254,7 +254,7 @@ static const vp8_prob default_coef_probs [BLOCK_TYPES]
|
||||
}
|
||||
};
|
||||
|
||||
static const vp8_prob default_hybrid_coef_probs [BLOCK_TYPES]
|
||||
static const vp9_prob default_hybrid_coef_probs [BLOCK_TYPES]
|
||||
[COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS]
|
||||
[ENTROPY_NODES] = {
|
||||
@ -496,7 +496,7 @@ static const vp8_prob default_hybrid_coef_probs [BLOCK_TYPES]
|
||||
}
|
||||
};
|
||||
|
||||
static const vp8_prob
|
||||
static const vp9_prob
|
||||
default_coef_probs_8x8[BLOCK_TYPES_8X8]
|
||||
[COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS]
|
||||
@ -729,7 +729,7 @@ default_coef_probs_8x8[BLOCK_TYPES_8X8]
|
||||
}
|
||||
};
|
||||
|
||||
static const vp8_prob
|
||||
static const vp9_prob
|
||||
default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]
|
||||
[COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS]
|
||||
@ -962,7 +962,7 @@ default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]
|
||||
}
|
||||
};
|
||||
|
||||
static const vp8_prob
|
||||
static const vp9_prob
|
||||
default_coef_probs_16x16[BLOCK_TYPES_16X16]
|
||||
[COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS]
|
||||
@ -1169,7 +1169,7 @@ static const vp8_prob
|
||||
}
|
||||
};
|
||||
|
||||
static const vp8_prob
|
||||
static const vp9_prob
|
||||
default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]
|
||||
[COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS]
|
||||
|
@ -24,7 +24,7 @@
|
||||
typedef const uchar cuchar;
|
||||
typedef const uint cuint;
|
||||
|
||||
typedef vp8_prob Prob;
|
||||
typedef vp9_prob Prob;
|
||||
|
||||
#include "coefupdateprobs.h"
|
||||
|
||||
@ -135,7 +135,7 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]) = {
|
||||
|
||||
/* Array indices are identical to previously-existing CONTEXT_NODE indices */
|
||||
|
||||
const vp8_tree_index vp9_coef_tree[ 22] = /* corresponding _CONTEXT_NODEs */
|
||||
const vp9_tree_index vp9_coef_tree[ 22] = /* corresponding _CONTEXT_NODEs */
|
||||
{
|
||||
-DCT_EOB_TOKEN, 2, /* 0 = EOB */
|
||||
-ZERO_TOKEN, 4, /* 1 = ZERO */
|
||||
@ -150,7 +150,7 @@ const vp8_tree_index vp9_coef_tree[ 22] = /* corresponding _CONTEXT_NODEs */
|
||||
-DCT_VAL_CATEGORY5, -DCT_VAL_CATEGORY6 /* 10 = CAT_FIVE */
|
||||
};
|
||||
|
||||
struct vp8_token_struct vp9_coef_encodings[MAX_ENTROPY_TOKENS];
|
||||
struct vp9_token_struct vp9_coef_encodings[MAX_ENTROPY_TOKENS];
|
||||
|
||||
/* Trees for extra bits. Probabilities are constant and
|
||||
do not depend on previously encoded bits */
|
||||
@ -163,9 +163,9 @@ static const Prob Pcat5[] = { 180, 157, 141, 134, 130};
|
||||
static const Prob Pcat6[] =
|
||||
{ 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129};
|
||||
|
||||
static vp8_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[26];
|
||||
static vp9_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[26];
|
||||
|
||||
static void init_bit_tree(vp8_tree_index *p, int n) {
|
||||
static void init_bit_tree(vp9_tree_index *p, int n) {
|
||||
int i = 0;
|
||||
|
||||
while (++i < n) {
|
||||
@ -185,7 +185,7 @@ static void init_bit_trees() {
|
||||
init_bit_tree(cat6, 13);
|
||||
}
|
||||
|
||||
vp8_extra_bit_struct vp9_extra_bits[12] = {
|
||||
vp9_extra_bit_struct vp9_extra_bits[12] = {
|
||||
{ 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 1},
|
||||
{ 0, 0, 0, 2},
|
||||
@ -237,7 +237,7 @@ void vp9_coef_tree_initialize() {
|
||||
void vp9_adapt_coef_probs(VP9_COMMON *cm) {
|
||||
int t, i, j, k, count;
|
||||
unsigned int branch_ct[ENTROPY_NODES][2];
|
||||
vp8_prob coef_probs[ENTROPY_NODES];
|
||||
vp9_prob coef_probs[ENTROPY_NODES];
|
||||
int update_factor; /* denominator 256 */
|
||||
int factor;
|
||||
int count_sat;
|
||||
|
@ -17,10 +17,6 @@
|
||||
#include "common.h"
|
||||
#include "coefupdateprobs.h"
|
||||
|
||||
|
||||
//#define SUBMVREF_COUNT 5
|
||||
//#define VP8_NUMMBSPLITS 4
|
||||
|
||||
extern const int vp9_i8x8_block[4];
|
||||
|
||||
/* Coefficient token alphabet */
|
||||
@ -41,18 +37,18 @@ extern const int vp9_i8x8_block[4];
|
||||
#define ENTROPY_NODES 11
|
||||
#define EOSB_TOKEN 127 /* Not signalled, encoder only */
|
||||
|
||||
extern const vp8_tree_index vp9_coef_tree[];
|
||||
extern const vp9_tree_index vp9_coef_tree[];
|
||||
|
||||
extern struct vp8_token_struct vp9_coef_encodings[MAX_ENTROPY_TOKENS];
|
||||
extern struct vp9_token_struct vp9_coef_encodings[MAX_ENTROPY_TOKENS];
|
||||
|
||||
typedef struct {
|
||||
vp8_tree_p tree;
|
||||
const vp8_prob *prob;
|
||||
vp9_tree_p tree;
|
||||
const vp9_prob *prob;
|
||||
int Len;
|
||||
int base_val;
|
||||
} vp8_extra_bit_struct;
|
||||
} vp9_extra_bit_struct;
|
||||
|
||||
extern vp8_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
|
||||
extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
|
||||
|
||||
#define PROB_UPDATE_BASELINE_COST 7
|
||||
|
||||
@ -107,7 +103,6 @@ extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d[16]);
|
||||
extern DECLARE_ALIGNED(16, const int, vp9_col_scan[16]);
|
||||
extern DECLARE_ALIGNED(16, const int, vp9_row_scan[16]);
|
||||
|
||||
extern short vp8_default_zig_zag_mask[16];
|
||||
extern DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]);
|
||||
void vp9_coef_tree_initialize(void);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
|
||||
static const unsigned int kf_y_mode_cts[8][VP8_YMODES] = {
|
||||
static const unsigned int kf_y_mode_cts[8][VP9_YMODES] = {
|
||||
/* DC V H D45 135 117 153 D27 D63 TM i8x8 BPRED */
|
||||
{12, 6, 5, 5, 5, 5, 5, 5, 5, 2, 22, 200},
|
||||
{25, 13, 13, 7, 7, 7, 7, 7, 7, 6, 27, 160},
|
||||
@ -26,12 +26,12 @@ static const unsigned int kf_y_mode_cts[8][VP8_YMODES] = {
|
||||
{89, 42, 42, 8, 8, 8, 8, 8, 8, 21, 12, 34},
|
||||
};
|
||||
|
||||
static const unsigned int y_mode_cts [VP8_YMODES] = {
|
||||
static const unsigned int y_mode_cts [VP9_YMODES] = {
|
||||
/* DC V H D45 135 117 153 D27 D63 TM i8x8 BPRED */
|
||||
98, 19, 15, 14, 14, 14, 14, 12, 12, 13, 16, 70
|
||||
};
|
||||
|
||||
static const unsigned int uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] = {
|
||||
static const unsigned int uv_mode_cts [VP9_YMODES] [VP9_UV_MODES] = {
|
||||
/* DC V H D45 135 117 153 D27 D63 TM */
|
||||
{ 200, 15, 15, 10, 10, 10, 10, 10, 10, 6}, /* DC */
|
||||
{ 130, 75, 10, 10, 10, 10, 10, 10, 10, 6}, /* V */
|
||||
@ -47,12 +47,12 @@ static const unsigned int uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] = {
|
||||
{ 150, 35, 41, 10, 10, 10, 10, 10, 10, 10}, /* BPRED */
|
||||
};
|
||||
|
||||
static const unsigned int i8x8_mode_cts [VP8_I8X8_MODES] = {
|
||||
static const unsigned int i8x8_mode_cts [VP9_I8X8_MODES] = {
|
||||
/* DC V H D45 135 117 153 D27 D63 TM */
|
||||
73, 49, 61, 30, 30, 30, 30, 30, 30, 13
|
||||
};
|
||||
|
||||
static const unsigned int kf_uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] = {
|
||||
static const unsigned int kf_uv_mode_cts [VP9_YMODES] [VP9_UV_MODES] = {
|
||||
// DC V H D45 135 117 153 D27 D63 TM
|
||||
{ 160, 24, 24, 20, 20, 20, 20, 20, 20, 8}, /* DC */
|
||||
{ 102, 64, 30, 20, 20, 20, 20, 20, 20, 10}, /* V */
|
||||
@ -68,7 +68,7 @@ static const unsigned int kf_uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] = {
|
||||
{ 122, 41, 35, 20, 20, 20, 20, 20, 20, 18}, /* BPRED */
|
||||
};
|
||||
|
||||
static const unsigned int bmode_cts[VP8_BINTRAMODES] = {
|
||||
static const unsigned int bmode_cts[VP9_BINTRAMODES] = {
|
||||
/* DC TM VE HE LD RD VR VL HD HU */
|
||||
43891, 17694, 10036, 3920, 3363, 2546, 5119, 3221, 2471, 1723
|
||||
};
|
||||
@ -101,9 +101,9 @@ int vp9_mv_cont(const int_mv *l, const int_mv *a) {
|
||||
return SUBMVREF_NORMAL;
|
||||
}
|
||||
|
||||
const vp8_prob vp9_sub_mv_ref_prob [VP8_SUBMVREFS - 1] = { 180, 162, 25};
|
||||
const vp9_prob vp9_sub_mv_ref_prob [VP9_SUBMVREFS - 1] = { 180, 162, 25};
|
||||
|
||||
const vp8_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP8_SUBMVREFS - 1] = {
|
||||
const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1] = {
|
||||
{ 147, 136, 18 },
|
||||
{ 106, 145, 1 },
|
||||
{ 179, 121, 1 },
|
||||
@ -113,7 +113,7 @@ const vp8_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP8_SUBMVREFS - 1] = {
|
||||
|
||||
|
||||
|
||||
vp9_mbsplit vp9_mbsplits [VP8_NUMMBSPLITS] = {
|
||||
vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS] = {
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
@ -140,14 +140,14 @@ vp9_mbsplit vp9_mbsplits [VP8_NUMMBSPLITS] = {
|
||||
},
|
||||
};
|
||||
|
||||
const int vp9_mbsplit_count [VP8_NUMMBSPLITS] = { 2, 2, 4, 16};
|
||||
const int vp9_mbsplit_count [VP9_NUMMBSPLITS] = { 2, 2, 4, 16};
|
||||
|
||||
const vp8_prob vp9_mbsplit_probs [VP8_NUMMBSPLITS - 1] = { 110, 111, 150};
|
||||
const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1] = { 110, 111, 150};
|
||||
|
||||
|
||||
/* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */
|
||||
|
||||
const vp8_tree_index vp9_bmode_tree[VP8_BINTRAMODES * 2 - 2] = /* INTRAMODECONTEXTNODE value */
|
||||
const vp9_tree_index vp9_bmode_tree[VP9_BINTRAMODES * 2 - 2] = /* INTRAMODECONTEXTNODE value */
|
||||
{
|
||||
-B_DC_PRED, 2, /* 0 = DC_NODE */
|
||||
-B_TM_PRED, 4, /* 1 = TM_NODE */
|
||||
@ -162,7 +162,7 @@ const vp8_tree_index vp9_bmode_tree[VP8_BINTRAMODES * 2 - 2] = /* INTRAMODECONTE
|
||||
|
||||
/* Again, these trees use the same probability indices as their
|
||||
explicitly-programmed predecessors. */
|
||||
const vp8_tree_index vp9_ymode_tree[VP8_YMODES * 2 - 2] = {
|
||||
const vp9_tree_index vp9_ymode_tree[VP9_YMODES * 2 - 2] = {
|
||||
2, 14,
|
||||
-DC_PRED, 4,
|
||||
6, 8,
|
||||
@ -176,7 +176,7 @@ const vp8_tree_index vp9_ymode_tree[VP8_YMODES * 2 - 2] = {
|
||||
-B_PRED, -I8X8_PRED
|
||||
};
|
||||
|
||||
const vp8_tree_index vp9_kf_ymode_tree[VP8_YMODES * 2 - 2] = {
|
||||
const vp9_tree_index vp9_kf_ymode_tree[VP9_YMODES * 2 - 2] = {
|
||||
2, 14,
|
||||
-DC_PRED, 4,
|
||||
6, 8,
|
||||
@ -190,7 +190,7 @@ const vp8_tree_index vp9_kf_ymode_tree[VP8_YMODES * 2 - 2] = {
|
||||
-B_PRED, -I8X8_PRED
|
||||
};
|
||||
|
||||
const vp8_tree_index vp9_i8x8_mode_tree[VP8_I8X8_MODES * 2 - 2] = {
|
||||
const vp9_tree_index vp9_i8x8_mode_tree[VP9_I8X8_MODES * 2 - 2] = {
|
||||
2, 14,
|
||||
-DC_PRED, 4,
|
||||
6, 8,
|
||||
@ -202,7 +202,7 @@ const vp8_tree_index vp9_i8x8_mode_tree[VP8_I8X8_MODES * 2 - 2] = {
|
||||
-H_PRED, -TM_PRED
|
||||
};
|
||||
|
||||
const vp8_tree_index vp9_uv_mode_tree[VP8_UV_MODES * 2 - 2] = {
|
||||
const vp9_tree_index vp9_uv_mode_tree[VP9_UV_MODES * 2 - 2] = {
|
||||
2, 14,
|
||||
-DC_PRED, 4,
|
||||
6, 8,
|
||||
@ -214,13 +214,13 @@ const vp8_tree_index vp9_uv_mode_tree[VP8_UV_MODES * 2 - 2] = {
|
||||
-H_PRED, -TM_PRED
|
||||
};
|
||||
|
||||
const vp8_tree_index vp9_mbsplit_tree[6] = {
|
||||
const vp9_tree_index vp9_mbsplit_tree[6] = {
|
||||
-PARTITIONING_4X4, 2,
|
||||
-PARTITIONING_8X8, 4,
|
||||
-PARTITIONING_16X8, -PARTITIONING_8X16,
|
||||
};
|
||||
|
||||
const vp8_tree_index vp9_mv_ref_tree[8] = {
|
||||
const vp9_tree_index vp9_mv_ref_tree[8] = {
|
||||
-ZEROMV, 2,
|
||||
-NEARESTMV, 4,
|
||||
-NEARMV, 6,
|
||||
@ -228,53 +228,53 @@ const vp8_tree_index vp9_mv_ref_tree[8] = {
|
||||
};
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
const vp8_tree_index vp9_sb_mv_ref_tree[6] = {
|
||||
const vp9_tree_index vp9_sb_mv_ref_tree[6] = {
|
||||
-ZEROMV, 2,
|
||||
-NEARESTMV, 4,
|
||||
-NEARMV, -NEWMV
|
||||
};
|
||||
#endif
|
||||
|
||||
const vp8_tree_index vp9_sub_mv_ref_tree[6] = {
|
||||
const vp9_tree_index vp9_sub_mv_ref_tree[6] = {
|
||||
-LEFT4X4, 2,
|
||||
-ABOVE4X4, 4,
|
||||
-ZERO4X4, -NEW4X4
|
||||
};
|
||||
|
||||
|
||||
struct vp8_token_struct vp9_bmode_encodings [VP8_BINTRAMODES];
|
||||
struct vp8_token_struct vp9_ymode_encodings [VP8_YMODES];
|
||||
struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES];
|
||||
struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES];
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
struct vp8_token_struct vp9_sb_kf_ymode_encodings [VP8_I32X32_MODES];
|
||||
struct vp9_token_struct vp9_sb_kf_ymode_encodings [VP9_I32X32_MODES];
|
||||
#endif
|
||||
struct vp8_token_struct vp9_kf_ymode_encodings [VP8_YMODES];
|
||||
struct vp8_token_struct vp9_uv_mode_encodings [VP8_UV_MODES];
|
||||
struct vp8_token_struct vp9_i8x8_mode_encodings [VP8_I8X8_MODES];
|
||||
struct vp8_token_struct vp9_mbsplit_encodings [VP8_NUMMBSPLITS];
|
||||
struct vp9_token_struct vp9_kf_ymode_encodings [VP9_YMODES];
|
||||
struct vp9_token_struct vp9_uv_mode_encodings [VP9_UV_MODES];
|
||||
struct vp9_token_struct vp9_i8x8_mode_encodings [VP9_I8X8_MODES];
|
||||
struct vp9_token_struct vp9_mbsplit_encodings [VP9_NUMMBSPLITS];
|
||||
|
||||
struct vp8_token_struct vp9_mv_ref_encoding_array [VP8_MVREFS];
|
||||
struct vp9_token_struct vp9_mv_ref_encoding_array [VP9_MVREFS];
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
struct vp8_token_struct vp9_sb_mv_ref_encoding_array [VP8_MVREFS];
|
||||
struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS];
|
||||
#endif
|
||||
struct vp8_token_struct vp9_sub_mv_ref_encoding_array [VP8_SUBMVREFS];
|
||||
struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS];
|
||||
|
||||
|
||||
|
||||
void vp9_init_mbmode_probs(VP9_COMMON *x) {
|
||||
unsigned int bct [VP8_YMODES] [2]; /* num Ymodes > num UV modes */
|
||||
unsigned int bct [VP9_YMODES] [2]; /* num Ymodes > num UV modes */
|
||||
|
||||
vp9_tree_probs_from_distribution(VP8_YMODES, vp9_ymode_encodings,
|
||||
vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings,
|
||||
vp9_ymode_tree, x->fc.ymode_prob, bct, y_mode_cts, 256, 1);
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_YMODES, vp9_kf_ymode_encodings, vp9_kf_ymode_tree,
|
||||
VP9_YMODES, vp9_kf_ymode_encodings, vp9_kf_ymode_tree,
|
||||
x->kf_ymode_prob[i], bct, kf_y_mode_cts[i],
|
||||
256, 1);
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_I32X32_MODES, vp9_sb_kf_ymode_encodings, vp8_sb_ymode_tree,
|
||||
VP9_I32X32_MODES, vp9_sb_kf_ymode_encodings, vp9_sb_ymode_tree,
|
||||
x->sb_kf_ymode_prob[i], bct, kf_y_mode_cts[i],
|
||||
256, 1);
|
||||
#endif
|
||||
@ -282,20 +282,20 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) {
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < VP8_YMODES; i++) {
|
||||
for (i = 0; i < VP9_YMODES; i++) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
x->kf_uv_mode_prob[i], bct, kf_uv_mode_cts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
x->fc.uv_mode_prob[i], bct, uv_mode_cts[i],
|
||||
256, 1);
|
||||
}
|
||||
}
|
||||
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree,
|
||||
VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree,
|
||||
x->fc.i8x8_mode_prob, bct, i8x8_mode_cts,
|
||||
256, 1);
|
||||
|
||||
@ -307,20 +307,20 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) {
|
||||
|
||||
|
||||
static void intra_bmode_probs_from_distribution(
|
||||
vp8_prob p [VP8_BINTRAMODES - 1],
|
||||
unsigned int branch_ct [VP8_BINTRAMODES - 1] [2],
|
||||
const unsigned int events [VP8_BINTRAMODES]) {
|
||||
vp9_tree_probs_from_distribution(VP8_BINTRAMODES, vp9_bmode_encodings,
|
||||
vp9_prob p [VP9_BINTRAMODES - 1],
|
||||
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2],
|
||||
const unsigned int events [VP9_BINTRAMODES]) {
|
||||
vp9_tree_probs_from_distribution(VP9_BINTRAMODES, vp9_bmode_encodings,
|
||||
vp9_bmode_tree, p, branch_ct, events, 256, 1);
|
||||
}
|
||||
|
||||
void vp9_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES - 1]) {
|
||||
unsigned int branch_ct [VP8_BINTRAMODES - 1] [2];
|
||||
void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) {
|
||||
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2];
|
||||
intra_bmode_probs_from_distribution(p, branch_ct, bmode_cts);
|
||||
}
|
||||
|
||||
void vp9_kf_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES - 1]) {
|
||||
unsigned int branch_ct [VP8_BINTRAMODES - 1] [2];
|
||||
void vp9_kf_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1]) {
|
||||
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2];
|
||||
|
||||
int i = 0;
|
||||
|
||||
@ -331,35 +331,35 @@ void vp9_kf_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES] [VP8_BINTRAMODES] [
|
||||
intra_bmode_probs_from_distribution(
|
||||
p[i][j], branch_ct, vp9_kf_default_bmode_counts[i][j]);
|
||||
|
||||
} while (++j < VP8_BINTRAMODES);
|
||||
} while (++i < VP8_BINTRAMODES);
|
||||
} while (++j < VP9_BINTRAMODES);
|
||||
} while (++i < VP9_BINTRAMODES);
|
||||
}
|
||||
|
||||
#if VP8_SWITCHABLE_FILTERS == 3
|
||||
const vp8_tree_index vp9_switchable_interp_tree[VP8_SWITCHABLE_FILTERS*2-2] = {
|
||||
#if VP9_SWITCHABLE_FILTERS == 3
|
||||
const vp9_tree_index vp9_switchable_interp_tree[VP9_SWITCHABLE_FILTERS*2-2] = {
|
||||
-0, 2,
|
||||
-1, -2
|
||||
};
|
||||
struct vp8_token_struct vp9_switchable_interp_encodings[VP8_SWITCHABLE_FILTERS];
|
||||
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP8_SWITCHABLE_FILTERS] = {
|
||||
struct vp9_token_struct vp9_switchable_interp_encodings[VP9_SWITCHABLE_FILTERS];
|
||||
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP9_SWITCHABLE_FILTERS] = {
|
||||
EIGHTTAP, SIXTAP, EIGHTTAP_SHARP};
|
||||
const int vp9_switchable_interp_map[SWITCHABLE+1] = {1, -1, 0, 2, -1};
|
||||
const vp8_prob vp9_switchable_interp_prob [VP8_SWITCHABLE_FILTERS+1]
|
||||
[VP8_SWITCHABLE_FILTERS-1] = {
|
||||
const vp9_prob vp9_switchable_interp_prob [VP9_SWITCHABLE_FILTERS+1]
|
||||
[VP9_SWITCHABLE_FILTERS-1] = {
|
||||
{248, 192}, { 32, 248}, { 32, 32}, {192, 160}
|
||||
};
|
||||
#elif VP8_SWITCHABLE_FILTERS == 2
|
||||
const vp8_tree_index vp9_switchable_interp_tree[VP8_SWITCHABLE_FILTERS*2-2] = {
|
||||
#elif VP9_SWITCHABLE_FILTERS == 2
|
||||
const vp9_tree_index vp9_switchable_interp_tree[VP9_SWITCHABLE_FILTERS*2-2] = {
|
||||
-0, -1,
|
||||
};
|
||||
struct vp8_token_struct vp9_switchable_interp_encodings[VP8_SWITCHABLE_FILTERS];
|
||||
const vp8_prob vp9_switchable_interp_prob [VP8_SWITCHABLE_FILTERS+1]
|
||||
[VP8_SWITCHABLE_FILTERS-1] = {
|
||||
struct vp9_token_struct vp9_switchable_interp_encodings[VP9_SWITCHABLE_FILTERS];
|
||||
const vp9_prob vp9_switchable_interp_prob [VP9_SWITCHABLE_FILTERS+1]
|
||||
[VP9_SWITCHABLE_FILTERS-1] = {
|
||||
{248},
|
||||
{ 64},
|
||||
{192},
|
||||
};
|
||||
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP8_SWITCHABLE_FILTERS] = {
|
||||
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP9_SWITCHABLE_FILTERS] = {
|
||||
EIGHTTAP, EIGHTTAP_SHARP};
|
||||
const int vp9_switchable_interp_map[SWITCHABLE+1] = {-1, -1, 0, 1, -1}; //8, 8s
|
||||
#endif
|
||||
@ -369,7 +369,7 @@ void vp9_entropy_mode_init() {
|
||||
vp9_tokens_from_tree(vp9_ymode_encodings, vp9_ymode_tree);
|
||||
vp9_tokens_from_tree(vp9_kf_ymode_encodings, vp9_kf_ymode_tree);
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
vp9_tokens_from_tree(vp9_sb_kf_ymode_encodings, vp8_sb_ymode_tree);
|
||||
vp9_tokens_from_tree(vp9_sb_kf_ymode_encodings, vp9_sb_ymode_tree);
|
||||
#endif
|
||||
vp9_tokens_from_tree(vp9_uv_mode_encodings, vp9_uv_mode_tree);
|
||||
vp9_tokens_from_tree(vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree);
|
||||
@ -492,51 +492,51 @@ void print_mode_contexts(VP9_COMMON *pc) {
|
||||
void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
int i, t, count, factor;
|
||||
unsigned int branch_ct[32][2];
|
||||
vp8_prob ymode_probs[VP8_YMODES - 1];
|
||||
vp8_prob uvmode_probs[VP8_UV_MODES - 1];
|
||||
vp8_prob bmode_probs[VP8_BINTRAMODES - 1];
|
||||
vp8_prob i8x8_mode_probs[VP8_I8X8_MODES - 1];
|
||||
vp8_prob sub_mv_ref_probs[VP8_SUBMVREFS - 1];
|
||||
vp8_prob mbsplit_probs[VP8_NUMMBSPLITS - 1];
|
||||
vp9_prob ymode_probs[VP9_YMODES - 1];
|
||||
vp9_prob uvmode_probs[VP9_UV_MODES - 1];
|
||||
vp9_prob bmode_probs[VP9_BINTRAMODES - 1];
|
||||
vp9_prob i8x8_mode_probs[VP9_I8X8_MODES - 1];
|
||||
vp9_prob sub_mv_ref_probs[VP9_SUBMVREFS - 1];
|
||||
vp9_prob mbsplit_probs[VP9_NUMMBSPLITS - 1];
|
||||
#ifdef MODE_COUNT_TESTING
|
||||
printf("static const unsigned int\nymode_counts"
|
||||
"[VP8_YMODES] = {\n");
|
||||
for (t = 0; t < VP8_YMODES; ++t) printf("%d, ", cm->fc.ymode_counts[t]);
|
||||
"[VP9_YMODES] = {\n");
|
||||
for (t = 0; t < VP9_YMODES; ++t) printf("%d, ", cm->fc.ymode_counts[t]);
|
||||
printf("};\n");
|
||||
printf("static const unsigned int\nuv_mode_counts"
|
||||
"[VP8_YMODES] [VP8_UV_MODES] = {\n");
|
||||
for (i = 0; i < VP8_YMODES; ++i) {
|
||||
"[VP9_YMODES] [VP9_UV_MODES] = {\n");
|
||||
for (i = 0; i < VP9_YMODES; ++i) {
|
||||
printf(" {");
|
||||
for (t = 0; t < VP8_UV_MODES; ++t) printf("%d, ", cm->fc.uv_mode_counts[i][t]);
|
||||
for (t = 0; t < VP9_UV_MODES; ++t) printf("%d, ", cm->fc.uv_mode_counts[i][t]);
|
||||
printf("},\n");
|
||||
}
|
||||
printf("};\n");
|
||||
printf("static const unsigned int\nbmode_counts"
|
||||
"[VP8_BINTRAMODES] = {\n");
|
||||
for (t = 0; t < VP8_BINTRAMODES; ++t) printf("%d, ", cm->fc.bmode_counts[t]);
|
||||
"[VP9_BINTRAMODES] = {\n");
|
||||
for (t = 0; t < VP9_BINTRAMODES; ++t) printf("%d, ", cm->fc.bmode_counts[t]);
|
||||
printf("};\n");
|
||||
printf("static const unsigned int\ni8x8_mode_counts"
|
||||
"[VP8_I8X8_MODES] = {\n");
|
||||
for (t = 0; t < VP8_I8X8_MODES; ++t) printf("%d, ", cm->fc.i8x8_mode_counts[t]);
|
||||
"[VP9_I8X8_MODES] = {\n");
|
||||
for (t = 0; t < VP9_I8X8_MODES; ++t) printf("%d, ", cm->fc.i8x8_mode_counts[t]);
|
||||
printf("};\n");
|
||||
printf("static const unsigned int\nsub_mv_ref_counts"
|
||||
"[SUBMVREF_COUNT] [VP8_SUBMVREFS] = {\n");
|
||||
"[SUBMVREF_COUNT] [VP9_SUBMVREFS] = {\n");
|
||||
for (i = 0; i < SUBMVREF_COUNT; ++i) {
|
||||
printf(" {");
|
||||
for (t = 0; t < VP8_SUBMVREFS; ++t) printf("%d, ", cm->fc.sub_mv_ref_counts[i][t]);
|
||||
for (t = 0; t < VP9_SUBMVREFS; ++t) printf("%d, ", cm->fc.sub_mv_ref_counts[i][t]);
|
||||
printf("},\n");
|
||||
}
|
||||
printf("};\n");
|
||||
printf("static const unsigned int\nmbsplit_counts"
|
||||
"[VP8_NUMMBSPLITS] = {\n");
|
||||
for (t = 0; t < VP8_NUMMBSPLITS; ++t) printf("%d, ", cm->fc.mbsplit_counts[t]);
|
||||
"[VP9_NUMMBSPLITS] = {\n");
|
||||
for (t = 0; t < VP9_NUMMBSPLITS; ++t) printf("%d, ", cm->fc.mbsplit_counts[t]);
|
||||
printf("};\n");
|
||||
#endif
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_YMODES, vp9_ymode_encodings, vp9_ymode_tree,
|
||||
VP9_YMODES, vp9_ymode_encodings, vp9_ymode_tree,
|
||||
ymode_probs, branch_ct, cm->fc.ymode_counts,
|
||||
256, 1);
|
||||
for (t = 0; t < VP8_YMODES - 1; ++t) {
|
||||
for (t = 0; t < VP9_YMODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count;
|
||||
@ -547,12 +547,12 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else if (prob > 255) cm->fc.ymode_prob[t] = 255;
|
||||
else cm->fc.ymode_prob[t] = prob;
|
||||
}
|
||||
for (i = 0; i < VP8_YMODES; ++i) {
|
||||
for (i = 0; i < VP9_YMODES; ++i) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
uvmode_probs, branch_ct, cm->fc.uv_mode_counts[i],
|
||||
256, 1);
|
||||
for (t = 0; t < VP8_UV_MODES - 1; ++t) {
|
||||
for (t = 0; t < VP9_UV_MODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count;
|
||||
@ -565,10 +565,10 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
}
|
||||
}
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_BINTRAMODES, vp9_bmode_encodings, vp9_bmode_tree,
|
||||
VP9_BINTRAMODES, vp9_bmode_encodings, vp9_bmode_tree,
|
||||
bmode_probs, branch_ct, cm->fc.bmode_counts,
|
||||
256, 1);
|
||||
for (t = 0; t < VP8_BINTRAMODES - 1; ++t) {
|
||||
for (t = 0; t < VP9_BINTRAMODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count;
|
||||
@ -580,10 +580,10 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else cm->fc.bmode_prob[t] = prob;
|
||||
}
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree,
|
||||
VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree,
|
||||
i8x8_mode_probs, branch_ct, cm->fc.i8x8_mode_counts,
|
||||
256, 1);
|
||||
for (t = 0; t < VP8_I8X8_MODES - 1; ++t) {
|
||||
for (t = 0; t < VP9_I8X8_MODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count;
|
||||
@ -596,10 +596,10 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
}
|
||||
for (i = 0; i < SUBMVREF_COUNT; ++i) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_SUBMVREFS, vp9_sub_mv_ref_encoding_array, vp9_sub_mv_ref_tree,
|
||||
VP9_SUBMVREFS, vp9_sub_mv_ref_encoding_array, vp9_sub_mv_ref_tree,
|
||||
sub_mv_ref_probs, branch_ct, cm->fc.sub_mv_ref_counts[i],
|
||||
256, 1);
|
||||
for (t = 0; t < VP8_SUBMVREFS - 1; ++t) {
|
||||
for (t = 0; t < VP9_SUBMVREFS - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count;
|
||||
@ -612,10 +612,10 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
}
|
||||
}
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP8_NUMMBSPLITS, vp9_mbsplit_encodings, vp9_mbsplit_tree,
|
||||
VP9_NUMMBSPLITS, vp9_mbsplit_encodings, vp9_mbsplit_tree,
|
||||
mbsplit_probs, branch_ct, cm->fc.mbsplit_counts,
|
||||
256, 1);
|
||||
for (t = 0; t < VP8_NUMMBSPLITS - 1; ++t) {
|
||||
for (t = 0; t < VP9_NUMMBSPLITS - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count;
|
||||
|
@ -16,50 +16,50 @@
|
||||
#include "treecoder.h"
|
||||
|
||||
#define SUBMVREF_COUNT 5
|
||||
#define VP8_NUMMBSPLITS 4
|
||||
#define VP9_NUMMBSPLITS 4
|
||||
|
||||
typedef const int vp9_mbsplit[16];
|
||||
|
||||
extern vp9_mbsplit vp9_mbsplits [VP8_NUMMBSPLITS];
|
||||
extern vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS];
|
||||
|
||||
extern const int vp9_mbsplit_count [VP8_NUMMBSPLITS]; /* # of subsets */
|
||||
extern const int vp9_mbsplit_count [VP9_NUMMBSPLITS]; /* # of subsets */
|
||||
|
||||
extern const vp8_prob vp9_mbsplit_probs [VP8_NUMMBSPLITS - 1];
|
||||
extern const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1];
|
||||
|
||||
extern int vp9_mv_cont(const int_mv *l, const int_mv *a);
|
||||
|
||||
extern const vp8_prob vp9_sub_mv_ref_prob [VP8_SUBMVREFS - 1];
|
||||
extern const vp8_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP8_SUBMVREFS - 1];
|
||||
extern const vp9_prob vp9_sub_mv_ref_prob [VP9_SUBMVREFS - 1];
|
||||
extern const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
|
||||
|
||||
|
||||
extern const unsigned int vp9_kf_default_bmode_counts[VP8_BINTRAMODES][VP8_BINTRAMODES][VP8_BINTRAMODES];
|
||||
extern const unsigned int vp9_kf_default_bmode_counts[VP9_BINTRAMODES][VP9_BINTRAMODES][VP9_BINTRAMODES];
|
||||
|
||||
|
||||
extern const vp8_tree_index vp9_bmode_tree[];
|
||||
extern const vp9_tree_index vp9_bmode_tree[];
|
||||
|
||||
extern const vp8_tree_index vp9_ymode_tree[];
|
||||
extern const vp8_tree_index vp9_kf_ymode_tree[];
|
||||
extern const vp8_tree_index vp9_uv_mode_tree[];
|
||||
#define vp8_sb_ymode_tree vp9_uv_mode_tree
|
||||
extern const vp8_tree_index vp9_i8x8_mode_tree[];
|
||||
extern const vp8_tree_index vp9_mbsplit_tree[];
|
||||
extern const vp8_tree_index vp9_mv_ref_tree[];
|
||||
extern const vp8_tree_index vp9_sb_mv_ref_tree[];
|
||||
extern const vp8_tree_index vp9_sub_mv_ref_tree[];
|
||||
extern const vp9_tree_index vp9_ymode_tree[];
|
||||
extern const vp9_tree_index vp9_kf_ymode_tree[];
|
||||
extern const vp9_tree_index vp9_uv_mode_tree[];
|
||||
#define vp9_sb_ymode_tree vp9_uv_mode_tree
|
||||
extern const vp9_tree_index vp9_i8x8_mode_tree[];
|
||||
extern const vp9_tree_index vp9_mbsplit_tree[];
|
||||
extern const vp9_tree_index vp9_mv_ref_tree[];
|
||||
extern const vp9_tree_index vp9_sb_mv_ref_tree[];
|
||||
extern const vp9_tree_index vp9_sub_mv_ref_tree[];
|
||||
|
||||
extern struct vp8_token_struct vp9_bmode_encodings [VP8_BINTRAMODES];
|
||||
extern struct vp8_token_struct vp9_ymode_encodings [VP8_YMODES];
|
||||
extern struct vp8_token_struct vp9_sb_kf_ymode_encodings [VP8_I32X32_MODES];
|
||||
extern struct vp8_token_struct vp9_kf_ymode_encodings [VP8_YMODES];
|
||||
extern struct vp8_token_struct vp9_i8x8_mode_encodings [VP8_I8X8_MODES];
|
||||
extern struct vp8_token_struct vp9_uv_mode_encodings [VP8_UV_MODES];
|
||||
extern struct vp8_token_struct vp9_mbsplit_encodings [VP8_NUMMBSPLITS];
|
||||
extern struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES];
|
||||
extern struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES];
|
||||
extern struct vp9_token_struct vp9_sb_kf_ymode_encodings [VP9_I32X32_MODES];
|
||||
extern struct vp9_token_struct vp9_kf_ymode_encodings [VP9_YMODES];
|
||||
extern struct vp9_token_struct vp9_i8x8_mode_encodings [VP9_I8X8_MODES];
|
||||
extern struct vp9_token_struct vp9_uv_mode_encodings [VP9_UV_MODES];
|
||||
extern struct vp9_token_struct vp9_mbsplit_encodings [VP9_NUMMBSPLITS];
|
||||
|
||||
/* Inter mode values do not start at zero */
|
||||
|
||||
extern struct vp8_token_struct vp9_mv_ref_encoding_array [VP8_MVREFS];
|
||||
extern struct vp8_token_struct vp9_sb_mv_ref_encoding_array [VP8_MVREFS];
|
||||
extern struct vp8_token_struct vp9_sub_mv_ref_encoding_array [VP8_SUBMVREFS];
|
||||
extern struct vp9_token_struct vp9_mv_ref_encoding_array [VP9_MVREFS];
|
||||
extern struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS];
|
||||
extern struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS];
|
||||
|
||||
void vp9_entropy_mode_init(void);
|
||||
|
||||
@ -71,19 +71,19 @@ extern void vp9_accum_mv_refs(struct VP9Common *pc,
|
||||
MB_PREDICTION_MODE m,
|
||||
const int ct[4]);
|
||||
|
||||
void vp9_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES - 1]);
|
||||
void vp9_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES - 1]);
|
||||
void vp9_default_bmode_probs(vp9_prob dest [VP9_BINTRAMODES - 1]);
|
||||
void vp9_kf_default_bmode_probs(vp9_prob dest [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1]);
|
||||
|
||||
void vp9_adapt_mode_probs(struct VP9Common *);
|
||||
|
||||
#define VP8_SWITCHABLE_FILTERS 2 /* number of switchable filters */
|
||||
#define VP9_SWITCHABLE_FILTERS 2 /* number of switchable filters */
|
||||
extern const INTERPOLATIONFILTERTYPE vp9_switchable_interp
|
||||
[VP8_SWITCHABLE_FILTERS];
|
||||
[VP9_SWITCHABLE_FILTERS];
|
||||
extern const int vp9_switchable_interp_map[SWITCHABLE + 1];
|
||||
extern const vp8_tree_index vp9_switchable_interp_tree
|
||||
[2*(VP8_SWITCHABLE_FILTERS - 1)];
|
||||
extern struct vp8_token_struct vp9_switchable_interp_encodings
|
||||
[VP8_SWITCHABLE_FILTERS];
|
||||
extern const vp8_prob vp9_switchable_interp_prob
|
||||
[VP8_SWITCHABLE_FILTERS + 1][VP8_SWITCHABLE_FILTERS - 1];
|
||||
extern const vp9_tree_index vp9_switchable_interp_tree
|
||||
[2*(VP9_SWITCHABLE_FILTERS - 1)];
|
||||
extern struct vp9_token_struct vp9_switchable_interp_encodings
|
||||
[VP9_SWITCHABLE_FILTERS];
|
||||
extern const vp9_prob vp9_switchable_interp_prob
|
||||
[VP9_SWITCHABLE_FILTERS + 1][VP9_SWITCHABLE_FILTERS - 1];
|
||||
#endif
|
||||
|
@ -28,14 +28,14 @@
|
||||
/* Smooth or bias the mv-counts before prob computation */
|
||||
/* #define SMOOTH_MV_COUNTS */
|
||||
|
||||
const vp8_tree_index vp9_mv_joint_tree[2 * MV_JOINTS - 2] = {
|
||||
const vp9_tree_index vp9_mv_joint_tree[2 * MV_JOINTS - 2] = {
|
||||
-MV_JOINT_ZERO, 2,
|
||||
-MV_JOINT_HNZVZ, 4,
|
||||
-MV_JOINT_HZVNZ, -MV_JOINT_HNZVNZ
|
||||
};
|
||||
struct vp8_token_struct vp9_mv_joint_encodings[MV_JOINTS];
|
||||
struct vp9_token_struct vp9_mv_joint_encodings[MV_JOINTS];
|
||||
|
||||
const vp8_tree_index vp9_mv_class_tree[2 * MV_CLASSES - 2] = {
|
||||
const vp9_tree_index vp9_mv_class_tree[2 * MV_CLASSES - 2] = {
|
||||
-MV_CLASS_0, 2,
|
||||
-MV_CLASS_1, 4,
|
||||
6, 8,
|
||||
@ -44,19 +44,19 @@ const vp8_tree_index vp9_mv_class_tree[2 * MV_CLASSES - 2] = {
|
||||
-MV_CLASS_4, -MV_CLASS_5,
|
||||
-MV_CLASS_6, -MV_CLASS_7,
|
||||
};
|
||||
struct vp8_token_struct vp9_mv_class_encodings[MV_CLASSES];
|
||||
struct vp9_token_struct vp9_mv_class_encodings[MV_CLASSES];
|
||||
|
||||
const vp8_tree_index vp9_mv_class0_tree [2 * CLASS0_SIZE - 2] = {
|
||||
const vp9_tree_index vp9_mv_class0_tree [2 * CLASS0_SIZE - 2] = {
|
||||
-0, -1,
|
||||
};
|
||||
struct vp8_token_struct vp9_mv_class0_encodings[CLASS0_SIZE];
|
||||
struct vp9_token_struct vp9_mv_class0_encodings[CLASS0_SIZE];
|
||||
|
||||
const vp8_tree_index vp9_mv_fp_tree [2 * 4 - 2] = {
|
||||
const vp9_tree_index vp9_mv_fp_tree [2 * 4 - 2] = {
|
||||
-0, 2,
|
||||
-1, 4,
|
||||
-2, -3
|
||||
};
|
||||
struct vp8_token_struct vp9_mv_fp_encodings[4];
|
||||
struct vp9_token_struct vp9_mv_fp_encodings[4];
|
||||
|
||||
const nmv_context vp9_default_nmv_context = {
|
||||
{32, 64, 96},
|
||||
@ -211,7 +211,7 @@ void vp9_increment_nmv(const MV *mv, const MV *ref, nmv_context_counts *mvctx,
|
||||
}
|
||||
}
|
||||
|
||||
static void adapt_prob(vp8_prob *dest, vp8_prob prep, vp8_prob newp,
|
||||
static void adapt_prob(vp9_prob *dest, vp9_prob prep, vp9_prob newp,
|
||||
unsigned int ct[2]) {
|
||||
int factor;
|
||||
int prob;
|
||||
|
@ -20,13 +20,11 @@ struct VP9Common;
|
||||
|
||||
void vp9_entropy_mv_init();
|
||||
void vp9_init_mv_probs(struct VP9Common *cm);
|
||||
void vp8_adapt_mv_probs(struct VP9Common *cm);
|
||||
|
||||
void vp9_adapt_nmv_probs(struct VP9Common *cm, int usehp);
|
||||
void vp8_lower_mv_precision(MV *mv);
|
||||
int vp9_use_nmv_hp(const MV *ref);
|
||||
|
||||
#define VP8_NMV_UPDATE_PROB 255
|
||||
#define VP9_NMV_UPDATE_PROB 255
|
||||
//#define MV_GROUP_UPDATE
|
||||
|
||||
#define LOW_PRECISION_MV_UPDATE /* Use 7 bit forward update */
|
||||
@ -40,8 +38,8 @@ typedef enum {
|
||||
MV_JOINT_HNZVNZ = 3, /* Both components nonzero */
|
||||
} MV_JOINT_TYPE;
|
||||
|
||||
extern const vp8_tree_index vp9_mv_joint_tree[2 * MV_JOINTS - 2];
|
||||
extern struct vp8_token_struct vp9_mv_joint_encodings [MV_JOINTS];
|
||||
extern const vp9_tree_index vp9_mv_joint_tree[2 * MV_JOINTS - 2];
|
||||
extern struct vp9_token_struct vp9_mv_joint_encodings [MV_JOINTS];
|
||||
|
||||
/* Symbols for coding magnitude class of nonzero components */
|
||||
#define MV_CLASSES 8
|
||||
@ -56,8 +54,8 @@ typedef enum {
|
||||
MV_CLASS_7 = 7, /* (128, 256] integer pel */
|
||||
} MV_CLASS_TYPE;
|
||||
|
||||
extern const vp8_tree_index vp9_mv_class_tree[2 * MV_CLASSES - 2];
|
||||
extern struct vp8_token_struct vp9_mv_class_encodings [MV_CLASSES];
|
||||
extern const vp9_tree_index vp9_mv_class_tree[2 * MV_CLASSES - 2];
|
||||
extern struct vp9_token_struct vp9_mv_class_encodings [MV_CLASSES];
|
||||
|
||||
#define CLASS0_BITS 1 /* bits at integer precision for class 0 */
|
||||
#define CLASS0_SIZE (1 << CLASS0_BITS)
|
||||
@ -67,25 +65,25 @@ extern struct vp8_token_struct vp9_mv_class_encodings [MV_CLASSES];
|
||||
#define MV_MAX ((1 << MV_MAX_BITS) - 1)
|
||||
#define MV_VALS ((MV_MAX << 1) + 1)
|
||||
|
||||
extern const vp8_tree_index vp9_mv_class0_tree[2 * CLASS0_SIZE - 2];
|
||||
extern struct vp8_token_struct vp9_mv_class0_encodings[CLASS0_SIZE];
|
||||
extern const vp9_tree_index vp9_mv_class0_tree[2 * CLASS0_SIZE - 2];
|
||||
extern struct vp9_token_struct vp9_mv_class0_encodings[CLASS0_SIZE];
|
||||
|
||||
extern const vp8_tree_index vp9_mv_fp_tree[2 * 4 - 2];
|
||||
extern struct vp8_token_struct vp9_mv_fp_encodings[4];
|
||||
extern const vp9_tree_index vp9_mv_fp_tree[2 * 4 - 2];
|
||||
extern struct vp9_token_struct vp9_mv_fp_encodings[4];
|
||||
|
||||
typedef struct {
|
||||
vp8_prob sign;
|
||||
vp8_prob classes[MV_CLASSES - 1];
|
||||
vp8_prob class0[CLASS0_SIZE - 1];
|
||||
vp8_prob bits[MV_OFFSET_BITS];
|
||||
vp8_prob class0_fp[CLASS0_SIZE][4 - 1];
|
||||
vp8_prob fp[4 - 1];
|
||||
vp8_prob class0_hp;
|
||||
vp8_prob hp;
|
||||
vp9_prob sign;
|
||||
vp9_prob classes[MV_CLASSES - 1];
|
||||
vp9_prob class0[CLASS0_SIZE - 1];
|
||||
vp9_prob bits[MV_OFFSET_BITS];
|
||||
vp9_prob class0_fp[CLASS0_SIZE][4 - 1];
|
||||
vp9_prob fp[4 - 1];
|
||||
vp9_prob class0_hp;
|
||||
vp9_prob hp;
|
||||
} nmv_component;
|
||||
|
||||
typedef struct {
|
||||
vp8_prob joints[MV_JOINTS - 1];
|
||||
vp9_prob joints[MV_JOINTS - 1];
|
||||
nmv_component comps[2];
|
||||
} nmv_context;
|
||||
|
||||
|
@ -148,23 +148,23 @@ static void filter_block2d_first_pass_6
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
|
||||
for (i = 0; i < output_height; i++) {
|
||||
for (j = 0; j < output_width; j++) {
|
||||
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
|
||||
((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
|
||||
((int)src_ptr[0] * vp8_filter[2]) +
|
||||
((int)src_ptr[pixel_step] * vp8_filter[3]) +
|
||||
((int)src_ptr[2 * pixel_step] * vp8_filter[4]) +
|
||||
((int)src_ptr[3 * pixel_step] * vp8_filter[5]) +
|
||||
(VP8_FILTER_WEIGHT >> 1); /* Rounding */
|
||||
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) +
|
||||
((int)src_ptr[-1 * (int)pixel_step] * vp9_filter[1]) +
|
||||
((int)src_ptr[0] * vp9_filter[2]) +
|
||||
((int)src_ptr[pixel_step] * vp9_filter[3]) +
|
||||
((int)src_ptr[2 * pixel_step] * vp9_filter[4]) +
|
||||
((int)src_ptr[3 * pixel_step] * vp9_filter[5]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); /* Rounding */
|
||||
|
||||
/* Normalize back to 0-255 */
|
||||
Temp = Temp >> VP8_FILTER_SHIFT;
|
||||
Temp = Temp >> VP9_FILTER_SHIFT;
|
||||
|
||||
if (Temp < 0)
|
||||
Temp = 0;
|
||||
@ -190,7 +190,7 @@ static void filter_block2d_second_pass_6
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
@ -198,16 +198,16 @@ static void filter_block2d_second_pass_6
|
||||
for (i = 0; i < output_height; i++) {
|
||||
for (j = 0; j < output_width; j++) {
|
||||
/* Apply filter */
|
||||
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
|
||||
((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
|
||||
((int)src_ptr[0] * vp8_filter[2]) +
|
||||
((int)src_ptr[pixel_step] * vp8_filter[3]) +
|
||||
((int)src_ptr[2 * pixel_step] * vp8_filter[4]) +
|
||||
((int)src_ptr[3 * pixel_step] * vp8_filter[5]) +
|
||||
(VP8_FILTER_WEIGHT >> 1); /* Rounding */
|
||||
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) +
|
||||
((int)src_ptr[-1 * (int)pixel_step] * vp9_filter[1]) +
|
||||
((int)src_ptr[0] * vp9_filter[2]) +
|
||||
((int)src_ptr[pixel_step] * vp9_filter[3]) +
|
||||
((int)src_ptr[2 * pixel_step] * vp9_filter[4]) +
|
||||
((int)src_ptr[3 * pixel_step] * vp9_filter[5]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); /* Rounding */
|
||||
|
||||
/* Normalize back to 0-255 */
|
||||
Temp = Temp >> VP8_FILTER_SHIFT;
|
||||
Temp = Temp >> VP9_FILTER_SHIFT;
|
||||
|
||||
if (Temp < 0)
|
||||
Temp = 0;
|
||||
@ -241,7 +241,7 @@ static void filter_block2d_second_pass_avg_6
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
@ -249,16 +249,16 @@ static void filter_block2d_second_pass_avg_6
|
||||
for (i = 0; i < output_height; i++) {
|
||||
for (j = 0; j < output_width; j++) {
|
||||
/* Apply filter */
|
||||
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
|
||||
((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
|
||||
((int)src_ptr[0] * vp8_filter[2]) +
|
||||
((int)src_ptr[pixel_step] * vp8_filter[3]) +
|
||||
((int)src_ptr[2 * pixel_step] * vp8_filter[4]) +
|
||||
((int)src_ptr[3 * pixel_step] * vp8_filter[5]) +
|
||||
(VP8_FILTER_WEIGHT >> 1); /* Rounding */
|
||||
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) +
|
||||
((int)src_ptr[-1 * (int)pixel_step] * vp9_filter[1]) +
|
||||
((int)src_ptr[0] * vp9_filter[2]) +
|
||||
((int)src_ptr[pixel_step] * vp9_filter[3]) +
|
||||
((int)src_ptr[2 * pixel_step] * vp9_filter[4]) +
|
||||
((int)src_ptr[3 * pixel_step] * vp9_filter[5]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); /* Rounding */
|
||||
|
||||
/* Normalize back to 0-255 */
|
||||
Temp = Temp >> VP8_FILTER_SHIFT;
|
||||
Temp = Temp >> VP9_FILTER_SHIFT;
|
||||
|
||||
if (Temp < 0)
|
||||
Temp = 0;
|
||||
@ -510,13 +510,13 @@ static const unsigned int filter_size_to_wh[][2] = {
|
||||
static const unsigned int filter_max_height = 16;
|
||||
static const unsigned int filter_max_width = 16;
|
||||
|
||||
static void vp8_filter_block2d_8_c
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter, const short *VFilter,
|
||||
const filter_size_t filter_size,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
static void filter_block2d_8_c(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *HFilter,
|
||||
const short *VFilter,
|
||||
const filter_size_t filter_size,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
const unsigned int output_width = filter_size_to_wh[filter_size][0];
|
||||
const unsigned int output_height = filter_size_to_wh[filter_size][1];
|
||||
|
||||
@ -554,10 +554,10 @@ static void vp8_filter_block2d_8_c
|
||||
((int)src_ptr[5] * HFilter[5]) +
|
||||
((int)src_ptr[6] * HFilter[6]) +
|
||||
((int)src_ptr[7] * HFilter[7]) +
|
||||
(VP8_FILTER_WEIGHT >> 1); // Rounding
|
||||
(VP9_FILTER_WEIGHT >> 1); // Rounding
|
||||
|
||||
// Normalize back to 0-255...
|
||||
temp >>= VP8_FILTER_SHIFT;
|
||||
temp >>= VP9_FILTER_SHIFT;
|
||||
if (temp < 0) {
|
||||
temp = 0;
|
||||
} else if (temp > 255) {
|
||||
@ -588,10 +588,10 @@ static void vp8_filter_block2d_8_c
|
||||
((int)src_ptr[5] * VFilter[5]) +
|
||||
((int)src_ptr[6] * VFilter[6]) +
|
||||
((int)src_ptr[7] * VFilter[7]) +
|
||||
(VP8_FILTER_WEIGHT >> 1); // Rounding
|
||||
(VP9_FILTER_WEIGHT >> 1); // Rounding
|
||||
|
||||
// Normalize back to 0-255...
|
||||
temp >>= VP8_FILTER_SHIFT;
|
||||
temp >>= VP9_FILTER_SHIFT;
|
||||
if (temp < 0) {
|
||||
temp = 0;
|
||||
} else if (temp > 255) {
|
||||
@ -607,58 +607,55 @@ static void vp8_filter_block2d_8_c
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_4x4_8_c
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
vp8_filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_4x4, dst_ptr, dst_stride);
|
||||
void vp9_filter_block2d_4x4_8_c(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *HFilter_aligned16,
|
||||
const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_4x4, dst_ptr, dst_stride);
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_8x4_8_c
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
vp8_filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_8x4, dst_ptr, dst_stride);
|
||||
void vp9_filter_block2d_8x4_8_c(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *HFilter_aligned16,
|
||||
const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_8x4, dst_ptr, dst_stride);
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_8x8_8_c
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
vp8_filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_8x8, dst_ptr, dst_stride);
|
||||
void vp9_filter_block2d_8x8_8_c(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *HFilter_aligned16,
|
||||
const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_8x8, dst_ptr, dst_stride);
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_16x16_8_c
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
vp8_filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_16x16, dst_ptr, dst_stride);
|
||||
void vp9_filter_block2d_16x16_8_c(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *HFilter_aligned16,
|
||||
const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
filter_block2d_8_c(src_ptr, src_stride,
|
||||
HFilter_aligned16, VFilter_aligned16,
|
||||
VPX_FILTER_16x16, dst_ptr, dst_stride);
|
||||
}
|
||||
|
||||
static void vp8_block2d_average_c
|
||||
(
|
||||
unsigned char *src,
|
||||
unsigned int src_stride,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_stride,
|
||||
const filter_size_t filter_size
|
||||
) {
|
||||
static void block2d_average_c(unsigned char *src,
|
||||
unsigned int src_stride,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_stride,
|
||||
const filter_size_t filter_size) {
|
||||
const unsigned int output_width = filter_size_to_wh[filter_size][0];
|
||||
const unsigned int output_height = filter_size_to_wh[filter_size][1];
|
||||
|
||||
@ -671,7 +668,7 @@ static void vp8_block2d_average_c
|
||||
}
|
||||
}
|
||||
|
||||
#define vp8_block2d_average vp8_block2d_average_c
|
||||
#define block2d_average block2d_average_c
|
||||
|
||||
void vp9_eighttap_predict_c
|
||||
(
|
||||
@ -709,7 +706,7 @@ void vp9_eighttap_predict_avg4x4_c
|
||||
vp9_filter_block2d_4x4_8(src_ptr, src_pixels_per_line,
|
||||
HFilter, VFilter,
|
||||
tmp, 4);
|
||||
vp8_block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
|
||||
block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_sharp_c
|
||||
@ -748,7 +745,7 @@ void vp9_eighttap_predict_avg4x4_sharp_c
|
||||
vp9_filter_block2d_4x4_8(src_ptr, src_pixels_per_line,
|
||||
HFilter, VFilter,
|
||||
tmp, 4);
|
||||
vp8_block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
|
||||
block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict8x8_c
|
||||
@ -801,7 +798,7 @@ void vp9_eighttap_predict_avg8x8_c
|
||||
vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line,
|
||||
HFilter, VFilter,
|
||||
tmp, 8);
|
||||
vp8_block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
|
||||
block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg8x8_sharp_c
|
||||
@ -820,7 +817,7 @@ void vp9_eighttap_predict_avg8x8_sharp_c
|
||||
vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line,
|
||||
HFilter, VFilter,
|
||||
tmp, 8);
|
||||
vp8_block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
|
||||
block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict8x4_c
|
||||
@ -908,7 +905,7 @@ void vp9_eighttap_predict_avg16x16_c
|
||||
vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line,
|
||||
HFilter, VFilter,
|
||||
tmp, 16);
|
||||
vp8_block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16);
|
||||
block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg16x16_sharp_c
|
||||
@ -927,7 +924,7 @@ void vp9_eighttap_predict_avg16x16_sharp_c
|
||||
vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line,
|
||||
HFilter, VFilter,
|
||||
tmp, 16);
|
||||
vp8_block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16);
|
||||
block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -938,7 +935,7 @@ void vp9_eighttap_predict_avg16x16_sharp_c
|
||||
* UINT32 src_stride : Stride of source block.
|
||||
* UINT32 height : Block height.
|
||||
* UINT32 width : Block width.
|
||||
* INT32 *vp8_filter : Array of 2 bi-linear filter taps.
|
||||
* INT32 *vp9_filter : Array of 2 bi-linear filter taps.
|
||||
*
|
||||
* OUTPUTS : INT32 *dst_ptr : Pointer to filtered block.
|
||||
*
|
||||
@ -949,7 +946,7 @@ void vp9_eighttap_predict_avg16x16_sharp_c
|
||||
* block. Used to implement first-pass of 2-D separable filter.
|
||||
*
|
||||
* SPECIAL NOTES : Produces INT32 output to retain precision for next pass.
|
||||
* Two filter taps should sum to VP8_FILTER_WEIGHT.
|
||||
* Two filter taps should sum to VP9_FILTER_WEIGHT.
|
||||
*
|
||||
****************************************************************************/
|
||||
static void filter_block2d_bil_first_pass
|
||||
@ -959,16 +956,16 @@ static void filter_block2d_bil_first_pass
|
||||
unsigned int src_stride,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
) {
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
/* Apply bilinear filter */
|
||||
dst_ptr[j] = (((int)src_ptr[0] * vp8_filter[0]) +
|
||||
((int)src_ptr[1] * vp8_filter[1]) +
|
||||
(VP8_FILTER_WEIGHT / 2)) >> VP8_FILTER_SHIFT;
|
||||
dst_ptr[j] = (((int)src_ptr[0] * vp9_filter[0]) +
|
||||
((int)src_ptr[1] * vp9_filter[1]) +
|
||||
(VP9_FILTER_WEIGHT / 2)) >> VP9_FILTER_SHIFT;
|
||||
src_ptr++;
|
||||
}
|
||||
|
||||
@ -986,7 +983,7 @@ static void filter_block2d_bil_first_pass
|
||||
* UINT32 dst_pitch : Destination block pitch.
|
||||
* UINT32 height : Block height.
|
||||
* UINT32 width : Block width.
|
||||
* INT32 *vp8_filter : Array of 2 bi-linear filter taps.
|
||||
* INT32 *vp9_filter : Array of 2 bi-linear filter taps.
|
||||
*
|
||||
* OUTPUTS : UINT16 *dst_ptr : Pointer to filtered block.
|
||||
*
|
||||
@ -997,7 +994,7 @@ static void filter_block2d_bil_first_pass
|
||||
* block. Used to implement second-pass of 2-D separable filter.
|
||||
*
|
||||
* SPECIAL NOTES : Requires 32-bit input as produced by filter_block2d_bil_first_pass.
|
||||
* Two filter taps should sum to VP8_FILTER_WEIGHT.
|
||||
* Two filter taps should sum to VP9_FILTER_WEIGHT.
|
||||
*
|
||||
****************************************************************************/
|
||||
static void filter_block2d_bil_second_pass
|
||||
@ -1007,7 +1004,7 @@ static void filter_block2d_bil_second_pass
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
@ -1015,10 +1012,10 @@ static void filter_block2d_bil_second_pass
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
/* Apply filter */
|
||||
Temp = ((int)src_ptr[0] * vp8_filter[0]) +
|
||||
((int)src_ptr[width] * vp8_filter[1]) +
|
||||
(VP8_FILTER_WEIGHT / 2);
|
||||
dst_ptr[j] = (unsigned int)(Temp >> VP8_FILTER_SHIFT);
|
||||
Temp = ((int)src_ptr[0] * vp9_filter[0]) +
|
||||
((int)src_ptr[width] * vp9_filter[1]) +
|
||||
(VP9_FILTER_WEIGHT / 2);
|
||||
dst_ptr[j] = (unsigned int)(Temp >> VP9_FILTER_SHIFT);
|
||||
src_ptr++;
|
||||
}
|
||||
|
||||
@ -1043,7 +1040,7 @@ static void filter_block2d_bil_second_pass_avg
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
@ -1051,10 +1048,10 @@ static void filter_block2d_bil_second_pass_avg
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
/* Apply filter */
|
||||
Temp = ((int)src_ptr[0] * vp8_filter[0]) +
|
||||
((int)src_ptr[width] * vp8_filter[1]) +
|
||||
(VP8_FILTER_WEIGHT / 2);
|
||||
dst_ptr[j] = (unsigned int)(((Temp >> VP8_FILTER_SHIFT) + dst_ptr[j] + 1) >> 1);
|
||||
Temp = ((int)src_ptr[0] * vp9_filter[0]) +
|
||||
((int)src_ptr[width] * vp9_filter[1]) +
|
||||
(VP9_FILTER_WEIGHT / 2);
|
||||
dst_ptr[j] = (unsigned int)(((Temp >> VP9_FILTER_SHIFT) + dst_ptr[j] + 1) >> 1);
|
||||
src_ptr++;
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include "vpx_scale/yv12config.h"
|
||||
|
||||
#define BLOCK_HEIGHT_WIDTH 4
|
||||
#define VP8_FILTER_WEIGHT 128
|
||||
#define VP8_FILTER_SHIFT 7
|
||||
#define VP9_FILTER_WEIGHT 128
|
||||
#define VP9_FILTER_SHIFT 7
|
||||
|
||||
#define SUBPEL_SHIFTS 16
|
||||
|
||||
|
@ -152,13 +152,13 @@ void vp9_find_near_mvs
|
||||
lower_mv_precision(nearby, xd->allow_high_precision_mv);
|
||||
|
||||
// TODO: move clamp outside findnearmv
|
||||
vp8_clamp_mv2(nearest, xd);
|
||||
vp8_clamp_mv2(nearby, xd);
|
||||
vp8_clamp_mv2(best_mv, xd);
|
||||
clamp_mv2(nearest, xd);
|
||||
clamp_mv2(nearby, xd);
|
||||
clamp_mv2(best_mv, xd);
|
||||
}
|
||||
|
||||
vp8_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
|
||||
vp8_prob p[VP8_MVREFS - 1], const int near_mv_ref_ct[4]
|
||||
vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
|
||||
vp9_prob p[VP9_MVREFS - 1], const int near_mv_ref_ct[4]
|
||||
) {
|
||||
p[0] = pc->fc.vp8_mode_contexts [near_mv_ref_ct[0]] [0];
|
||||
p[1] = pc->fc.vp8_mode_contexts [near_mv_ref_ct[1]] [1];
|
||||
@ -169,7 +169,7 @@ vp8_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
|
||||
|
||||
#if CONFIG_NEWBESTREFMV
|
||||
#define SP(x) (((x) & 7) << 1)
|
||||
unsigned int vp8_sad3x16_c(
|
||||
unsigned int vp9_sad3x16_c(
|
||||
const unsigned char *src_ptr,
|
||||
int src_stride,
|
||||
const unsigned char *ref_ptr,
|
||||
@ -177,7 +177,7 @@ unsigned int vp8_sad3x16_c(
|
||||
int max_sad) {
|
||||
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 3, 16);
|
||||
}
|
||||
unsigned int vp8_sad16x3_c(
|
||||
unsigned int vp9_sad16x3_c(
|
||||
const unsigned char *src_ptr,
|
||||
int src_stride,
|
||||
const unsigned char *ref_ptr,
|
||||
@ -190,7 +190,7 @@ unsigned int vp8_sad16x3_c(
|
||||
* above and a number cols of pixels in the left to select the one with best
|
||||
* score to use as ref motion vector
|
||||
*/
|
||||
void vp8_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
unsigned char *ref_y_buffer,
|
||||
int ref_y_stride,
|
||||
int_mv *mvlist,
|
||||
@ -240,24 +240,24 @@ void vp8_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
|
||||
zero_seen = zero_seen || !this_mv.as_int;
|
||||
|
||||
vp8_clamp_mv(&this_mv,
|
||||
xd->mb_to_left_edge - LEFT_TOP_MARGIN + 24,
|
||||
xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN,
|
||||
xd->mb_to_top_edge - LEFT_TOP_MARGIN + 24,
|
||||
xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
|
||||
clamp_mv(&this_mv,
|
||||
xd->mb_to_left_edge - LEFT_TOP_MARGIN + 24,
|
||||
xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN,
|
||||
xd->mb_to_top_edge - LEFT_TOP_MARGIN + 24,
|
||||
xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
|
||||
#if CONFIG_SUBPELREFMV
|
||||
row_offset = this_mv.as_mv.row >> 3;
|
||||
col_offset = this_mv.as_mv.col >> 3;
|
||||
offset = ref_y_stride * row_offset + col_offset;
|
||||
score = 0;
|
||||
if (xd->up_available) {
|
||||
vp8_sub_pixel_variance16x2_c(above_ref + offset, ref_y_stride,
|
||||
vp9_sub_pixel_variance16x2_c(above_ref + offset, ref_y_stride,
|
||||
SP(this_mv.as_mv.col), SP(this_mv.as_mv.row),
|
||||
above_src, xd->dst.y_stride, &sse);
|
||||
score += sse;
|
||||
}
|
||||
if (xd->left_available) {
|
||||
vp8_sub_pixel_variance2x16_c(left_ref + offset, ref_y_stride,
|
||||
vp9_sub_pixel_variance2x16_c(left_ref + offset, ref_y_stride,
|
||||
SP(this_mv.as_mv.col), SP(this_mv.as_mv.row),
|
||||
left_src, xd->dst.y_stride, &sse);
|
||||
score += sse;
|
||||
@ -270,11 +270,11 @@ void vp8_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
offset = ref_y_stride * row_offset + col_offset;
|
||||
score = 0;
|
||||
if (xd->up_available) {
|
||||
score += vp8_sad16x3(above_src, xd->dst.y_stride,
|
||||
score += vp9_sad16x3(above_src, xd->dst.y_stride,
|
||||
above_ref + offset, ref_y_stride, INT_MAX);
|
||||
}
|
||||
if (xd->left_available) {
|
||||
score += vp8_sad3x16(left_src, xd->dst.y_stride,
|
||||
score += vp9_sad3x16(left_src, xd->dst.y_stride,
|
||||
left_ref + offset, ref_y_stride, INT_MAX);
|
||||
}
|
||||
#endif
|
||||
@ -297,7 +297,7 @@ void vp8_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
// Make sure all the candidates are properly clamped etc
|
||||
for (i = 0; i < 4; ++i) {
|
||||
lower_mv_precision(&sorted_mvs[i], xd->allow_high_precision_mv);
|
||||
vp8_clamp_mv2(&sorted_mvs[i], xd);
|
||||
clamp_mv2(&sorted_mvs[i], xd);
|
||||
}
|
||||
|
||||
// Set the best mv to the first entry in the sorted list
|
||||
|
@ -23,7 +23,7 @@
|
||||
* above and a number cols of pixels in the left to select the one with best
|
||||
* score to use as ref motion vector
|
||||
*/
|
||||
void vp8_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
|
||||
unsigned char *ref_y_buffer,
|
||||
int ref_y_stride,
|
||||
int_mv *mvlist,
|
||||
@ -47,13 +47,11 @@ static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp, co
|
||||
#define LEFT_TOP_MARGIN (16 << 3)
|
||||
#define RIGHT_BOTTOM_MARGIN (16 << 3)
|
||||
|
||||
|
||||
|
||||
static void vp8_clamp_mv(int_mv *mv,
|
||||
int mb_to_left_edge,
|
||||
int mb_to_right_edge,
|
||||
int mb_to_top_edge,
|
||||
int mb_to_bottom_edge) {
|
||||
static void clamp_mv(int_mv *mv,
|
||||
int mb_to_left_edge,
|
||||
int mb_to_right_edge,
|
||||
int mb_to_top_edge,
|
||||
int mb_to_bottom_edge) {
|
||||
mv->as_mv.col = (mv->as_mv.col < mb_to_left_edge) ?
|
||||
mb_to_left_edge : mv->as_mv.col;
|
||||
mv->as_mv.col = (mv->as_mv.col > mb_to_right_edge) ?
|
||||
@ -64,21 +62,19 @@ static void vp8_clamp_mv(int_mv *mv,
|
||||
mb_to_bottom_edge : mv->as_mv.row;
|
||||
}
|
||||
|
||||
static void vp8_clamp_mv2(int_mv *mv, const MACROBLOCKD *xd) {
|
||||
vp8_clamp_mv(mv,
|
||||
xd->mb_to_left_edge - LEFT_TOP_MARGIN,
|
||||
xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN,
|
||||
xd->mb_to_top_edge - LEFT_TOP_MARGIN,
|
||||
xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
|
||||
static void clamp_mv2(int_mv *mv, const MACROBLOCKD *xd) {
|
||||
clamp_mv(mv,
|
||||
xd->mb_to_left_edge - LEFT_TOP_MARGIN,
|
||||
xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN,
|
||||
xd->mb_to_top_edge - LEFT_TOP_MARGIN,
|
||||
xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static unsigned int vp8_check_mv_bounds(int_mv *mv,
|
||||
int mb_to_left_edge,
|
||||
int mb_to_right_edge,
|
||||
int mb_to_top_edge,
|
||||
int mb_to_bottom_edge) {
|
||||
static unsigned int check_mv_bounds(int_mv *mv,
|
||||
int mb_to_left_edge,
|
||||
int mb_to_right_edge,
|
||||
int mb_to_top_edge,
|
||||
int mb_to_bottom_edge) {
|
||||
return (mv->as_mv.col < mb_to_left_edge) ||
|
||||
(mv->as_mv.col > mb_to_right_edge) ||
|
||||
(mv->as_mv.row < mb_to_top_edge) ||
|
||||
@ -96,8 +92,8 @@ void vp9_find_near_mvs
|
||||
int *ref_frame_sign_bias
|
||||
);
|
||||
|
||||
vp8_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
|
||||
vp8_prob p[VP8_MVREFS - 1], const int near_mv_ref_ct[4]
|
||||
vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
|
||||
vp9_prob p[VP9_MVREFS - 1], const int near_mv_ref_ct[4]
|
||||
);
|
||||
|
||||
extern const unsigned char vp9_mbsplit_offset[4][16];
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
|
||||
extern void (*vp8_clear_system_state)(void);
|
||||
extern void (*vp9_clear_system_state)(void);
|
||||
extern void (*vp9_plane_add_noise)(unsigned char *Start, unsigned int Width, unsigned int Height, int Pitch, int DPitch, int q);
|
||||
extern void (*de_interlace)
|
||||
(
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "vp8/common/onyxc_int.h"
|
||||
|
||||
extern void vp9_arch_x86_common_init(VP9_COMMON *ctx);
|
||||
extern void vp8_arch_arm_common_init(VP9_COMMON *ctx);
|
||||
extern void vp9_arch_arm_common_init(VP9_COMMON *ctx);
|
||||
|
||||
void vp9_machine_specific_config(VP9_COMMON *ctx) {
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
@ -82,7 +82,7 @@ void vp9_machine_specific_config(VP9_COMMON *ctx) {
|
||||
|
||||
|
||||
#if ARCH_ARM
|
||||
vp8_arch_arm_common_init(ctx);
|
||||
vp9_arch_arm_common_init(ctx);
|
||||
#endif
|
||||
|
||||
vpx_rtcd();
|
||||
|
@ -30,12 +30,12 @@ typedef struct {
|
||||
unsigned int uses_last: 1;
|
||||
#endif
|
||||
|
||||
} VP8_HEADER;
|
||||
} VP9_HEADER;
|
||||
|
||||
#ifdef PACKET_TESTING
|
||||
#define VP8_HEADER_SIZE 8
|
||||
#define VP9_HEADER_SIZE 8
|
||||
#else
|
||||
#define VP8_HEADER_SIZE 3
|
||||
#define VP9_HEADER_SIZE 3
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -45,63 +45,63 @@
|
||||
#define Y2_WHT_UPSCALE_FACTOR 2
|
||||
#endif
|
||||
|
||||
#ifndef vp8_idct_idct16x16
|
||||
#define vp8_idct_idct16x16 vp9_short_idct16x16_c
|
||||
#ifndef vp9_idct_idct16x16
|
||||
#define vp9_idct_idct16x16 vp9_short_idct16x16_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_idct16x16);
|
||||
extern prototype_idct(vp9_idct_idct16x16);
|
||||
|
||||
#ifndef vp8_idct_idct8
|
||||
#define vp8_idct_idct8 vp9_short_idct8x8_c
|
||||
#ifndef vp9_idct_idct8
|
||||
#define vp9_idct_idct8 vp9_short_idct8x8_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_idct8);
|
||||
extern prototype_idct(vp9_idct_idct8);
|
||||
|
||||
#ifndef vp8_idct_idct8_1
|
||||
#define vp8_idct_idct8_1 vp9_short_idct8x8_1_c
|
||||
#ifndef vp9_idct_idct8_1
|
||||
#define vp9_idct_idct8_1 vp9_short_idct8x8_1_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_idct8_1);
|
||||
extern prototype_idct(vp9_idct_idct8_1);
|
||||
|
||||
#ifndef vp8_idct_ihaar2
|
||||
#define vp8_idct_ihaar2 vp9_short_ihaar2x2_c
|
||||
#ifndef vp9_idct_ihaar2
|
||||
#define vp9_idct_ihaar2 vp9_short_ihaar2x2_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_ihaar2);
|
||||
extern prototype_idct(vp9_idct_ihaar2);
|
||||
|
||||
#ifndef vp8_idct_ihaar2_1
|
||||
#define vp8_idct_ihaar2_1 vp9_short_ihaar2x2_1_c
|
||||
#ifndef vp9_idct_ihaar2_1
|
||||
#define vp9_idct_ihaar2_1 vp9_short_ihaar2x2_1_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_ihaar2_1);
|
||||
extern prototype_idct(vp9_idct_ihaar2_1);
|
||||
|
||||
#ifndef vp8_idct_idct1_scalar_add_8x8
|
||||
#define vp8_idct_idct1_scalar_add_8x8 vp9_dc_only_idct_add_8x8_c
|
||||
#ifndef vp9_idct_idct1_scalar_add_8x8
|
||||
#define vp9_idct_idct1_scalar_add_8x8 vp9_dc_only_idct_add_8x8_c
|
||||
#endif
|
||||
extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add_8x8);
|
||||
extern prototype_idct_scalar_add(vp9_idct_idct1_scalar_add_8x8);
|
||||
|
||||
|
||||
|
||||
#ifndef vp8_idct_idct1
|
||||
#define vp8_idct_idct1 vp9_short_idct4x4llm_1_c
|
||||
#ifndef vp9_idct_idct1
|
||||
#define vp9_idct_idct1 vp9_short_idct4x4llm_1_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_idct1);
|
||||
extern prototype_idct(vp9_idct_idct1);
|
||||
|
||||
#ifndef vp8_idct_idct16
|
||||
#define vp8_idct_idct16 vp9_short_idct4x4llm_c
|
||||
#ifndef vp9_idct_idct16
|
||||
#define vp9_idct_idct16 vp9_short_idct4x4llm_c
|
||||
#endif
|
||||
extern prototype_idct(vp8_idct_idct16);
|
||||
extern prototype_idct(vp9_idct_idct16);
|
||||
|
||||
#ifndef vp8_idct_idct1_scalar_add
|
||||
#define vp8_idct_idct1_scalar_add vp9_dc_only_idct_add_c
|
||||
#ifndef vp9_idct_idct1_scalar_add
|
||||
#define vp9_idct_idct1_scalar_add vp9_dc_only_idct_add_c
|
||||
#endif
|
||||
extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add);
|
||||
extern prototype_idct_scalar_add(vp9_idct_idct1_scalar_add);
|
||||
|
||||
|
||||
#ifndef vp8_idct_iwalsh1
|
||||
#define vp8_idct_iwalsh1 vp9_short_inv_walsh4x4_1_c
|
||||
#ifndef vp9_idct_iwalsh1
|
||||
#define vp9_idct_iwalsh1 vp9_short_inv_walsh4x4_1_c
|
||||
#endif
|
||||
extern prototype_second_order(vp8_idct_iwalsh1);
|
||||
extern prototype_second_order(vp9_idct_iwalsh1);
|
||||
|
||||
#ifndef vp8_idct_iwalsh16
|
||||
#define vp8_idct_iwalsh16 vp9_short_inv_walsh4x4_c
|
||||
#ifndef vp9_idct_iwalsh16
|
||||
#define vp9_idct_iwalsh16 vp9_short_inv_walsh4x4_c
|
||||
#endif
|
||||
extern prototype_second_order(vp8_idct_iwalsh16);
|
||||
extern prototype_second_order(vp9_idct_iwalsh16);
|
||||
|
||||
#if CONFIG_LOSSLESS
|
||||
extern prototype_idct(vp9_short_inv_walsh4x4_x8_c);
|
||||
@ -114,31 +114,31 @@ extern prototype_second_order(vp9_short_inv_walsh4x4_1_lossless_c);
|
||||
void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
|
||||
TX_TYPE tx_type, int tx_dim);
|
||||
|
||||
typedef prototype_idct((*vp8_idct_fn_t));
|
||||
typedef prototype_idct_scalar_add((*vp8_idct_scalar_add_fn_t));
|
||||
typedef prototype_second_order((*vp8_second_order_fn_t));
|
||||
typedef prototype_idct((*vp9_idct_fn_t));
|
||||
typedef prototype_idct_scalar_add((*vp9_idct_scalar_add_fn_t));
|
||||
typedef prototype_second_order((*vp9_second_order_fn_t));
|
||||
|
||||
typedef struct {
|
||||
vp8_idct_fn_t idct1;
|
||||
vp8_idct_fn_t idct16;
|
||||
vp8_idct_scalar_add_fn_t idct1_scalar_add;
|
||||
vp9_idct_fn_t idct1;
|
||||
vp9_idct_fn_t idct16;
|
||||
vp9_idct_scalar_add_fn_t idct1_scalar_add;
|
||||
|
||||
vp8_second_order_fn_t iwalsh1;
|
||||
vp8_second_order_fn_t iwalsh16;
|
||||
vp9_second_order_fn_t iwalsh1;
|
||||
vp9_second_order_fn_t iwalsh16;
|
||||
|
||||
vp8_idct_fn_t idct8;
|
||||
vp8_idct_fn_t idct8_1;
|
||||
vp8_idct_scalar_add_fn_t idct1_scalar_add_8x8;
|
||||
vp8_idct_fn_t ihaar2;
|
||||
vp8_idct_fn_t ihaar2_1;
|
||||
vp9_idct_fn_t idct8;
|
||||
vp9_idct_fn_t idct8_1;
|
||||
vp9_idct_scalar_add_fn_t idct1_scalar_add_8x8;
|
||||
vp9_idct_fn_t ihaar2;
|
||||
vp9_idct_fn_t ihaar2_1;
|
||||
|
||||
vp8_idct_fn_t idct16x16;
|
||||
} vp8_idct_rtcd_vtable_t;
|
||||
vp9_idct_fn_t idct16x16;
|
||||
} vp9_idct_rtcd_vtable_t;
|
||||
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
#define IDCT_INVOKE(ctx,fn) (ctx)->fn
|
||||
#else
|
||||
#define IDCT_INVOKE(ctx,fn) vp8_idct_##fn
|
||||
#define IDCT_INVOKE(ctx,fn) vp9_idct_##fn
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -290,7 +290,7 @@ static const int16_t iadst_i16[256] = {
|
||||
|
||||
void vp9_ihtllm_float_c(const int16_t *input, int16_t *output, int pitch,
|
||||
TX_TYPE tx_type, int tx_dim) {
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
{
|
||||
int i, j, k;
|
||||
float bufa[256], bufb[256]; // buffers are for floating-point test purpose
|
||||
@ -404,7 +404,7 @@ void vp9_ihtllm_float_c(const int16_t *input, int16_t *output, int pitch,
|
||||
pfa += tx_dim;
|
||||
}
|
||||
}
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
}
|
||||
|
||||
/* Converted the transforms to integer form. */
|
||||
@ -985,7 +985,7 @@ void vp9_short_ihaar2x2_c(short *input, short *output, int pitch) {
|
||||
// Keep a really bad float version as reference for now.
|
||||
void vp9_short_idct16x16_c(short *input, short *output, int pitch) {
|
||||
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
{
|
||||
double x;
|
||||
const int short_pitch = pitch >> 1;
|
||||
@ -1007,7 +1007,7 @@ void vp9_short_idct16x16_c(short *input, short *output, int pitch) {
|
||||
}
|
||||
}
|
||||
}
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1030,7 +1030,7 @@ static const double C15 = 0.098017140329561;
|
||||
|
||||
static void butterfly_16x16_idct_1d(double input[16], double output[16]) {
|
||||
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
{
|
||||
double step[16];
|
||||
double intermediate[16];
|
||||
@ -1217,14 +1217,14 @@ static void butterfly_16x16_idct_1d(double input[16], double output[16]) {
|
||||
output[9] = (step[6] - step[ 9]);
|
||||
output[8] = (step[7] - step[ 8]);
|
||||
}
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
}
|
||||
|
||||
// Remove once an int version of iDCT is written
|
||||
#if 0
|
||||
void reference_16x16_idct_1d(double input[16], double output[16]) {
|
||||
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
{
|
||||
const double kPi = 3.141592653589793238462643383279502884;
|
||||
const double kSqrt2 = 1.414213562373095048801688724209698;
|
||||
@ -1237,13 +1237,13 @@ void reference_16x16_idct_1d(double input[16], double output[16]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
}
|
||||
#endif
|
||||
|
||||
void vp9_short_idct16x16_c(short *input, short *output, int pitch) {
|
||||
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
{
|
||||
double out[16*16], out2[16*16];
|
||||
const int short_pitch = pitch >> 1;
|
||||
@ -1269,5 +1269,5 @@ void vp9_short_idct16x16_c(short *input, short *output, int pitch) {
|
||||
for (i = 0; i < 16*16; ++i)
|
||||
output[i] = round(out2[i]/128);
|
||||
}
|
||||
vp8_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
vp9_clear_system_state(); // Make it simd safe : __asm emms;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ static void recon_dcblock_8x8(MACROBLOCKD *xd) {
|
||||
xd->block[12].dqcoeff[0] = b->diff[8];
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_b_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_b_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
BLOCKD *b, int pitch) {
|
||||
if (b->eob <= 1)
|
||||
IDCT_INVOKE(rtcd, idct1)(b->dqcoeff, b->diff, pitch);
|
||||
@ -36,7 +36,7 @@ void vp9_inverse_transform_b_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
IDCT_INVOKE(rtcd, idct16)(b->dqcoeff, b->diff, pitch);
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mby_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mby_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
int i;
|
||||
BLOCKD *blockd = xd->block;
|
||||
@ -52,7 +52,7 @@ void vp9_inverse_transform_mby_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mbuv_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mbuv_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
int i;
|
||||
BLOCKD *blockd = xd->block;
|
||||
@ -62,13 +62,13 @@ void vp9_inverse_transform_mbuv_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mb_4x4(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mb_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
vp9_inverse_transform_mby_4x4(rtcd, xd);
|
||||
vp9_inverse_transform_mbuv_4x4(rtcd, xd);
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_b_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_b_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
short *input_dqcoeff, short *output_coeff,
|
||||
int pitch) {
|
||||
// int b,i;
|
||||
@ -78,7 +78,7 @@ void vp9_inverse_transform_b_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
// IDCT_INVOKE(rtcd, idct8_1)(b->dqcoeff, b->diff, pitch);//pitch
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mby_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
int i;
|
||||
BLOCKD *blockd = xd->block;
|
||||
@ -99,7 +99,7 @@ void vp9_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mbuv_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
int i;
|
||||
BLOCKD *blockd = xd->block;
|
||||
@ -110,25 +110,25 @@ void vp9_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mb_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
vp9_inverse_transform_mby_8x8(rtcd, xd);
|
||||
vp9_inverse_transform_mbuv_8x8(rtcd, xd);
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_b_16x16(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_b_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
short *input_dqcoeff,
|
||||
short *output_coeff, int pitch) {
|
||||
IDCT_INVOKE(rtcd, idct16x16)(input_dqcoeff, output_coeff, pitch);
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mby_16x16(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mby_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
vp9_inverse_transform_b_16x16(rtcd, &xd->block[0].dqcoeff[0],
|
||||
&xd->block[0].diff[0], 32);
|
||||
}
|
||||
|
||||
void vp9_inverse_transform_mb_16x16(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
void vp9_inverse_transform_mb_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd) {
|
||||
vp9_inverse_transform_mby_16x16(rtcd, xd);
|
||||
vp9_inverse_transform_mbuv_8x8(rtcd, xd);
|
||||
|
@ -16,19 +16,19 @@
|
||||
#include "idct.h"
|
||||
#include "blockd.h"
|
||||
|
||||
extern void vp9_inverse_transform_b_4x4(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch);
|
||||
extern void vp9_inverse_transform_mb_4x4(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_4x4(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mbuv_4x4(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_b_4x4(const vp9_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch);
|
||||
extern void vp9_inverse_transform_mb_4x4(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_4x4(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mbuv_4x4(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_b_8x8(const vp8_idct_rtcd_vtable_t *rtcd, short *input_dqcoeff, short *output_coeff, int pitch);
|
||||
extern void vp9_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_b_8x8(const vp9_idct_rtcd_vtable_t *rtcd, short *input_dqcoeff, short *output_coeff, int pitch);
|
||||
extern void vp9_inverse_transform_mb_8x8(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_8x8(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mbuv_8x8(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_b_16x16(const vp8_idct_rtcd_vtable_t *rtcd,
|
||||
extern void vp9_inverse_transform_b_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
short *input_dqcoeff, short *output_coeff,
|
||||
int pitch);
|
||||
extern void vp9_inverse_transform_mb_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mb_16x16(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_16x16(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
#endif
|
||||
|
@ -207,7 +207,7 @@ void vp9_loop_filter_frame
|
||||
u_ptr = post->u_buffer;
|
||||
v_ptr = post->v_buffer;
|
||||
|
||||
/* vp8_filter each macro block */
|
||||
/* vp9_filter each macro block */
|
||||
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++) {
|
||||
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) {
|
||||
int skip_lf = (mode_info_context->mbmi.mode != B_PRED &&
|
||||
@ -277,11 +277,11 @@ void vp9_loop_filter_frame
|
||||
mode_info_context[-1].mbmi.mb_skip_coeff)
|
||||
#endif
|
||||
)
|
||||
vp8_loop_filter_simple_mbv(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_mbv(y_ptr, post->y_stride,
|
||||
lfi_n->mblim[filter_level]);
|
||||
|
||||
if (!skip_lf)
|
||||
vp8_loop_filter_simple_bv(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_bv(y_ptr, post->y_stride,
|
||||
lfi_n->blim[filter_level]);
|
||||
|
||||
/* don't apply across umv border */
|
||||
@ -292,11 +292,11 @@ void vp9_loop_filter_frame
|
||||
mode_info_context[-cm->mode_info_stride].mbmi.mb_skip_coeff)
|
||||
#endif
|
||||
)
|
||||
vp8_loop_filter_simple_mbh(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_mbh(y_ptr, post->y_stride,
|
||||
lfi_n->mblim[filter_level]);
|
||||
|
||||
if (!skip_lf)
|
||||
vp8_loop_filter_simple_bh(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_bh(y_ptr, post->y_stride,
|
||||
lfi_n->blim[filter_level]);
|
||||
}
|
||||
}
|
||||
@ -348,7 +348,7 @@ void vp9_loop_filter_frame_yonly
|
||||
/* Set up the buffer pointers */
|
||||
y_ptr = post->y_buffer;
|
||||
|
||||
/* vp8_filter each macro block */
|
||||
/* vp9_filter each macro block */
|
||||
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++) {
|
||||
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) {
|
||||
int skip_lf = (mode_info_context->mbmi.mode != B_PRED &&
|
||||
@ -393,20 +393,20 @@ void vp9_loop_filter_frame_yonly
|
||||
} else {
|
||||
// FIXME: Not 8x8 aware
|
||||
if (mb_col > 0)
|
||||
vp8_loop_filter_simple_mbv(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_mbv(y_ptr, post->y_stride,
|
||||
lfi_n->mblim[filter_level]);
|
||||
|
||||
if (!skip_lf)
|
||||
vp8_loop_filter_simple_bv(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_bv(y_ptr, post->y_stride,
|
||||
lfi_n->blim[filter_level]);
|
||||
|
||||
/* don't apply across umv border */
|
||||
if (mb_row > 0)
|
||||
vp8_loop_filter_simple_mbh(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_mbh(y_ptr, post->y_stride,
|
||||
lfi_n->mblim[filter_level]);
|
||||
|
||||
if (!skip_lf)
|
||||
vp8_loop_filter_simple_bh(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_bh(y_ptr, post->y_stride,
|
||||
lfi_n->blim[filter_level]);
|
||||
}
|
||||
}
|
||||
@ -481,7 +481,7 @@ void vp9_loop_filter_partial_frame
|
||||
/* Set up the buffer pointers */
|
||||
y_ptr = post->y_buffer + (post->y_height >> 5) * 16 * post->y_stride;
|
||||
|
||||
/* vp8_filter each macro block */
|
||||
/* vp9_filter each macro block */
|
||||
for (mb_row = 0; mb_row < (linestocopy >> 4); mb_row++) {
|
||||
for (mb_col = 0; mb_col < mb_cols; mb_col++) {
|
||||
int skip_lf = (mode_info_context->mbmi.mode != B_PRED &&
|
||||
@ -514,18 +514,18 @@ void vp9_loop_filter_partial_frame
|
||||
vp9_loop_filter_bh(y_ptr, 0, 0, post->y_stride, 0, &lfi);
|
||||
} else {
|
||||
if (mb_col > 0)
|
||||
vp8_loop_filter_simple_mbv (y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_mbv (y_ptr, post->y_stride,
|
||||
lfi_n->mblim[filter_level]);
|
||||
|
||||
if (!skip_lf)
|
||||
vp8_loop_filter_simple_bv(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_bv(y_ptr, post->y_stride,
|
||||
lfi_n->blim[filter_level]);
|
||||
|
||||
vp8_loop_filter_simple_mbh(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_mbh(y_ptr, post->y_stride,
|
||||
lfi_n->mblim[filter_level]);
|
||||
|
||||
if (!skip_lf)
|
||||
vp8_loop_filter_simple_bh(y_ptr, post->y_stride,
|
||||
vp9_loop_filter_simple_bh(y_ptr, post->y_stride,
|
||||
lfi_n->blim[filter_level]);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
typedef unsigned char uc;
|
||||
|
||||
static __inline signed char vp8_signed_char_clamp(int t) {
|
||||
static __inline signed char signed_char_clamp(int t) {
|
||||
t = (t < -128 ? -128 : t);
|
||||
t = (t > 127 ? 127 : t);
|
||||
return (signed char) t;
|
||||
@ -22,9 +22,9 @@ static __inline signed char vp8_signed_char_clamp(int t) {
|
||||
|
||||
|
||||
/* should we apply any filter at all ( 11111111 yes, 00000000 no) */
|
||||
static __inline signed char vp8_filter_mask(uc limit, uc blimit,
|
||||
uc p3, uc p2, uc p1, uc p0,
|
||||
uc q0, uc q1, uc q2, uc q3) {
|
||||
static __inline signed char filter_mask(uc limit, uc blimit,
|
||||
uc p3, uc p2, uc p1, uc p0,
|
||||
uc q0, uc q1, uc q2, uc q3) {
|
||||
signed char mask = 0;
|
||||
mask |= (abs(p3 - p2) > limit) * -1;
|
||||
mask |= (abs(p2 - p1) > limit) * -1;
|
||||
@ -38,20 +38,20 @@ static __inline signed char vp8_filter_mask(uc limit, uc blimit,
|
||||
}
|
||||
|
||||
/* is there high variance internal edge ( 11111111 yes, 00000000 no) */
|
||||
static __inline signed char vp8_hevmask(uc thresh, uc p1, uc p0, uc q0, uc q1) {
|
||||
static __inline signed char hevmask(uc thresh, uc p1, uc p0, uc q0, uc q1) {
|
||||
signed char hev = 0;
|
||||
hev |= (abs(p1 - p0) > thresh) * -1;
|
||||
hev |= (abs(q1 - q0) > thresh) * -1;
|
||||
return hev;
|
||||
}
|
||||
|
||||
static __inline void vp8_filter(signed char mask, uc hev, uc *op1,
|
||||
uc *op0, uc *oq0, uc *oq1)
|
||||
static __inline void filter(signed char mask, uc hev, uc *op1,
|
||||
uc *op0, uc *oq0, uc *oq1)
|
||||
|
||||
{
|
||||
signed char ps0, qs0;
|
||||
signed char ps1, qs1;
|
||||
signed char vp8_filter, Filter1, Filter2;
|
||||
signed char filter, Filter1, Filter2;
|
||||
signed char u;
|
||||
|
||||
ps1 = (signed char) * op1 ^ 0x80;
|
||||
@ -60,35 +60,35 @@ static __inline void vp8_filter(signed char mask, uc hev, uc *op1,
|
||||
qs1 = (signed char) * oq1 ^ 0x80;
|
||||
|
||||
/* add outer taps if we have high edge variance */
|
||||
vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
|
||||
vp8_filter &= hev;
|
||||
filter = signed_char_clamp(ps1 - qs1);
|
||||
filter &= hev;
|
||||
|
||||
/* inner taps */
|
||||
vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
|
||||
vp8_filter &= mask;
|
||||
filter = signed_char_clamp(filter + 3 * (qs0 - ps0));
|
||||
filter &= mask;
|
||||
|
||||
/* save bottom 3 bits so that we round one side +4 and the other +3
|
||||
* if it equals 4 we'll set to adjust by -1 to account for the fact
|
||||
* we'd round 3 the other way
|
||||
*/
|
||||
Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
|
||||
Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
|
||||
Filter1 = signed_char_clamp(filter + 4);
|
||||
Filter2 = signed_char_clamp(filter + 3);
|
||||
Filter1 >>= 3;
|
||||
Filter2 >>= 3;
|
||||
u = vp8_signed_char_clamp(qs0 - Filter1);
|
||||
u = signed_char_clamp(qs0 - Filter1);
|
||||
*oq0 = u ^ 0x80;
|
||||
u = vp8_signed_char_clamp(ps0 + Filter2);
|
||||
u = signed_char_clamp(ps0 + Filter2);
|
||||
*op0 = u ^ 0x80;
|
||||
vp8_filter = Filter1;
|
||||
filter = Filter1;
|
||||
|
||||
/* outer tap adjustments */
|
||||
vp8_filter += 1;
|
||||
vp8_filter >>= 1;
|
||||
vp8_filter &= ~hev;
|
||||
filter += 1;
|
||||
filter >>= 1;
|
||||
filter &= ~hev;
|
||||
|
||||
u = vp8_signed_char_clamp(qs1 - vp8_filter);
|
||||
u = signed_char_clamp(qs1 - filter);
|
||||
*oq1 = u ^ 0x80;
|
||||
u = vp8_signed_char_clamp(ps1 + vp8_filter);
|
||||
u = signed_char_clamp(ps1 + filter);
|
||||
*op1 = u ^ 0x80;
|
||||
|
||||
}
|
||||
@ -110,13 +110,13 @@ void vp9_loop_filter_horizontal_edge_c
|
||||
* of 8 bit simd instructions.
|
||||
*/
|
||||
do {
|
||||
mask = vp8_filter_mask(limit[0], blimit[0],
|
||||
s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
|
||||
s[0 * p], s[1 * p], s[2 * p], s[3 * p]);
|
||||
mask = filter_mask(limit[0], blimit[0],
|
||||
s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
|
||||
s[0 * p], s[1 * p], s[2 * p], s[3 * p]);
|
||||
|
||||
hev = vp8_hevmask(thresh[0], s[-2 * p], s[-1 * p], s[0 * p], s[1 * p]);
|
||||
hev = hevmask(thresh[0], s[-2 * p], s[-1 * p], s[0 * p], s[1 * p]);
|
||||
|
||||
vp8_filter(mask, hev, s - 2 * p, s - 1 * p, s, s + 1 * p);
|
||||
filter(mask, hev, s - 2 * p, s - 1 * p, s, s + 1 * p);
|
||||
|
||||
++s;
|
||||
} while (++i < count * 8);
|
||||
@ -139,20 +139,20 @@ void vp9_loop_filter_vertical_edge_c
|
||||
* of 8 bit simd instructions.
|
||||
*/
|
||||
do {
|
||||
mask = vp8_filter_mask(limit[0], blimit[0],
|
||||
s[-4], s[-3], s[-2], s[-1],
|
||||
s[0], s[1], s[2], s[3]);
|
||||
mask = filter_mask(limit[0], blimit[0],
|
||||
s[-4], s[-3], s[-2], s[-1],
|
||||
s[0], s[1], s[2], s[3]);
|
||||
|
||||
hev = vp8_hevmask(thresh[0], s[-2], s[-1], s[0], s[1]);
|
||||
hev = hevmask(thresh[0], s[-2], s[-1], s[0], s[1]);
|
||||
|
||||
vp8_filter(mask, hev, s - 2, s - 1, s, s + 1);
|
||||
filter(mask, hev, s - 2, s - 1, s, s + 1);
|
||||
|
||||
s += p;
|
||||
} while (++i < count * 8);
|
||||
}
|
||||
static __inline signed char vp8_flatmask(uc thresh,
|
||||
uc p4, uc p3, uc p2, uc p1, uc p0,
|
||||
uc q0, uc q1, uc q2, uc q3, uc q4) {
|
||||
static __inline signed char flatmask(uc thresh,
|
||||
uc p4, uc p3, uc p2, uc p1, uc p0,
|
||||
uc q0, uc q1, uc q2, uc q3, uc q4) {
|
||||
signed char flat = 0;
|
||||
flat |= (abs(p1 - p0) > 1) * -1;
|
||||
flat |= (abs(q1 - q0) > 1) * -1;
|
||||
@ -166,9 +166,9 @@ static __inline signed char vp8_flatmask(uc thresh,
|
||||
return flat;
|
||||
}
|
||||
|
||||
static __inline void vp8_mbfilter(signed char mask, uc hev, uc flat,
|
||||
uc *op4, uc *op3, uc *op2, uc *op1, uc *op0,
|
||||
uc *oq0, uc *oq1, uc *oq2, uc *oq3, uc *oq4) {
|
||||
static __inline void mbfilter(signed char mask, uc hev, uc flat,
|
||||
uc *op4, uc *op3, uc *op2, uc *op1, uc *op0,
|
||||
uc *oq0, uc *oq1, uc *oq2, uc *oq3, uc *oq4) {
|
||||
/* use a 7 tap filter [1, 1, 1, 2, 1, 1, 1] for flat line */
|
||||
if (flat && mask) {
|
||||
unsigned char p0, q0;
|
||||
@ -197,7 +197,7 @@ static __inline void vp8_mbfilter(signed char mask, uc hev, uc flat,
|
||||
} else {
|
||||
signed char ps0, qs0;
|
||||
signed char ps1, qs1;
|
||||
signed char vp8_filter, Filter1, Filter2;
|
||||
signed char filter, Filter1, Filter2;
|
||||
signed char u;
|
||||
|
||||
ps1 = (signed char) * op1 ^ 0x80;
|
||||
@ -206,32 +206,32 @@ static __inline void vp8_mbfilter(signed char mask, uc hev, uc flat,
|
||||
qs1 = (signed char) * oq1 ^ 0x80;
|
||||
|
||||
/* add outer taps if we have high edge variance */
|
||||
vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
|
||||
vp8_filter &= hev;
|
||||
filter = signed_char_clamp(ps1 - qs1);
|
||||
filter &= hev;
|
||||
|
||||
/* inner taps */
|
||||
vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
|
||||
vp8_filter &= mask;
|
||||
filter = signed_char_clamp(filter + 3 * (qs0 - ps0));
|
||||
filter &= mask;
|
||||
|
||||
Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
|
||||
Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
|
||||
Filter1 = signed_char_clamp(filter + 4);
|
||||
Filter2 = signed_char_clamp(filter + 3);
|
||||
Filter1 >>= 3;
|
||||
Filter2 >>= 3;
|
||||
|
||||
u = vp8_signed_char_clamp(qs0 - Filter1);
|
||||
u = signed_char_clamp(qs0 - Filter1);
|
||||
*oq0 = u ^ 0x80;
|
||||
u = vp8_signed_char_clamp(ps0 + Filter2);
|
||||
u = signed_char_clamp(ps0 + Filter2);
|
||||
*op0 = u ^ 0x80;
|
||||
vp8_filter = Filter1;
|
||||
filter = Filter1;
|
||||
|
||||
/* outer tap adjustments */
|
||||
vp8_filter += 1;
|
||||
vp8_filter >>= 1;
|
||||
vp8_filter &= ~hev;
|
||||
filter += 1;
|
||||
filter >>= 1;
|
||||
filter &= ~hev;
|
||||
|
||||
u = vp8_signed_char_clamp(qs1 - vp8_filter);
|
||||
u = signed_char_clamp(qs1 - filter);
|
||||
*oq1 = u ^ 0x80;
|
||||
u = vp8_signed_char_clamp(ps1 + vp8_filter);
|
||||
u = signed_char_clamp(ps1 + filter);
|
||||
*op1 = u ^ 0x80;
|
||||
}
|
||||
}
|
||||
@ -254,18 +254,18 @@ void vp9_mbloop_filter_horizontal_edge_c
|
||||
*/
|
||||
do {
|
||||
|
||||
mask = vp8_filter_mask(limit[0], blimit[0],
|
||||
s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
|
||||
s[ 0 * p], s[ 1 * p], s[ 2 * p], s[ 3 * p]);
|
||||
mask = filter_mask(limit[0], blimit[0],
|
||||
s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
|
||||
s[ 0 * p], s[ 1 * p], s[ 2 * p], s[ 3 * p]);
|
||||
|
||||
hev = vp8_hevmask(thresh[0], s[-2 * p], s[-1 * p], s[0 * p], s[1 * p]);
|
||||
hev = hevmask(thresh[0], s[-2 * p], s[-1 * p], s[0 * p], s[1 * p]);
|
||||
|
||||
flat = vp8_flatmask(thresh[0],
|
||||
s[-5 * p], s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
|
||||
s[ 0 * p], s[ 1 * p], s[ 2 * p], s[ 3 * p], s[ 4 * p]);
|
||||
vp8_mbfilter(mask, hev, flat,
|
||||
s - 5 * p, s - 4 * p, s - 3 * p, s - 2 * p, s - 1 * p,
|
||||
s, s + 1 * p, s + 2 * p, s + 3 * p, s + 4 * p);
|
||||
flat = flatmask(thresh[0],
|
||||
s[-5 * p], s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
|
||||
s[ 0 * p], s[ 1 * p], s[ 2 * p], s[ 3 * p], s[ 4 * p]);
|
||||
mbfilter(mask, hev, flat,
|
||||
s - 5 * p, s - 4 * p, s - 3 * p, s - 2 * p, s - 1 * p,
|
||||
s, s + 1 * p, s + 2 * p, s + 3 * p, s + 4 * p);
|
||||
|
||||
++s;
|
||||
} while (++i < count * 8);
|
||||
@ -287,26 +287,26 @@ void vp9_mbloop_filter_vertical_edge_c
|
||||
|
||||
do {
|
||||
|
||||
mask = vp8_filter_mask(limit[0], blimit[0],
|
||||
s[-4], s[-3], s[-2], s[-1],
|
||||
s[0], s[1], s[2], s[3]);
|
||||
mask = filter_mask(limit[0], blimit[0],
|
||||
s[-4], s[-3], s[-2], s[-1],
|
||||
s[0], s[1], s[2], s[3]);
|
||||
|
||||
hev = vp8_hevmask(thresh[0], s[-2], s[-1], s[0], s[1]);
|
||||
flat = vp8_flatmask(thresh[0],
|
||||
s[-5], s[-4], s[-3], s[-2], s[-1],
|
||||
s[ 0], s[ 1], s[ 2], s[ 3], s[ 4]);
|
||||
vp8_mbfilter(mask, hev, flat,
|
||||
s - 5, s - 4, s - 3, s - 2, s - 1,
|
||||
s, s + 1, s + 2, s + 3, s + 4);
|
||||
hev = hevmask(thresh[0], s[-2], s[-1], s[0], s[1]);
|
||||
flat = flatmask(thresh[0],
|
||||
s[-5], s[-4], s[-3], s[-2], s[-1],
|
||||
s[ 0], s[ 1], s[ 2], s[ 3], s[ 4]);
|
||||
mbfilter(mask, hev, flat,
|
||||
s - 5, s - 4, s - 3, s - 2, s - 1,
|
||||
s, s + 1, s + 2, s + 3, s + 4);
|
||||
s += p;
|
||||
} while (++i < count * 8);
|
||||
|
||||
}
|
||||
|
||||
/* should we apply any filter at all ( 11111111 yes, 00000000 no) */
|
||||
static __inline signed char vp8_simple_filter_mask(uc blimit,
|
||||
uc p1, uc p0,
|
||||
uc q0, uc q1) {
|
||||
static __inline signed char simple_filter_mask(uc blimit,
|
||||
uc p1, uc p0,
|
||||
uc q0, uc q1) {
|
||||
/* Why does this cause problems for win32?
|
||||
* error C2143: syntax error : missing ';' before 'type'
|
||||
* (void) limit;
|
||||
@ -315,29 +315,29 @@ static __inline signed char vp8_simple_filter_mask(uc blimit,
|
||||
return mask;
|
||||
}
|
||||
|
||||
static __inline void vp8_simple_filter(signed char mask,
|
||||
uc *op1, uc *op0,
|
||||
uc *oq0, uc *oq1) {
|
||||
signed char vp8_filter, Filter1, Filter2;
|
||||
static __inline void simple_filter(signed char mask,
|
||||
uc *op1, uc *op0,
|
||||
uc *oq0, uc *oq1) {
|
||||
signed char filter, Filter1, Filter2;
|
||||
signed char p1 = (signed char) * op1 ^ 0x80;
|
||||
signed char p0 = (signed char) * op0 ^ 0x80;
|
||||
signed char q0 = (signed char) * oq0 ^ 0x80;
|
||||
signed char q1 = (signed char) * oq1 ^ 0x80;
|
||||
signed char u;
|
||||
|
||||
vp8_filter = vp8_signed_char_clamp(p1 - q1);
|
||||
vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (q0 - p0));
|
||||
vp8_filter &= mask;
|
||||
filter = signed_char_clamp(p1 - q1);
|
||||
filter = signed_char_clamp(filter + 3 * (q0 - p0));
|
||||
filter &= mask;
|
||||
|
||||
/* save bottom 3 bits so that we round one side +4 and the other +3 */
|
||||
Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
|
||||
Filter1 = signed_char_clamp(filter + 4);
|
||||
Filter1 >>= 3;
|
||||
u = vp8_signed_char_clamp(q0 - Filter1);
|
||||
u = signed_char_clamp(q0 - Filter1);
|
||||
*oq0 = u ^ 0x80;
|
||||
|
||||
Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
|
||||
Filter2 = signed_char_clamp(filter + 3);
|
||||
Filter2 >>= 3;
|
||||
u = vp8_signed_char_clamp(p0 + Filter2);
|
||||
u = signed_char_clamp(p0 + Filter2);
|
||||
*op0 = u ^ 0x80;
|
||||
}
|
||||
|
||||
@ -351,12 +351,12 @@ void vp9_loop_filter_simple_horizontal_edge_c
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
mask = vp8_simple_filter_mask(blimit[0],
|
||||
s[-2 * p], s[-1 * p],
|
||||
s[0 * p], s[1 * p]);
|
||||
vp8_simple_filter(mask,
|
||||
s - 2 * p, s - 1 * p,
|
||||
s, s + 1 * p);
|
||||
mask = simple_filter_mask(blimit[0],
|
||||
s[-2 * p], s[-1 * p],
|
||||
s[0 * p], s[1 * p]);
|
||||
simple_filter(mask,
|
||||
s - 2 * p, s - 1 * p,
|
||||
s, s + 1 * p);
|
||||
++s;
|
||||
} while (++i < 16);
|
||||
}
|
||||
@ -371,8 +371,8 @@ void vp9_loop_filter_simple_vertical_edge_c
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
mask = vp8_simple_filter_mask(blimit[0], s[-2], s[-1], s[0], s[1]);
|
||||
vp8_simple_filter(mask, s - 2, s - 1, s, s + 1);
|
||||
mask = simple_filter_mask(blimit[0], s[-2], s[-1], s[0], s[1]);
|
||||
simple_filter(mask, s - 2, s - 1, s, s + 1);
|
||||
s += p;
|
||||
} while (++i < 16);
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "entropymode.h"
|
||||
|
||||
const unsigned int vp9_kf_default_bmode_counts[VP8_BINTRAMODES][VP8_BINTRAMODES][VP8_BINTRAMODES] = {
|
||||
const unsigned int vp9_kf_default_bmode_counts[VP9_BINTRAMODES][VP9_BINTRAMODES][VP9_BINTRAMODES] = {
|
||||
{
|
||||
/*Above Mode : 0*/
|
||||
{ 43438, 2195, 470, 316, 615, 171, 217, 412, 124, 160, }, /* left_mode 0 */
|
||||
|
@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8_H
|
||||
#define __INC_VP8_H
|
||||
#ifndef __INC_ONYX_H
|
||||
#define __INC_ONYX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@ -35,10 +35,10 @@ extern "C"
|
||||
} VPX_SCALING;
|
||||
|
||||
typedef enum {
|
||||
VP8_LAST_FLAG = 1,
|
||||
VP8_GOLD_FLAG = 2,
|
||||
VP8_ALT_FLAG = 4
|
||||
} VP8_REFFRAME;
|
||||
VP9_LAST_FLAG = 1,
|
||||
VP9_GOLD_FLAG = 2,
|
||||
VP9_ALT_FLAG = 4
|
||||
} VP9_REFFRAME;
|
||||
|
||||
|
||||
typedef enum {
|
||||
@ -169,16 +169,15 @@ extern "C"
|
||||
struct vpx_codec_pkt_list *output_pkt_list;
|
||||
|
||||
vp8e_tuning tuning;
|
||||
} VP8_CONFIG;
|
||||
} VP9_CONFIG;
|
||||
|
||||
|
||||
void vp9_initialize_enc();
|
||||
|
||||
VP9_PTR vp9_create_compressor(VP8_CONFIG *oxcf);
|
||||
VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf);
|
||||
void vp9_remove_compressor(VP9_PTR *comp);
|
||||
|
||||
void vp8_init_config(VP9_PTR onyx, VP8_CONFIG *oxcf);
|
||||
void vp9_change_config(VP9_PTR onyx, VP8_CONFIG *oxcf);
|
||||
void vp9_change_config(VP9_PTR onyx, VP9_CONFIG *oxcf);
|
||||
|
||||
// receive a frames worth of data caller can assume that a copy of this frame is made
|
||||
// and not just a copy of the pointer..
|
||||
@ -192,16 +191,16 @@ extern "C"
|
||||
int flush);
|
||||
|
||||
int vp9_get_preview_raw_frame(VP9_PTR comp, YV12_BUFFER_CONFIG *dest,
|
||||
vp8_ppflags_t *flags);
|
||||
vp9_ppflags_t *flags);
|
||||
|
||||
int vp9_use_as_reference(VP9_PTR comp, int ref_frame_flags);
|
||||
|
||||
int vp9_update_reference(VP9_PTR comp, int ref_frame_flags);
|
||||
|
||||
int vp9_get_reference_enc(VP9_PTR comp, VP8_REFFRAME ref_frame_flag,
|
||||
int vp9_get_reference_enc(VP9_PTR comp, VP9_REFFRAME ref_frame_flag,
|
||||
YV12_BUFFER_CONFIG *sd);
|
||||
|
||||
int vp9_set_reference_enc(VP9_PTR comp, VP8_REFFRAME ref_frame_flag,
|
||||
int vp9_set_reference_enc(VP9_PTR comp, VP9_REFFRAME ref_frame_flag,
|
||||
YV12_BUFFER_CONFIG *sd);
|
||||
|
||||
int vp9_update_entropy(VP9_PTR comp, int update);
|
||||
@ -223,4 +222,4 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // __INC_ONYX_H
|
||||
|
@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8C_INT_H
|
||||
#define __INC_VP8C_INT_H
|
||||
#ifndef __INC_ONYXC_INT_H
|
||||
#define __INC_ONYXC_INT_H
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "vpx/internal/vpx_codec_internal.h"
|
||||
@ -44,47 +44,47 @@ void vp9_initialize_common(void);
|
||||
#define COMP_PRED_CONTEXTS 2
|
||||
|
||||
typedef struct frame_contexts {
|
||||
vp8_prob bmode_prob [VP8_BINTRAMODES - 1];
|
||||
vp8_prob ymode_prob [VP8_YMODES - 1]; /* interframe intra mode probs */
|
||||
vp8_prob uv_mode_prob [VP8_YMODES][VP8_UV_MODES - 1];
|
||||
vp8_prob i8x8_mode_prob [VP8_I8X8_MODES - 1];
|
||||
vp8_prob sub_mv_ref_prob [SUBMVREF_COUNT][VP8_SUBMVREFS - 1];
|
||||
vp8_prob mbsplit_prob [VP8_NUMMBSPLITS - 1];
|
||||
vp8_prob coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob hybrid_coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob hybrid_coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob hybrid_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp9_prob bmode_prob [VP9_BINTRAMODES - 1];
|
||||
vp9_prob ymode_prob [VP9_YMODES - 1]; /* interframe intra mode probs */
|
||||
vp9_prob uv_mode_prob [VP9_YMODES][VP9_UV_MODES - 1];
|
||||
vp9_prob i8x8_mode_prob [VP9_I8X8_MODES - 1];
|
||||
vp9_prob sub_mv_ref_prob [SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
|
||||
vp9_prob mbsplit_prob [VP9_NUMMBSPLITS - 1];
|
||||
vp9_prob coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp9_prob hybrid_coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp9_prob coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp9_prob hybrid_coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp9_prob coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp9_prob hybrid_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
|
||||
nmv_context nmvc;
|
||||
nmv_context pre_nmvc;
|
||||
vp8_prob pre_bmode_prob [VP8_BINTRAMODES - 1];
|
||||
vp8_prob pre_ymode_prob [VP8_YMODES - 1]; /* interframe intra mode probs */
|
||||
vp8_prob pre_uv_mode_prob [VP8_YMODES][VP8_UV_MODES - 1];
|
||||
vp8_prob pre_i8x8_mode_prob [VP8_I8X8_MODES - 1];
|
||||
vp8_prob pre_sub_mv_ref_prob [SUBMVREF_COUNT][VP8_SUBMVREFS - 1];
|
||||
vp8_prob pre_mbsplit_prob [VP8_NUMMBSPLITS - 1];
|
||||
unsigned int bmode_counts [VP8_BINTRAMODES];
|
||||
unsigned int ymode_counts [VP8_YMODES]; /* interframe intra mode probs */
|
||||
unsigned int uv_mode_counts [VP8_YMODES][VP8_UV_MODES];
|
||||
unsigned int i8x8_mode_counts [VP8_I8X8_MODES]; /* interframe intra mode probs */
|
||||
unsigned int sub_mv_ref_counts [SUBMVREF_COUNT][VP8_SUBMVREFS];
|
||||
unsigned int mbsplit_counts [VP8_NUMMBSPLITS];
|
||||
vp9_prob pre_bmode_prob [VP9_BINTRAMODES - 1];
|
||||
vp9_prob pre_ymode_prob [VP9_YMODES - 1]; /* interframe intra mode probs */
|
||||
vp9_prob pre_uv_mode_prob [VP9_YMODES][VP9_UV_MODES - 1];
|
||||
vp9_prob pre_i8x8_mode_prob [VP9_I8X8_MODES - 1];
|
||||
vp9_prob pre_sub_mv_ref_prob [SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
|
||||
vp9_prob pre_mbsplit_prob [VP9_NUMMBSPLITS - 1];
|
||||
unsigned int bmode_counts [VP9_BINTRAMODES];
|
||||
unsigned int ymode_counts [VP9_YMODES]; /* interframe intra mode probs */
|
||||
unsigned int uv_mode_counts [VP9_YMODES][VP9_UV_MODES];
|
||||
unsigned int i8x8_mode_counts [VP9_I8X8_MODES]; /* interframe intra mode probs */
|
||||
unsigned int sub_mv_ref_counts [SUBMVREF_COUNT][VP9_SUBMVREFS];
|
||||
unsigned int mbsplit_counts [VP9_NUMMBSPLITS];
|
||||
|
||||
vp8_prob pre_coef_probs [BLOCK_TYPES] [COEF_BANDS]
|
||||
vp9_prob pre_coef_probs [BLOCK_TYPES] [COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob pre_hybrid_coef_probs [BLOCK_TYPES] [COEF_BANDS]
|
||||
vp9_prob pre_hybrid_coef_probs [BLOCK_TYPES] [COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
|
||||
vp8_prob pre_coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS]
|
||||
vp9_prob pre_coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob pre_hybrid_coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS]
|
||||
vp9_prob pre_hybrid_coef_probs_8x8 [BLOCK_TYPES_8X8] [COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
|
||||
vp8_prob pre_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS]
|
||||
vp9_prob pre_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
vp8_prob pre_hybrid_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS]
|
||||
vp9_prob pre_hybrid_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS] [ENTROPY_NODES];
|
||||
|
||||
unsigned int coef_counts [BLOCK_TYPES] [COEF_BANDS]
|
||||
@ -103,8 +103,8 @@ typedef struct frame_contexts {
|
||||
[PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS];
|
||||
|
||||
nmv_context_counts NMVcount;
|
||||
vp8_prob switchable_interp_prob[VP8_SWITCHABLE_FILTERS + 1]
|
||||
[VP8_SWITCHABLE_FILTERS - 1];
|
||||
vp9_prob switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
|
||||
[VP9_SWITCHABLE_FILTERS - 1];
|
||||
|
||||
int mode_context[6][4];
|
||||
int mode_context_a[6][4];
|
||||
@ -135,10 +135,10 @@ typedef enum {
|
||||
|
||||
typedef struct VP9_COMMON_RTCD {
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
vp8_idct_rtcd_vtable_t idct;
|
||||
vp8_subpix_rtcd_vtable_t subpix;
|
||||
vp9_idct_rtcd_vtable_t idct;
|
||||
vp9_subpix_rtcd_vtable_t subpix;
|
||||
#if CONFIG_POSTPROC
|
||||
vp8_postproc_rtcd_vtable_t postproc;
|
||||
vp9_postproc_rtcd_vtable_t postproc;
|
||||
#endif
|
||||
int flags;
|
||||
#else
|
||||
@ -241,37 +241,37 @@ typedef struct VP9Common {
|
||||
|
||||
/* keyframe block modes are predicted by their above, left neighbors */
|
||||
|
||||
vp8_prob kf_bmode_prob [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES - 1];
|
||||
vp8_prob kf_ymode_prob[8][VP8_YMODES - 1]; /* keyframe "" */
|
||||
vp9_prob kf_bmode_prob [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1];
|
||||
vp9_prob kf_ymode_prob[8][VP9_YMODES - 1]; /* keyframe "" */
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
vp8_prob sb_kf_ymode_prob[8][VP8_I32X32_MODES - 1];
|
||||
vp9_prob sb_kf_ymode_prob[8][VP9_I32X32_MODES - 1];
|
||||
#endif
|
||||
int kf_ymode_probs_index;
|
||||
int kf_ymode_probs_update;
|
||||
vp8_prob kf_uv_mode_prob[VP8_YMODES] [VP8_UV_MODES - 1];
|
||||
vp9_prob kf_uv_mode_prob[VP9_YMODES] [VP9_UV_MODES - 1];
|
||||
|
||||
vp8_prob prob_intra_coded;
|
||||
vp8_prob prob_last_coded;
|
||||
vp8_prob prob_gf_coded;
|
||||
vp9_prob prob_intra_coded;
|
||||
vp9_prob prob_last_coded;
|
||||
vp9_prob prob_gf_coded;
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
vp8_prob sb_coded;
|
||||
vp9_prob sb_coded;
|
||||
#endif
|
||||
|
||||
// Context probabilities when using predictive coding of segment id
|
||||
vp8_prob segment_pred_probs[PREDICTION_PROBS];
|
||||
vp9_prob segment_pred_probs[PREDICTION_PROBS];
|
||||
unsigned char temporal_update;
|
||||
|
||||
// Context probabilities for reference frame prediction
|
||||
unsigned char ref_scores[MAX_REF_FRAMES];
|
||||
vp8_prob ref_pred_probs[PREDICTION_PROBS];
|
||||
vp8_prob mod_refprobs[MAX_REF_FRAMES][PREDICTION_PROBS];
|
||||
vp9_prob ref_pred_probs[PREDICTION_PROBS];
|
||||
vp9_prob mod_refprobs[MAX_REF_FRAMES][PREDICTION_PROBS];
|
||||
|
||||
vp8_prob prob_comppred[COMP_PRED_CONTEXTS];
|
||||
vp9_prob prob_comppred[COMP_PRED_CONTEXTS];
|
||||
|
||||
// FIXME contextualize
|
||||
vp8_prob prob_tx[TX_SIZE_MAX - 1];
|
||||
vp9_prob prob_tx[TX_SIZE_MAX - 1];
|
||||
|
||||
vp8_prob mbskip_pred_probs[MBSKIP_CONTEXTS];
|
||||
vp9_prob mbskip_pred_probs[MBSKIP_CONTEXTS];
|
||||
|
||||
FRAME_CONTEXT lfc_a; /* last alt ref entropy */
|
||||
FRAME_CONTEXT lfc; /* last frame entropy */
|
||||
@ -288,7 +288,7 @@ typedef struct VP9Common {
|
||||
int version;
|
||||
|
||||
#ifdef PACKET_TESTING
|
||||
VP8_HEADER oh;
|
||||
VP9_HEADER oh;
|
||||
#endif
|
||||
double bitrate;
|
||||
double framerate;
|
||||
@ -306,9 +306,9 @@ typedef struct VP9Common {
|
||||
int pred_filter_mode; // 0=disabled at the frame level (no MB filtered)
|
||||
// 1=enabled at the frame level (all MB filtered)
|
||||
// 2=specified per MB (1=filtered, 0=non-filtered)
|
||||
vp8_prob prob_pred_filter_off;
|
||||
vp9_prob prob_pred_filter_off;
|
||||
#endif
|
||||
|
||||
} VP9_COMMON;
|
||||
|
||||
#endif
|
||||
#endif // __INC_ONYX_INT_H
|
||||
|
@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8D_H
|
||||
#define __INC_VP8D_H
|
||||
#ifndef __INC_ONYXD_H
|
||||
#define __INC_ONYXD_H
|
||||
|
||||
|
||||
/* Create/destroy static data structures. */
|
||||
@ -24,7 +24,7 @@ extern "C"
|
||||
#include "vpx_ports/mem.h"
|
||||
#include "vpx/vpx_codec.h"
|
||||
|
||||
typedef void *VP8D_PTR;
|
||||
typedef void *VP9D_PTR;
|
||||
typedef struct {
|
||||
int Width;
|
||||
int Height;
|
||||
@ -32,42 +32,37 @@ extern "C"
|
||||
int postprocess;
|
||||
int max_threads;
|
||||
int input_partition;
|
||||
} VP8D_CONFIG;
|
||||
} VP9D_CONFIG;
|
||||
typedef enum {
|
||||
VP8_LAST_FLAG = 1,
|
||||
VP8_GOLD_FLAG = 2,
|
||||
VP8_ALT_FLAG = 4
|
||||
} VP8_REFFRAME;
|
||||
|
||||
typedef enum {
|
||||
VP8D_OK = 0
|
||||
} VP8D_SETTING;
|
||||
VP9_LAST_FLAG = 1,
|
||||
VP9_GOLD_FLAG = 2,
|
||||
VP9_ALT_FLAG = 4
|
||||
} VP9_REFFRAME;
|
||||
|
||||
void vp9_initialize_dec(void);
|
||||
|
||||
int vp9_receive_compressed_data(VP8D_PTR comp, unsigned long size,
|
||||
int vp9_receive_compressed_data(VP9D_PTR comp, unsigned long size,
|
||||
const unsigned char *dest,
|
||||
int64_t time_stamp);
|
||||
|
||||
int vp9_get_raw_frame(VP8D_PTR comp, YV12_BUFFER_CONFIG *sd,
|
||||
int vp9_get_raw_frame(VP9D_PTR comp, YV12_BUFFER_CONFIG *sd,
|
||||
int64_t *time_stamp, int64_t *time_end_stamp,
|
||||
vp8_ppflags_t *flags);
|
||||
vp9_ppflags_t *flags);
|
||||
|
||||
vpx_codec_err_t vp9_get_reference_dec(VP8D_PTR comp,
|
||||
VP8_REFFRAME ref_frame_flag,
|
||||
vpx_codec_err_t vp9_get_reference_dec(VP9D_PTR comp,
|
||||
VP9_REFFRAME ref_frame_flag,
|
||||
YV12_BUFFER_CONFIG *sd);
|
||||
|
||||
vpx_codec_err_t vp9_set_reference_dec(VP8D_PTR comp,
|
||||
VP8_REFFRAME ref_frame_flag,
|
||||
vpx_codec_err_t vp9_set_reference_dec(VP9D_PTR comp,
|
||||
VP9_REFFRAME ref_frame_flag,
|
||||
YV12_BUFFER_CONFIG *sd);
|
||||
|
||||
VP8D_PTR vp9_create_decompressor(VP8D_CONFIG *oxcf);
|
||||
VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf);
|
||||
|
||||
void vp9_remove_decompressor(VP8D_PTR comp);
|
||||
void vp9_remove_decompressor(VP9D_PTR comp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif // __INC_ONYXD_H
|
||||
|
@ -124,8 +124,8 @@ const short vp9_rv[] = {
|
||||
};
|
||||
|
||||
|
||||
extern void vp8_blit_text(const char *msg, unsigned char *address, const int pitch);
|
||||
extern void vp8_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, const int pitch);
|
||||
extern void vp9_blit_text(const char *msg, unsigned char *address, const int pitch);
|
||||
extern void vp9_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, const int pitch);
|
||||
/***********************************************************************************************************
|
||||
*/
|
||||
void vp9_post_proc_down_and_across_c
|
||||
@ -285,13 +285,12 @@ void vp9_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols, i
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void vp9_deblock_and_de_macro_block(YV12_BUFFER_CONFIG *source,
|
||||
YV12_BUFFER_CONFIG *post,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
int flag,
|
||||
vp8_postproc_rtcd_vtable_t *rtcd) {
|
||||
static void deblock_and_de_macro_block(YV12_BUFFER_CONFIG *source,
|
||||
YV12_BUFFER_CONFIG *post,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
int flag,
|
||||
vp9_postproc_rtcd_vtable_t *rtcd) {
|
||||
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
|
||||
int ppl = (int)(level + .5);
|
||||
(void) low_var_thresh;
|
||||
@ -311,7 +310,7 @@ void vp9_deblock(YV12_BUFFER_CONFIG *source,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
int flag,
|
||||
vp8_postproc_rtcd_vtable_t *rtcd) {
|
||||
vp9_postproc_rtcd_vtable_t *rtcd) {
|
||||
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
|
||||
int ppl = (int)(level + .5);
|
||||
(void) low_var_thresh;
|
||||
@ -327,7 +326,7 @@ void vp9_de_noise(YV12_BUFFER_CONFIG *source,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
int flag,
|
||||
vp8_postproc_rtcd_vtable_t *rtcd) {
|
||||
vp9_postproc_rtcd_vtable_t *rtcd) {
|
||||
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
|
||||
int ppl = (int)(level + .5);
|
||||
(void) post;
|
||||
@ -364,7 +363,7 @@ double vp9_gaussian(double sigma, double mu, double x) {
|
||||
(exp(-(x - mu) * (x - mu) / (2 * sigma * sigma)));
|
||||
}
|
||||
|
||||
extern void (*vp8_clear_system_state)(void);
|
||||
extern void (*vp9_clear_system_state)(void);
|
||||
|
||||
|
||||
static void fillrd(struct postproc_state *state, int q, int a) {
|
||||
@ -373,7 +372,7 @@ static void fillrd(struct postproc_state *state, int q, int a) {
|
||||
double sigma;
|
||||
int ai = a, qi = q, i;
|
||||
|
||||
vp8_clear_system_state();
|
||||
vp9_clear_system_state();
|
||||
|
||||
|
||||
sigma = ai + .5 + .6 * (63 - qi) / 63.0;
|
||||
@ -626,7 +625,7 @@ static void constrain_line(int x0, int *x1, int y0, int *y1, int width, int heig
|
||||
#define RTCD_VTABLE(oci) NULL
|
||||
#endif
|
||||
|
||||
int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *ppflags) {
|
||||
int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t *ppflags) {
|
||||
int q = oci->filter_level * 10 / 6;
|
||||
int flags = ppflags->post_proc_flag;
|
||||
int deblock_level = ppflags->deblocking_level;
|
||||
@ -653,17 +652,18 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
vpx_reset_mmx_state();
|
||||
#endif
|
||||
|
||||
if (flags & VP8D_DEMACROBLOCK) {
|
||||
vp9_deblock_and_de_macro_block(oci->frame_to_show, &oci->post_proc_buffer,
|
||||
q + (deblock_level - 5) * 10, 1, 0, RTCD_VTABLE(oci));
|
||||
} else if (flags & VP8D_DEBLOCK) {
|
||||
if (flags & VP9D_DEMACROBLOCK) {
|
||||
deblock_and_de_macro_block(oci->frame_to_show, &oci->post_proc_buffer,
|
||||
q + (deblock_level - 5) * 10, 1, 0,
|
||||
RTCD_VTABLE(oci));
|
||||
} else if (flags & VP9D_DEBLOCK) {
|
||||
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);
|
||||
}
|
||||
|
||||
if (flags & VP8D_ADDNOISE) {
|
||||
if (flags & VP9D_ADDNOISE) {
|
||||
if (oci->postproc_state.last_q != q
|
||||
|| oci->postproc_state.last_noise != noise_level) {
|
||||
fillrd(&oci->postproc_state, 63 - q, noise_level);
|
||||
@ -680,7 +680,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
}
|
||||
|
||||
#if CONFIG_POSTPROC_VISUALIZER
|
||||
if (flags & VP8D_DEBUG_TXT_FRAME_INFO) {
|
||||
if (flags & VP9D_DEBUG_TXT_FRAME_INFO) {
|
||||
char message[512];
|
||||
sprintf(message, "F%1dG%1dQ%3dF%3dP%d_s%dx%d",
|
||||
(oci->frame_type == KEY_FRAME),
|
||||
@ -689,10 +689,10 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
oci->filter_level,
|
||||
flags,
|
||||
oci->mb_cols, oci->mb_rows);
|
||||
vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
|
||||
vp9_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
|
||||
}
|
||||
|
||||
if (flags & VP8D_DEBUG_TXT_MBLK_MODES) {
|
||||
if (flags & VP9D_DEBUG_TXT_MBLK_MODES) {
|
||||
int i, j;
|
||||
unsigned char *y_ptr;
|
||||
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
|
||||
@ -703,14 +703,14 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
|
||||
y_ptr = post->y_buffer + 4 * post->y_stride + 4;
|
||||
|
||||
/* vp8_filter each macro block */
|
||||
/* vp9_filter each macro block */
|
||||
for (i = 0; i < mb_rows; i++) {
|
||||
for (j = 0; j < mb_cols; j++) {
|
||||
char zz[4];
|
||||
|
||||
sprintf(zz, "%c", mi[mb_index].mbmi.mode + 'a');
|
||||
|
||||
vp8_blit_text(zz, y_ptr, post->y_stride);
|
||||
vp9_blit_text(zz, y_ptr, post->y_stride);
|
||||
mb_index++;
|
||||
y_ptr += 16;
|
||||
}
|
||||
@ -721,7 +721,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & VP8D_DEBUG_TXT_DC_DIFF) {
|
||||
if (flags & VP9D_DEBUG_TXT_DC_DIFF) {
|
||||
int i, j;
|
||||
unsigned char *y_ptr;
|
||||
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
|
||||
@ -732,7 +732,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
|
||||
y_ptr = post->y_buffer + 4 * post->y_stride + 4;
|
||||
|
||||
/* vp8_filter each macro block */
|
||||
/* vp9_filter each macro block */
|
||||
for (i = 0; i < mb_rows; i++) {
|
||||
for (j = 0; j < mb_cols; j++) {
|
||||
char zz[4];
|
||||
@ -745,7 +745,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
else
|
||||
sprintf(zz, "%c", dc_diff + '0');
|
||||
|
||||
vp8_blit_text(zz, y_ptr, post->y_stride);
|
||||
vp9_blit_text(zz, y_ptr, post->y_stride);
|
||||
mb_index++;
|
||||
y_ptr += 16;
|
||||
}
|
||||
@ -756,14 +756,14 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & VP8D_DEBUG_TXT_RATE_INFO) {
|
||||
if (flags & VP9D_DEBUG_TXT_RATE_INFO) {
|
||||
char message[512];
|
||||
sprintf(message, "Bitrate: %10.2f frame_rate: %10.2f ", oci->bitrate, oci->framerate);
|
||||
vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
|
||||
vp9_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
|
||||
}
|
||||
|
||||
/* Draw motion vectors */
|
||||
if ((flags & VP8D_DEBUG_DRAW_MV) && ppflags->display_mv_flag) {
|
||||
if ((flags & VP9D_DEBUG_DRAW_MV) && ppflags->display_mv_flag) {
|
||||
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
|
||||
int width = post->y_width;
|
||||
int height = post->y_height;
|
||||
@ -791,7 +791,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 4 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 8, &x1, y0 + 4, &y1, width, height);
|
||||
vp8_blit_line(x0 + 8, x1, y0 + 4, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 8, x1, y0 + 4, y1, y_buffer, y_stride);
|
||||
|
||||
bmi = &mi->bmi[8];
|
||||
|
||||
@ -799,7 +799,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 12 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 8, &x1, y0 + 12, &y1, width, height);
|
||||
vp8_blit_line(x0 + 8, x1, y0 + 12, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 8, x1, y0 + 12, y1, y_buffer, y_stride);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -811,7 +811,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 8 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 4, &x1, y0 + 8, &y1, width, height);
|
||||
vp8_blit_line(x0 + 4, x1, y0 + 8, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 4, x1, y0 + 8, y1, y_buffer, y_stride);
|
||||
|
||||
bmi = &mi->bmi[2];
|
||||
|
||||
@ -819,7 +819,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 8 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 12, &x1, y0 + 8, &y1, width, height);
|
||||
vp8_blit_line(x0 + 12, x1, y0 + 8, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 12, x1, y0 + 8, y1, y_buffer, y_stride);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -831,7 +831,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 4 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 4, &x1, y0 + 4, &y1, width, height);
|
||||
vp8_blit_line(x0 + 4, x1, y0 + 4, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 4, x1, y0 + 4, y1, y_buffer, y_stride);
|
||||
|
||||
bmi = &mi->bmi[2];
|
||||
|
||||
@ -839,7 +839,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 4 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 12, &x1, y0 + 4, &y1, width, height);
|
||||
vp8_blit_line(x0 + 12, x1, y0 + 4, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 12, x1, y0 + 4, y1, y_buffer, y_stride);
|
||||
|
||||
bmi = &mi->bmi[8];
|
||||
|
||||
@ -847,7 +847,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 12 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 4, &x1, y0 + 12, &y1, width, height);
|
||||
vp8_blit_line(x0 + 4, x1, y0 + 12, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 4, x1, y0 + 12, y1, y_buffer, y_stride);
|
||||
|
||||
bmi = &mi->bmi[10];
|
||||
|
||||
@ -855,7 +855,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = y0 + 12 + (mv->row >> 3);
|
||||
|
||||
constrain_line(x0 + 12, &x1, y0 + 12, &y1, width, height);
|
||||
vp8_blit_line(x0 + 12, x1, y0 + 12, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(x0 + 12, x1, y0 + 12, y1, y_buffer, y_stride);
|
||||
break;
|
||||
}
|
||||
case PARTITIONING_4X4:
|
||||
@ -871,7 +871,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
y1 = by0 + 2 + (mv->row >> 3);
|
||||
|
||||
constrain_line(bx0 + 2, &x1, by0 + 2, &y1, width, height);
|
||||
vp8_blit_line(bx0 + 2, x1, by0 + 2, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(bx0 + 2, x1, by0 + 2, y1, y_buffer, y_stride);
|
||||
|
||||
bmi++;
|
||||
}
|
||||
@ -888,12 +888,12 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
|
||||
if (x1 != lx0 && y1 != ly0) {
|
||||
constrain_line(lx0, &x1, ly0 - 1, &y1, width, height);
|
||||
vp8_blit_line(lx0, x1, ly0 - 1, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(lx0, x1, ly0 - 1, y1, y_buffer, y_stride);
|
||||
|
||||
constrain_line(lx0, &x1, ly0 + 1, &y1, width, height);
|
||||
vp8_blit_line(lx0, x1, ly0 + 1, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(lx0, x1, ly0 + 1, y1, y_buffer, y_stride);
|
||||
} else
|
||||
vp8_blit_line(lx0, x1, ly0, y1, y_buffer, y_stride);
|
||||
vp9_blit_line(lx0, x1, ly0, y1, y_buffer, y_stride);
|
||||
}
|
||||
|
||||
mi++;
|
||||
@ -903,7 +903,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
}
|
||||
|
||||
/* Color in block modes */
|
||||
if ((flags & VP8D_DEBUG_CLR_BLK_MODES)
|
||||
if ((flags & VP9D_DEBUG_CLR_BLK_MODES)
|
||||
&& (ppflags->display_mb_modes_flag || ppflags->display_b_modes_flag)) {
|
||||
int y, x;
|
||||
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
|
||||
@ -967,7 +967,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
}
|
||||
|
||||
/* Color in frame reference blocks */
|
||||
if ((flags & VP8D_DEBUG_CLR_FRM_REF_BLKS) && ppflags->display_ref_frame_flag) {
|
||||
if ((flags & VP9D_DEBUG_CLR_FRM_REF_BLKS) && ppflags->display_ref_frame_flag) {
|
||||
int y, x;
|
||||
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
|
||||
int width = post->y_width;
|
||||
|
@ -40,61 +40,61 @@
|
||||
#include "x86/postproc_x86.h"
|
||||
#endif
|
||||
|
||||
#ifndef vp8_postproc_down
|
||||
#define vp8_postproc_down vp9_mbpost_proc_down_c
|
||||
#ifndef vp9_postproc_down
|
||||
#define vp9_postproc_down vp9_mbpost_proc_down_c
|
||||
#endif
|
||||
extern prototype_postproc_inplace(vp8_postproc_down);
|
||||
extern prototype_postproc_inplace(vp9_postproc_down);
|
||||
|
||||
#ifndef vp8_postproc_across
|
||||
#define vp8_postproc_across vp9_mbpost_proc_across_ip_c
|
||||
#ifndef vp9_postproc_across
|
||||
#define vp9_postproc_across vp9_mbpost_proc_across_ip_c
|
||||
#endif
|
||||
extern prototype_postproc_inplace(vp8_postproc_across);
|
||||
extern prototype_postproc_inplace(vp9_postproc_across);
|
||||
|
||||
#ifndef vp8_postproc_downacross
|
||||
#define vp8_postproc_downacross vp9_post_proc_down_and_across_c
|
||||
#ifndef vp9_postproc_downacross
|
||||
#define vp9_postproc_downacross vp9_post_proc_down_and_across_c
|
||||
#endif
|
||||
extern prototype_postproc(vp8_postproc_downacross);
|
||||
extern prototype_postproc(vp9_postproc_downacross);
|
||||
|
||||
#ifndef vp8_postproc_addnoise
|
||||
#define vp8_postproc_addnoise vp9_plane_add_noise_c
|
||||
#ifndef vp9_postproc_addnoise
|
||||
#define vp9_postproc_addnoise vp9_plane_add_noise_c
|
||||
#endif
|
||||
extern prototype_postproc_addnoise(vp8_postproc_addnoise);
|
||||
extern prototype_postproc_addnoise(vp9_postproc_addnoise);
|
||||
|
||||
#ifndef vp8_postproc_blend_mb_inner
|
||||
#define vp8_postproc_blend_mb_inner vp9_blend_mb_inner_c
|
||||
#ifndef vp9_postproc_blend_mb_inner
|
||||
#define vp9_postproc_blend_mb_inner vp9_blend_mb_inner_c
|
||||
#endif
|
||||
extern prototype_postproc_blend_mb_inner(vp8_postproc_blend_mb_inner);
|
||||
extern prototype_postproc_blend_mb_inner(vp9_postproc_blend_mb_inner);
|
||||
|
||||
#ifndef vp8_postproc_blend_mb_outer
|
||||
#define vp8_postproc_blend_mb_outer vp9_blend_mb_outer_c
|
||||
#ifndef vp9_postproc_blend_mb_outer
|
||||
#define vp9_postproc_blend_mb_outer vp9_blend_mb_outer_c
|
||||
#endif
|
||||
extern prototype_postproc_blend_mb_outer(vp8_postproc_blend_mb_outer);
|
||||
extern prototype_postproc_blend_mb_outer(vp9_postproc_blend_mb_outer);
|
||||
|
||||
#ifndef vp8_postproc_blend_b
|
||||
#define vp8_postproc_blend_b vp9_blend_b_c
|
||||
#ifndef vp9_postproc_blend_b
|
||||
#define vp9_postproc_blend_b vp9_blend_b_c
|
||||
#endif
|
||||
extern prototype_postproc_blend_b(vp8_postproc_blend_b);
|
||||
extern prototype_postproc_blend_b(vp9_postproc_blend_b);
|
||||
|
||||
typedef prototype_postproc((*vp8_postproc_fn_t));
|
||||
typedef prototype_postproc_inplace((*vp8_postproc_inplace_fn_t));
|
||||
typedef prototype_postproc_addnoise((*vp8_postproc_addnoise_fn_t));
|
||||
typedef prototype_postproc_blend_mb_inner((*vp8_postproc_blend_mb_inner_fn_t));
|
||||
typedef prototype_postproc_blend_mb_outer((*vp8_postproc_blend_mb_outer_fn_t));
|
||||
typedef prototype_postproc_blend_b((*vp8_postproc_blend_b_fn_t));
|
||||
typedef prototype_postproc((*vp9_postproc_fn_t));
|
||||
typedef prototype_postproc_inplace((*vp9_postproc_inplace_fn_t));
|
||||
typedef prototype_postproc_addnoise((*vp9_postproc_addnoise_fn_t));
|
||||
typedef prototype_postproc_blend_mb_inner((*vp9_postproc_blend_mb_inner_fn_t));
|
||||
typedef prototype_postproc_blend_mb_outer((*vp9_postproc_blend_mb_outer_fn_t));
|
||||
typedef prototype_postproc_blend_b((*vp9_postproc_blend_b_fn_t));
|
||||
typedef struct {
|
||||
vp8_postproc_inplace_fn_t down;
|
||||
vp8_postproc_inplace_fn_t across;
|
||||
vp8_postproc_fn_t downacross;
|
||||
vp8_postproc_addnoise_fn_t addnoise;
|
||||
vp8_postproc_blend_mb_inner_fn_t blend_mb_inner;
|
||||
vp8_postproc_blend_mb_outer_fn_t blend_mb_outer;
|
||||
vp8_postproc_blend_b_fn_t blend_b;
|
||||
} vp8_postproc_rtcd_vtable_t;
|
||||
vp9_postproc_inplace_fn_t down;
|
||||
vp9_postproc_inplace_fn_t across;
|
||||
vp9_postproc_fn_t downacross;
|
||||
vp9_postproc_addnoise_fn_t addnoise;
|
||||
vp9_postproc_blend_mb_inner_fn_t blend_mb_inner;
|
||||
vp9_postproc_blend_mb_outer_fn_t blend_mb_outer;
|
||||
vp9_postproc_blend_b_fn_t blend_b;
|
||||
} vp9_postproc_rtcd_vtable_t;
|
||||
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
#define POSTPROC_INVOKE(ctx,fn) (ctx)->fn
|
||||
#else
|
||||
#define POSTPROC_INVOKE(ctx,fn) vp8_postproc_##fn
|
||||
#define POSTPROC_INVOKE(ctx,fn) vp9_postproc_##fn
|
||||
#endif
|
||||
|
||||
#include "vpx_ports/mem.h"
|
||||
@ -109,7 +109,7 @@ struct postproc_state {
|
||||
#include "onyxc_int.h"
|
||||
#include "ppflags.h"
|
||||
int vp9_post_proc_frame(struct VP9Common *oci, YV12_BUFFER_CONFIG *dest,
|
||||
vp8_ppflags_t *flags);
|
||||
vp9_ppflags_t *flags);
|
||||
|
||||
|
||||
void vp9_de_noise(YV12_BUFFER_CONFIG *source,
|
||||
@ -117,12 +117,12 @@ void vp9_de_noise(YV12_BUFFER_CONFIG *source,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
int flag,
|
||||
vp8_postproc_rtcd_vtable_t *rtcd);
|
||||
vp9_postproc_rtcd_vtable_t *rtcd);
|
||||
|
||||
void vp9_deblock(YV12_BUFFER_CONFIG *source,
|
||||
YV12_BUFFER_CONFIG *post,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
int flag,
|
||||
vp8_postproc_rtcd_vtable_t *rtcd);
|
||||
vp9_postproc_rtcd_vtable_t *rtcd);
|
||||
#endif
|
||||
|
@ -123,12 +123,12 @@ extern loop_filter_block_function *vp8_lf_mbhsimple;
|
||||
extern loop_filter_block_function *vp8_lf_bvsimple;
|
||||
extern loop_filter_block_function *vp8_lf_bhsimple;
|
||||
|
||||
void vp8_clear_c(void) {
|
||||
void vp9_clear_c(void) {
|
||||
}
|
||||
|
||||
void vp9_machine_specific_config(void) {
|
||||
// Pure C:
|
||||
vp8_clear_system_state = vp8_clear_c;
|
||||
vp9_clear_system_state = vp9_clear_c;
|
||||
vp9_recon_b = vp9_recon_b_c;
|
||||
vp9_recon4b = vp9_recon4b_c;
|
||||
vp9_recon2b = vp9_recon2b_c;
|
||||
|
@ -12,17 +12,17 @@
|
||||
#ifndef __INC_PPFLAGS_H
|
||||
#define __INC_PPFLAGS_H
|
||||
enum {
|
||||
VP8D_NOFILTERING = 0,
|
||||
VP8D_DEBLOCK = 1 << 0,
|
||||
VP8D_DEMACROBLOCK = 1 << 1,
|
||||
VP8D_ADDNOISE = 1 << 2,
|
||||
VP8D_DEBUG_TXT_FRAME_INFO = 1 << 3,
|
||||
VP8D_DEBUG_TXT_MBLK_MODES = 1 << 4,
|
||||
VP8D_DEBUG_TXT_DC_DIFF = 1 << 5,
|
||||
VP8D_DEBUG_TXT_RATE_INFO = 1 << 6,
|
||||
VP8D_DEBUG_DRAW_MV = 1 << 7,
|
||||
VP8D_DEBUG_CLR_BLK_MODES = 1 << 8,
|
||||
VP8D_DEBUG_CLR_FRM_REF_BLKS = 1 << 9
|
||||
VP9D_NOFILTERING = 0,
|
||||
VP9D_DEBLOCK = 1 << 0,
|
||||
VP9D_DEMACROBLOCK = 1 << 1,
|
||||
VP9D_ADDNOISE = 1 << 2,
|
||||
VP9D_DEBUG_TXT_FRAME_INFO = 1 << 3,
|
||||
VP9D_DEBUG_TXT_MBLK_MODES = 1 << 4,
|
||||
VP9D_DEBUG_TXT_DC_DIFF = 1 << 5,
|
||||
VP9D_DEBUG_TXT_RATE_INFO = 1 << 6,
|
||||
VP9D_DEBUG_DRAW_MV = 1 << 7,
|
||||
VP9D_DEBUG_CLR_BLK_MODES = 1 << 8,
|
||||
VP9D_DEBUG_CLR_FRM_REF_BLKS = 1 << 9
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@ -33,6 +33,6 @@ typedef struct {
|
||||
int display_mb_modes_flag;
|
||||
int display_b_modes_flag;
|
||||
int display_mv_flag;
|
||||
} vp8_ppflags_t;
|
||||
} vp9_ppflags_t;
|
||||
|
||||
#endif
|
||||
|
@ -73,23 +73,23 @@ unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
|
||||
if (left_in_image && left_mode >= NEARESTMV && left_mode <= SPLITMV)
|
||||
left_interp = vp9_switchable_interp_map[(m - 1)->mbmi.interp_filter];
|
||||
else
|
||||
left_interp = VP8_SWITCHABLE_FILTERS;
|
||||
left_interp = VP9_SWITCHABLE_FILTERS;
|
||||
if (above_in_image && above_mode >= NEARESTMV && above_mode <= SPLITMV)
|
||||
above_interp = vp9_switchable_interp_map[
|
||||
(m - cm->mode_info_stride)->mbmi.interp_filter];
|
||||
else
|
||||
above_interp = VP8_SWITCHABLE_FILTERS;
|
||||
above_interp = VP9_SWITCHABLE_FILTERS;
|
||||
|
||||
if (left_interp == above_interp)
|
||||
pred_context = left_interp;
|
||||
else if (left_interp == VP8_SWITCHABLE_FILTERS &&
|
||||
above_interp != VP8_SWITCHABLE_FILTERS)
|
||||
else if (left_interp == VP9_SWITCHABLE_FILTERS &&
|
||||
above_interp != VP9_SWITCHABLE_FILTERS)
|
||||
pred_context = above_interp;
|
||||
else if (left_interp != VP8_SWITCHABLE_FILTERS &&
|
||||
above_interp == VP8_SWITCHABLE_FILTERS)
|
||||
else if (left_interp != VP9_SWITCHABLE_FILTERS &&
|
||||
above_interp == VP9_SWITCHABLE_FILTERS)
|
||||
pred_context = left_interp;
|
||||
else
|
||||
pred_context = VP8_SWITCHABLE_FILTERS;
|
||||
pred_context = VP9_SWITCHABLE_FILTERS;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -104,10 +104,10 @@ unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
|
||||
|
||||
// This function returns a context probability for coding a given
|
||||
// prediction signal
|
||||
vp8_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
|
||||
vp9_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
|
||||
const MACROBLOCKD *const xd,
|
||||
PRED_ID pred_id) {
|
||||
vp8_prob pred_probability;
|
||||
vp9_prob pred_probability;
|
||||
int pred_context;
|
||||
|
||||
// Get the appropriate prediction context
|
||||
@ -144,10 +144,10 @@ vp8_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
|
||||
|
||||
// This function returns a context probability ptr for coding a given
|
||||
// prediction signal
|
||||
const vp8_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
|
||||
const vp9_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
|
||||
const MACROBLOCKD *const xd,
|
||||
PRED_ID pred_id) {
|
||||
const vp8_prob *pred_probability;
|
||||
const vp9_prob *pred_probability;
|
||||
int pred_context;
|
||||
|
||||
// Get the appropriate prediction context
|
||||
@ -377,26 +377,26 @@ MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
|
||||
|
||||
// Functions to computes a set of modified reference frame probabilities
|
||||
// to use when the prediction of the reference frame value fails
|
||||
void vp9_calc_ref_probs(int *count, vp8_prob *probs) {
|
||||
void vp9_calc_ref_probs(int *count, vp9_prob *probs) {
|
||||
int tot_count;
|
||||
|
||||
tot_count = count[0] + count[1] + count[2] + count[3];
|
||||
if (tot_count) {
|
||||
probs[0] = (vp8_prob)((count[0] * 255 + (tot_count >> 1)) / tot_count);
|
||||
probs[0] = (vp9_prob)((count[0] * 255 + (tot_count >> 1)) / tot_count);
|
||||
probs[0] += !probs[0];
|
||||
} else
|
||||
probs[0] = 128;
|
||||
|
||||
tot_count -= count[0];
|
||||
if (tot_count) {
|
||||
probs[1] = (vp8_prob)((count[1] * 255 + (tot_count >> 1)) / tot_count);
|
||||
probs[1] = (vp9_prob)((count[1] * 255 + (tot_count >> 1)) / tot_count);
|
||||
probs[1] += !probs[1];
|
||||
} else
|
||||
probs[1] = 128;
|
||||
|
||||
tot_count -= count[1];
|
||||
if (tot_count) {
|
||||
probs[2] = (vp8_prob)((count[2] * 255 + (tot_count >> 1)) / tot_count);
|
||||
probs[2] = (vp9_prob)((count[2] * 255 + (tot_count >> 1)) / tot_count);
|
||||
probs[2] += !probs[2];
|
||||
} else
|
||||
probs[2] = 128;
|
||||
|
@ -29,11 +29,11 @@ extern unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
|
||||
const MACROBLOCKD *const xd,
|
||||
PRED_ID pred_id);
|
||||
|
||||
extern vp8_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
|
||||
extern vp9_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
|
||||
const MACROBLOCKD *const xd,
|
||||
PRED_ID pred_id);
|
||||
|
||||
extern const vp8_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
|
||||
extern const vp9_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
|
||||
const MACROBLOCKD *const xd,
|
||||
PRED_ID pred_id);
|
||||
|
||||
|
@ -222,7 +222,7 @@ void vp9_copy_mem8x4_c(
|
||||
|
||||
|
||||
|
||||
void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf) {
|
||||
void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
|
||||
int r;
|
||||
unsigned char *ptr_base;
|
||||
unsigned char *ptr;
|
||||
@ -260,7 +260,7 @@ void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf) {
|
||||
* come from an earlier call to vp9_build_inter_predictors_b()) with the
|
||||
* predictor of the second reference frame / motion vector.
|
||||
*/
|
||||
void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf) {
|
||||
void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
|
||||
int r;
|
||||
unsigned char *ptr_base;
|
||||
unsigned char *ptr;
|
||||
@ -800,7 +800,7 @@ void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
|
||||
|
||||
/*
|
||||
* The following functions should be called after an initial
|
||||
* call to vp8_build_inter16x16_predictors_mb() or _mby()/_mbuv().
|
||||
* call to vp9_build_1st_inter16x16_predictors_mb() or _mby()/_mbuv().
|
||||
* It will run a second sixtap filter on a (different) ref
|
||||
* frame and average the result with the output of the
|
||||
* first sixtap filter. The second reference frame is stored
|
||||
|
@ -55,9 +55,9 @@ extern void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
|
||||
extern void vp9_build_inter_predictors_mb(MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_build_inter_predictors_b(BLOCKD *d, int pitch,
|
||||
vp8_subpix_fn_t sppf);
|
||||
vp9_subpix_fn_t sppf);
|
||||
extern void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
|
||||
vp8_subpix_fn_t sppf);
|
||||
vp9_subpix_fn_t sppf);
|
||||
|
||||
extern void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d,
|
||||
int pitch);
|
||||
|
@ -355,7 +355,7 @@ void vp9_build_intra_predictors_sby_s(MACROBLOCKD *xd) {
|
||||
#endif
|
||||
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
void vp8_build_comp_intra_predictors_mby(MACROBLOCKD *xd) {
|
||||
void vp9_build_comp_intra_predictors_mby(MACROBLOCKD *xd) {
|
||||
unsigned char predictor[2][256];
|
||||
int i;
|
||||
|
||||
@ -414,7 +414,7 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd) {
|
||||
#endif
|
||||
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
void vp8_build_comp_intra_predictors_mbuv(MACROBLOCKD *xd) {
|
||||
void vp9_build_comp_intra_predictors_mbuv(MACROBLOCKD *xd) {
|
||||
unsigned char predictor[2][2][64];
|
||||
int i;
|
||||
|
||||
@ -441,7 +441,7 @@ void vp9_intra8x8_predict(BLOCKD *xd,
|
||||
}
|
||||
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
void vp8_comp_intra8x8_predict(BLOCKD *xd,
|
||||
void vp9_comp_intra8x8_predict(BLOCKD *xd,
|
||||
int mode, int second_mode,
|
||||
unsigned char *out_predictor) {
|
||||
unsigned char predictor[2][8 * 16];
|
||||
@ -467,7 +467,7 @@ void vp9_intra_uv4x4_predict(BLOCKD *xd,
|
||||
}
|
||||
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
void vp8_comp_intra_uv4x4_predict(BLOCKD *xd,
|
||||
void vp9_comp_intra_uv4x4_predict(BLOCKD *xd,
|
||||
int mode, int mode2,
|
||||
unsigned char *out_predictor) {
|
||||
unsigned char predictor[2][8 * 4];
|
||||
|
@ -275,7 +275,7 @@ void vp9_intra4x4_predict_c(BLOCKD *x, int b_mode,
|
||||
}
|
||||
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
void vp8_comp_intra4x4_predict_c(BLOCKD *x,
|
||||
void vp9_comp_intra4x4_predict_c(BLOCKD *x,
|
||||
int b_mode, int b_mode2,
|
||||
unsigned char *out_predictor) {
|
||||
unsigned char predictor[2][4 * 16];
|
||||
|
@ -130,8 +130,8 @@ specialize vp9_build_intra_predictors_sbuv_s;
|
||||
prototype void vp9_build_intra_predictors_mby "struct macroblockd *x"
|
||||
specialize vp9_build_intra_predictors_mby;
|
||||
|
||||
prototype void vp8_build_comp_intra_predictors_mby "struct macroblockd *x"
|
||||
specialize vp8_build_comp_intra_predictors_mby;
|
||||
prototype void vp9_build_comp_intra_predictors_mby "struct macroblockd *x"
|
||||
specialize vp9_build_comp_intra_predictors_mby;
|
||||
|
||||
prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x"
|
||||
specialize vp9_build_intra_predictors_mby_s;
|
||||
@ -142,26 +142,26 @@ specialize vp9_build_intra_predictors_mbuv;
|
||||
prototype void vp9_build_intra_predictors_mbuv_s "struct macroblockd *x"
|
||||
specialize vp9_build_intra_predictors_mbuv_s;
|
||||
|
||||
prototype void vp8_build_comp_intra_predictors_mbuv "struct macroblockd *x"
|
||||
specialize vp8_build_comp_intra_predictors_mbuv;
|
||||
prototype void vp9_build_comp_intra_predictors_mbuv "struct macroblockd *x"
|
||||
specialize vp9_build_comp_intra_predictors_mbuv;
|
||||
|
||||
prototype void vp9_intra4x4_predict "struct blockd *x, int b_mode, unsigned char *predictor"
|
||||
specialize vp9_intra4x4_predict;
|
||||
|
||||
prototype void vp8_comp_intra4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
|
||||
specialize vp8_comp_intra4x4_predict;
|
||||
prototype void vp9_comp_intra4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
|
||||
specialize vp9_comp_intra4x4_predict;
|
||||
|
||||
prototype void vp9_intra8x8_predict "struct blockd *x, int b_mode, unsigned char *predictor"
|
||||
specialize vp9_intra8x8_predict;
|
||||
|
||||
prototype void vp8_comp_intra8x8_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
|
||||
specialize vp8_comp_intra8x8_predict;
|
||||
prototype void vp9_comp_intra8x8_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
|
||||
specialize vp9_comp_intra8x8_predict;
|
||||
|
||||
prototype void vp9_intra_uv4x4_predict "struct blockd *x, int b_mode, unsigned char *predictor"
|
||||
specialize vp9_intra_uv4x4_predict;
|
||||
|
||||
prototype void vp8_comp_intra_uv4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
|
||||
specialize vp8_comp_intra_uv4x4_predict;
|
||||
prototype void vp9_comp_intra_uv4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
|
||||
specialize vp9_comp_intra_uv4x4_predict;
|
||||
|
||||
#
|
||||
# Loopfilter
|
||||
@ -184,47 +184,47 @@ specialize vp9_loop_filter_bh sse2
|
||||
prototype void vp9_loop_filter_bh8x8 "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
|
||||
specialize vp9_loop_filter_bh8x8 sse2
|
||||
|
||||
prototype void vp8_loop_filter_simple_mbv "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp8_loop_filter_simple_mbv mmx sse2 media neon
|
||||
vp8_loop_filter_simple_mbv_c=vp9_loop_filter_simple_vertical_edge_c
|
||||
vp8_loop_filter_simple_mbv_mmx=vp9_loop_filter_simple_vertical_edge_mmx
|
||||
vp8_loop_filter_simple_mbv_sse2=vp9_loop_filter_simple_vertical_edge_sse2
|
||||
vp8_loop_filter_simple_mbv_media=vp9_loop_filter_simple_vertical_edge_armv6
|
||||
vp8_loop_filter_simple_mbv_neon=vp9_loop_filter_mbvs_neon
|
||||
prototype void vp9_loop_filter_simple_mbv "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp9_loop_filter_simple_mbv mmx sse2 media neon
|
||||
vp9_loop_filter_simple_mbv_c=vp9_loop_filter_simple_vertical_edge_c
|
||||
vp9_loop_filter_simple_mbv_mmx=vp9_loop_filter_simple_vertical_edge_mmx
|
||||
vp9_loop_filter_simple_mbv_sse2=vp9_loop_filter_simple_vertical_edge_sse2
|
||||
vp9_loop_filter_simple_mbv_media=vp9_loop_filter_simple_vertical_edge_armv6
|
||||
vp9_loop_filter_simple_mbv_neon=vp9_loop_filter_mbvs_neon
|
||||
|
||||
prototype void vp8_loop_filter_simple_mbh "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp8_loop_filter_simple_mbh mmx sse2 media neon
|
||||
vp8_loop_filter_simple_mbh_c=vp9_loop_filter_simple_horizontal_edge_c
|
||||
vp8_loop_filter_simple_mbh_mmx=vp9_loop_filter_simple_horizontal_edge_mmx
|
||||
vp8_loop_filter_simple_mbh_sse2=vp9_loop_filter_simple_horizontal_edge_sse2
|
||||
vp8_loop_filter_simple_mbh_media=vp9_loop_filter_simple_horizontal_edge_armv6
|
||||
vp8_loop_filter_simple_mbh_neon=vp9_loop_filter_mbhs_neon
|
||||
prototype void vp9_loop_filter_simple_mbh "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp9_loop_filter_simple_mbh mmx sse2 media neon
|
||||
vp9_loop_filter_simple_mbh_c=vp9_loop_filter_simple_horizontal_edge_c
|
||||
vp9_loop_filter_simple_mbh_mmx=vp9_loop_filter_simple_horizontal_edge_mmx
|
||||
vp9_loop_filter_simple_mbh_sse2=vp9_loop_filter_simple_horizontal_edge_sse2
|
||||
vp9_loop_filter_simple_mbh_media=vp9_loop_filter_simple_horizontal_edge_armv6
|
||||
vp9_loop_filter_simple_mbh_neon=vp9_loop_filter_mbhs_neon
|
||||
|
||||
prototype void vp8_loop_filter_simple_bv "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp8_loop_filter_simple_bv mmx sse2 media neon
|
||||
vp8_loop_filter_simple_bv_c=vp9_loop_filter_bvs_c
|
||||
vp8_loop_filter_simple_bv_mmx=vp9_loop_filter_bvs_mmx
|
||||
vp8_loop_filter_simple_bv_sse2=vp9_loop_filter_bvs_sse2
|
||||
vp8_loop_filter_simple_bv_media=vp9_loop_filter_bvs_armv6
|
||||
vp8_loop_filter_simple_bv_neon=vp9_loop_filter_bvs_neon
|
||||
prototype void vp9_loop_filter_simple_bv "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp9_loop_filter_simple_bv mmx sse2 media neon
|
||||
vp9_loop_filter_simple_bv_c=vp9_loop_filter_bvs_c
|
||||
vp9_loop_filter_simple_bv_mmx=vp9_loop_filter_bvs_mmx
|
||||
vp9_loop_filter_simple_bv_sse2=vp9_loop_filter_bvs_sse2
|
||||
vp9_loop_filter_simple_bv_media=vp9_loop_filter_bvs_armv6
|
||||
vp9_loop_filter_simple_bv_neon=vp9_loop_filter_bvs_neon
|
||||
|
||||
prototype void vp8_loop_filter_simple_bh "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp8_loop_filter_simple_bh mmx sse2 media neon
|
||||
vp8_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c
|
||||
vp8_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx
|
||||
vp8_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2
|
||||
vp8_loop_filter_simple_bh_media=vp9_loop_filter_bhs_armv6
|
||||
vp8_loop_filter_simple_bh_neon=vp9_loop_filter_bhs_neon
|
||||
prototype void vp9_loop_filter_simple_bh "unsigned char *y, int ystride, const unsigned char *blimit"
|
||||
specialize vp9_loop_filter_simple_bh mmx sse2 media neon
|
||||
vp9_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c
|
||||
vp9_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx
|
||||
vp9_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2
|
||||
vp9_loop_filter_simple_bh_media=vp9_loop_filter_bhs_armv6
|
||||
vp9_loop_filter_simple_bh_neon=vp9_loop_filter_bhs_neon
|
||||
|
||||
#
|
||||
# sad 16x3, 3x16
|
||||
#
|
||||
if [ "$CONFIG_NEWBESTREFMV" = "yes" ]; then
|
||||
prototype unsigned int vp8_sad16x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
|
||||
specialize vp8_sad16x3 sse2
|
||||
prototype unsigned int vp9_sad16x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
|
||||
specialize vp9_sad16x3 sse2
|
||||
|
||||
prototype unsigned int vp8_sad3x16 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
|
||||
specialize vp8_sad3x16 sse2
|
||||
prototype unsigned int vp9_sad3x16 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
|
||||
specialize vp9_sad3x16 sse2
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -24,181 +24,181 @@
|
||||
#include "arm/subpixel_arm.h"
|
||||
#endif
|
||||
|
||||
#ifndef vp8_subpix_sixtap16x16
|
||||
#define vp8_subpix_sixtap16x16 vp9_sixtap_predict16x16_c
|
||||
#ifndef vp9_subpix_sixtap16x16
|
||||
#define vp9_subpix_sixtap16x16 vp9_sixtap_predict16x16_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap16x16);
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap16x16);
|
||||
|
||||
#ifndef vp8_subpix_sixtap8x8
|
||||
#define vp8_subpix_sixtap8x8 vp9_sixtap_predict8x8_c
|
||||
#ifndef vp9_subpix_sixtap8x8
|
||||
#define vp9_subpix_sixtap8x8 vp9_sixtap_predict8x8_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap8x8);
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap8x8);
|
||||
|
||||
#ifndef vp8_subpix_sixtap_avg16x16
|
||||
#define vp8_subpix_sixtap_avg16x16 vp9_sixtap_predict_avg16x16_c
|
||||
#ifndef vp9_subpix_sixtap_avg16x16
|
||||
#define vp9_subpix_sixtap_avg16x16 vp9_sixtap_predict_avg16x16_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap_avg16x16);
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap_avg16x16);
|
||||
|
||||
#ifndef vp8_subpix_sixtap_avg8x8
|
||||
#define vp8_subpix_sixtap_avg8x8 vp9_sixtap_predict_avg8x8_c
|
||||
#ifndef vp9_subpix_sixtap_avg8x8
|
||||
#define vp9_subpix_sixtap_avg8x8 vp9_sixtap_predict_avg8x8_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap_avg8x8);
|
||||
#ifndef vp8_subpix_sixtap8x4
|
||||
#define vp8_subpix_sixtap8x4 vp9_sixtap_predict8x4_c
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap_avg8x8);
|
||||
#ifndef vp9_subpix_sixtap8x4
|
||||
#define vp9_subpix_sixtap8x4 vp9_sixtap_predict8x4_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap8x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap8x4);
|
||||
|
||||
#ifndef vp8_subpix_sixtap4x4
|
||||
#define vp8_subpix_sixtap4x4 vp9_sixtap_predict_c
|
||||
#ifndef vp9_subpix_sixtap4x4
|
||||
#define vp9_subpix_sixtap4x4 vp9_sixtap_predict_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap4x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap4x4);
|
||||
|
||||
#ifndef vp8_subpix_sixtap_avg4x4
|
||||
#define vp8_subpix_sixtap_avg4x4 vp9_sixtap_predict_avg_c
|
||||
#ifndef vp9_subpix_sixtap_avg4x4
|
||||
#define vp9_subpix_sixtap_avg4x4 vp9_sixtap_predict_avg_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_sixtap_avg4x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_sixtap_avg4x4);
|
||||
|
||||
#ifndef vp8_subpix_eighttap16x16
|
||||
#define vp8_subpix_eighttap16x16 vp9_eighttap_predict16x16_c
|
||||
#ifndef vp9_subpix_eighttap16x16
|
||||
#define vp9_subpix_eighttap16x16 vp9_eighttap_predict16x16_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap16x16);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap16x16);
|
||||
|
||||
#ifndef vp8_subpix_eighttap8x8
|
||||
#define vp8_subpix_eighttap8x8 vp9_eighttap_predict8x8_c
|
||||
#ifndef vp9_subpix_eighttap8x8
|
||||
#define vp9_subpix_eighttap8x8 vp9_eighttap_predict8x8_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap8x8);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap8x8);
|
||||
|
||||
#ifndef vp8_subpix_eighttap_avg16x16
|
||||
#define vp8_subpix_eighttap_avg16x16 vp9_eighttap_predict_avg16x16_c
|
||||
#ifndef vp9_subpix_eighttap_avg16x16
|
||||
#define vp9_subpix_eighttap_avg16x16 vp9_eighttap_predict_avg16x16_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap_avg16x16);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap_avg16x16);
|
||||
|
||||
#ifndef vp8_subpix_eighttap_avg8x8
|
||||
#define vp8_subpix_eighttap_avg8x8 vp9_eighttap_predict_avg8x8_c
|
||||
#ifndef vp9_subpix_eighttap_avg8x8
|
||||
#define vp9_subpix_eighttap_avg8x8 vp9_eighttap_predict_avg8x8_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap_avg8x8);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap_avg8x8);
|
||||
|
||||
#ifndef vp8_subpix_eighttap8x4
|
||||
#define vp8_subpix_eighttap8x4 vp9_eighttap_predict8x4_c
|
||||
#ifndef vp9_subpix_eighttap8x4
|
||||
#define vp9_subpix_eighttap8x4 vp9_eighttap_predict8x4_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap8x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap8x4);
|
||||
|
||||
#ifndef vp8_subpix_eighttap4x4
|
||||
#define vp8_subpix_eighttap4x4 vp9_eighttap_predict_c
|
||||
#ifndef vp9_subpix_eighttap4x4
|
||||
#define vp9_subpix_eighttap4x4 vp9_eighttap_predict_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap4x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap4x4);
|
||||
|
||||
#ifndef vp8_subpix_eighttap_avg4x4
|
||||
#define vp8_subpix_eighttap_avg4x4 vp9_eighttap_predict_avg4x4_c
|
||||
#ifndef vp9_subpix_eighttap_avg4x4
|
||||
#define vp9_subpix_eighttap_avg4x4 vp9_eighttap_predict_avg4x4_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap_avg4x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap_avg4x4);
|
||||
|
||||
#ifndef vp8_subpix_eighttap16x16_sharp
|
||||
#define vp8_subpix_eighttap16x16_sharp vp9_eighttap_predict16x16_sharp_c
|
||||
#ifndef vp9_subpix_eighttap16x16_sharp
|
||||
#define vp9_subpix_eighttap16x16_sharp vp9_eighttap_predict16x16_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap16x16_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap16x16_sharp);
|
||||
|
||||
#ifndef vp8_subpix_eighttap8x8_sharp
|
||||
#define vp8_subpix_eighttap8x8_sharp vp9_eighttap_predict8x8_sharp_c
|
||||
#ifndef vp9_subpix_eighttap8x8_sharp
|
||||
#define vp9_subpix_eighttap8x8_sharp vp9_eighttap_predict8x8_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap8x8_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap8x8_sharp);
|
||||
|
||||
#ifndef vp8_subpix_eighttap_avg16x16_sharp
|
||||
#define vp8_subpix_eighttap_avg16x16_sharp vp9_eighttap_predict_avg16x16_sharp_c
|
||||
#ifndef vp9_subpix_eighttap_avg16x16_sharp
|
||||
#define vp9_subpix_eighttap_avg16x16_sharp vp9_eighttap_predict_avg16x16_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap_avg16x16_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap_avg16x16_sharp);
|
||||
|
||||
#ifndef vp8_subpix_eighttap_avg8x8_sharp
|
||||
#define vp8_subpix_eighttap_avg8x8_sharp vp9_eighttap_predict_avg8x8_sharp_c
|
||||
#ifndef vp9_subpix_eighttap_avg8x8_sharp
|
||||
#define vp9_subpix_eighttap_avg8x8_sharp vp9_eighttap_predict_avg8x8_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap_avg8x8_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap_avg8x8_sharp);
|
||||
|
||||
#ifndef vp8_subpix_eighttap8x4_sharp
|
||||
#define vp8_subpix_eighttap8x4_sharp vp9_eighttap_predict8x4_sharp_c
|
||||
#ifndef vp9_subpix_eighttap8x4_sharp
|
||||
#define vp9_subpix_eighttap8x4_sharp vp9_eighttap_predict8x4_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap8x4_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap8x4_sharp);
|
||||
|
||||
#ifndef vp8_subpix_eighttap4x4_sharp
|
||||
#define vp8_subpix_eighttap4x4_sharp vp9_eighttap_predict_sharp_c
|
||||
#ifndef vp9_subpix_eighttap4x4_sharp
|
||||
#define vp9_subpix_eighttap4x4_sharp vp9_eighttap_predict_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap4x4_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap4x4_sharp);
|
||||
|
||||
#ifndef vp8_subpix_eighttap_avg4x4_sharp
|
||||
#define vp8_subpix_eighttap_avg4x4_sharp vp9_eighttap_predict_avg4x4_sharp_c
|
||||
#ifndef vp9_subpix_eighttap_avg4x4_sharp
|
||||
#define vp9_subpix_eighttap_avg4x4_sharp vp9_eighttap_predict_avg4x4_sharp_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_eighttap_avg4x4_sharp);
|
||||
extern prototype_subpixel_predict(vp9_subpix_eighttap_avg4x4_sharp);
|
||||
|
||||
#ifndef vp8_subpix_bilinear16x16
|
||||
#define vp8_subpix_bilinear16x16 vp9_bilinear_predict16x16_c
|
||||
#ifndef vp9_subpix_bilinear16x16
|
||||
#define vp9_subpix_bilinear16x16 vp9_bilinear_predict16x16_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear16x16);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear16x16);
|
||||
|
||||
#ifndef vp8_subpix_bilinear8x8
|
||||
#define vp8_subpix_bilinear8x8 vp9_bilinear_predict8x8_c
|
||||
#ifndef vp9_subpix_bilinear8x8
|
||||
#define vp9_subpix_bilinear8x8 vp9_bilinear_predict8x8_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear8x8);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear8x8);
|
||||
|
||||
#ifndef vp8_subpix_bilinear_avg16x16
|
||||
#define vp8_subpix_bilinear_avg16x16 vp9_bilinear_predict_avg16x16_c
|
||||
#ifndef vp9_subpix_bilinear_avg16x16
|
||||
#define vp9_subpix_bilinear_avg16x16 vp9_bilinear_predict_avg16x16_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear_avg16x16);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear_avg16x16);
|
||||
|
||||
#ifndef vp8_subpix_bilinear_avg8x8
|
||||
#define vp8_subpix_bilinear_avg8x8 vp9_bilinear_predict_avg8x8_c
|
||||
#ifndef vp9_subpix_bilinear_avg8x8
|
||||
#define vp9_subpix_bilinear_avg8x8 vp9_bilinear_predict_avg8x8_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear_avg8x8);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear_avg8x8);
|
||||
|
||||
#ifndef vp8_subpix_bilinear8x4
|
||||
#define vp8_subpix_bilinear8x4 vp9_bilinear_predict8x4_c
|
||||
#ifndef vp9_subpix_bilinear8x4
|
||||
#define vp9_subpix_bilinear8x4 vp9_bilinear_predict8x4_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear8x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear8x4);
|
||||
|
||||
#ifndef vp8_subpix_bilinear4x4
|
||||
#define vp8_subpix_bilinear4x4 vp9_bilinear_predict4x4_c
|
||||
#ifndef vp9_subpix_bilinear4x4
|
||||
#define vp9_subpix_bilinear4x4 vp9_bilinear_predict4x4_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear4x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear4x4);
|
||||
|
||||
#ifndef vp8_subpix_bilinear_avg4x4
|
||||
#define vp8_subpix_bilinear_avg4x4 vp9_bilinear_predict_avg4x4_c
|
||||
#ifndef vp9_subpix_bilinear_avg4x4
|
||||
#define vp9_subpix_bilinear_avg4x4 vp9_bilinear_predict_avg4x4_c
|
||||
#endif
|
||||
extern prototype_subpixel_predict(vp8_subpix_bilinear_avg4x4);
|
||||
extern prototype_subpixel_predict(vp9_subpix_bilinear_avg4x4);
|
||||
|
||||
typedef prototype_subpixel_predict((*vp8_subpix_fn_t));
|
||||
typedef prototype_subpixel_predict((*vp9_subpix_fn_t));
|
||||
typedef struct {
|
||||
vp8_subpix_fn_t eighttap16x16;
|
||||
vp8_subpix_fn_t eighttap8x8;
|
||||
vp8_subpix_fn_t eighttap_avg16x16;
|
||||
vp8_subpix_fn_t eighttap_avg8x8;
|
||||
vp8_subpix_fn_t eighttap_avg4x4;
|
||||
vp8_subpix_fn_t eighttap8x4;
|
||||
vp8_subpix_fn_t eighttap4x4;
|
||||
vp8_subpix_fn_t eighttap16x16_sharp;
|
||||
vp8_subpix_fn_t eighttap8x8_sharp;
|
||||
vp8_subpix_fn_t eighttap_avg16x16_sharp;
|
||||
vp8_subpix_fn_t eighttap_avg8x8_sharp;
|
||||
vp8_subpix_fn_t eighttap_avg4x4_sharp;
|
||||
vp8_subpix_fn_t eighttap8x4_sharp;
|
||||
vp8_subpix_fn_t eighttap4x4_sharp;
|
||||
vp8_subpix_fn_t sixtap16x16;
|
||||
vp8_subpix_fn_t sixtap8x8;
|
||||
vp8_subpix_fn_t sixtap_avg16x16;
|
||||
vp8_subpix_fn_t sixtap_avg8x8;
|
||||
vp8_subpix_fn_t sixtap8x4;
|
||||
vp8_subpix_fn_t sixtap4x4;
|
||||
vp8_subpix_fn_t sixtap_avg4x4;
|
||||
vp8_subpix_fn_t bilinear16x16;
|
||||
vp8_subpix_fn_t bilinear8x8;
|
||||
vp8_subpix_fn_t bilinear_avg16x16;
|
||||
vp8_subpix_fn_t bilinear_avg8x8;
|
||||
vp8_subpix_fn_t bilinear8x4;
|
||||
vp8_subpix_fn_t bilinear4x4;
|
||||
vp8_subpix_fn_t bilinear_avg4x4;
|
||||
} vp8_subpix_rtcd_vtable_t;
|
||||
vp9_subpix_fn_t eighttap16x16;
|
||||
vp9_subpix_fn_t eighttap8x8;
|
||||
vp9_subpix_fn_t eighttap_avg16x16;
|
||||
vp9_subpix_fn_t eighttap_avg8x8;
|
||||
vp9_subpix_fn_t eighttap_avg4x4;
|
||||
vp9_subpix_fn_t eighttap8x4;
|
||||
vp9_subpix_fn_t eighttap4x4;
|
||||
vp9_subpix_fn_t eighttap16x16_sharp;
|
||||
vp9_subpix_fn_t eighttap8x8_sharp;
|
||||
vp9_subpix_fn_t eighttap_avg16x16_sharp;
|
||||
vp9_subpix_fn_t eighttap_avg8x8_sharp;
|
||||
vp9_subpix_fn_t eighttap_avg4x4_sharp;
|
||||
vp9_subpix_fn_t eighttap8x4_sharp;
|
||||
vp9_subpix_fn_t eighttap4x4_sharp;
|
||||
vp9_subpix_fn_t sixtap16x16;
|
||||
vp9_subpix_fn_t sixtap8x8;
|
||||
vp9_subpix_fn_t sixtap_avg16x16;
|
||||
vp9_subpix_fn_t sixtap_avg8x8;
|
||||
vp9_subpix_fn_t sixtap8x4;
|
||||
vp9_subpix_fn_t sixtap4x4;
|
||||
vp9_subpix_fn_t sixtap_avg4x4;
|
||||
vp9_subpix_fn_t bilinear16x16;
|
||||
vp9_subpix_fn_t bilinear8x8;
|
||||
vp9_subpix_fn_t bilinear_avg16x16;
|
||||
vp9_subpix_fn_t bilinear_avg8x8;
|
||||
vp9_subpix_fn_t bilinear8x4;
|
||||
vp9_subpix_fn_t bilinear4x4;
|
||||
vp9_subpix_fn_t bilinear_avg4x4;
|
||||
} vp9_subpix_rtcd_vtable_t;
|
||||
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
#define SUBPIX_INVOKE(ctx,fn) (ctx)->fn
|
||||
#else
|
||||
#define SUBPIX_INVOKE(ctx,fn) vp8_subpix_##fn
|
||||
#define SUBPIX_INVOKE(ctx,fn) vp9_subpix_##fn
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -12,9 +12,9 @@
|
||||
#include "vpx_ports/config.h"
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
void vpx_reset_mmx_state(void);
|
||||
#define vp8_clear_system_state() vpx_reset_mmx_state()
|
||||
#define vp9_clear_system_state() vpx_reset_mmx_state()
|
||||
#else
|
||||
#define vp8_clear_system_state()
|
||||
#define vp9_clear_system_state()
|
||||
#endif
|
||||
|
||||
struct VP9Common;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
void vp8_blit_text(const char *msg, unsigned char *address, const int pitch) {
|
||||
void vp9_blit_text(const char *msg, unsigned char *address, const int pitch) {
|
||||
int letter_bitmap;
|
||||
unsigned char *output_pos = address;
|
||||
int colpos;
|
||||
@ -54,7 +54,7 @@ static void plot(const int x, const int y, unsigned char *image, const int pitch
|
||||
}
|
||||
|
||||
/* Bresenham line algorithm */
|
||||
void vp8_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, const int pitch) {
|
||||
void vp9_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, const int pitch) {
|
||||
int steep = abs(y1 - y0) > abs(x1 - x0);
|
||||
int deltax, deltay;
|
||||
int error, ystep, y, x;
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include "treecoder.h"
|
||||
|
||||
static void tree2tok(
|
||||
struct vp8_token_struct *const p,
|
||||
vp8_tree t,
|
||||
struct vp9_token_struct *const p,
|
||||
vp9_tree t,
|
||||
int i,
|
||||
int v,
|
||||
int L
|
||||
@ -29,7 +29,7 @@ static void tree2tok(
|
||||
++L;
|
||||
|
||||
do {
|
||||
const vp8_tree_index j = t[i++];
|
||||
const vp9_tree_index j = t[i++];
|
||||
|
||||
if (j <= 0) {
|
||||
p[-j].value = v;
|
||||
@ -39,19 +39,19 @@ static void tree2tok(
|
||||
} while (++v & 1);
|
||||
}
|
||||
|
||||
void vp9_tokens_from_tree(struct vp8_token_struct *p, vp8_tree t) {
|
||||
void vp9_tokens_from_tree(struct vp9_token_struct *p, vp9_tree t) {
|
||||
tree2tok(p, t, 0, 0, 0);
|
||||
}
|
||||
|
||||
void vp9_tokens_from_tree_offset(struct vp8_token_struct *p, vp8_tree t,
|
||||
void vp9_tokens_from_tree_offset(struct vp9_token_struct *p, vp9_tree t,
|
||||
int offset) {
|
||||
tree2tok(p - offset, t, 0, 0, 0);
|
||||
}
|
||||
|
||||
static void branch_counts(
|
||||
int n, /* n = size of alphabet */
|
||||
vp8_token tok [ /* n */ ],
|
||||
vp8_tree tree,
|
||||
vp9_token tok [ /* n */ ],
|
||||
vp9_tree tree,
|
||||
unsigned int branch_ct [ /* n-1 */ ] [2],
|
||||
const unsigned int num_events[ /* n */ ]
|
||||
) {
|
||||
@ -73,7 +73,7 @@ static void branch_counts(
|
||||
const int enc = tok[t].value;
|
||||
const unsigned int ct = num_events[t];
|
||||
|
||||
vp8_tree_index i = 0;
|
||||
vp9_tree_index i = 0;
|
||||
|
||||
do {
|
||||
const int b = (enc >> --L) & 1;
|
||||
@ -96,9 +96,9 @@ static void branch_counts(
|
||||
|
||||
void vp9_tree_probs_from_distribution(
|
||||
int n, /* n = size of alphabet */
|
||||
vp8_token tok [ /* n */ ],
|
||||
vp8_tree tree,
|
||||
vp8_prob probs [ /* n-1 */ ],
|
||||
vp9_token tok [ /* n */ ],
|
||||
vp9_tree tree,
|
||||
vp9_prob probs [ /* n-1 */ ],
|
||||
unsigned int branch_ct [ /* n-1 */ ] [2],
|
||||
const unsigned int num_events[ /* n */ ],
|
||||
unsigned int Pfac,
|
||||
@ -121,13 +121,13 @@ void vp9_tree_probs_from_distribution(
|
||||
const unsigned int p = ((c[0] * Pfac) + (rd ? tot >> 1 : 0)) / tot;
|
||||
probs[t] = p < 256 ? (p ? p : 1) : 255; /* agree w/old version for now */
|
||||
} else
|
||||
probs[t] = vp8_prob_half;
|
||||
probs[t] = vp9_prob_half;
|
||||
} while (++t < tree_len);
|
||||
}
|
||||
|
||||
vp8_prob vp9_bin_prob_from_distribution(const unsigned int counts[2]) {
|
||||
vp9_prob vp9_bin_prob_from_distribution(const unsigned int counts[2]) {
|
||||
int tot_count = counts[0] + counts[1];
|
||||
vp8_prob prob;
|
||||
vp9_prob prob;
|
||||
if (tot_count) {
|
||||
prob = (counts[0] * 255 + (tot_count >> 1)) / tot_count;
|
||||
prob += !prob;
|
||||
|
@ -12,14 +12,11 @@
|
||||
#ifndef __INC_TREECODER_H
|
||||
#define __INC_TREECODER_H
|
||||
|
||||
typedef unsigned char vp8bc_index_t; /* probability index */
|
||||
typedef unsigned char vp9_prob;
|
||||
|
||||
#define vp9_prob_half ( (vp9_prob) 128)
|
||||
|
||||
typedef unsigned char vp8_prob;
|
||||
|
||||
#define vp8_prob_half ( (vp8_prob) 128)
|
||||
|
||||
typedef signed char vp8_tree_index;
|
||||
typedef signed char vp9_tree_index;
|
||||
struct bool_coder_spec;
|
||||
|
||||
typedef struct bool_coder_spec bool_coder_spec;
|
||||
@ -32,28 +29,28 @@ typedef const bool_reader c_bool_reader;
|
||||
|
||||
|
||||
|
||||
# define vp8_complement( x) (255 - x)
|
||||
# define vp9_complement( x) (255 - x)
|
||||
|
||||
|
||||
/* We build coding trees compactly in arrays.
|
||||
Each node of the tree is a pair of vp8_tree_indices.
|
||||
Each node of the tree is a pair of vp9_tree_indices.
|
||||
Array index often references a corresponding probability table.
|
||||
Index <= 0 means done encoding/decoding and value = -Index,
|
||||
Index > 0 means need another bit, specification at index.
|
||||
Nonnegative indices are always even; processing begins at node 0. */
|
||||
|
||||
typedef const vp8_tree_index vp8_tree[], *vp8_tree_p;
|
||||
typedef const vp9_tree_index vp9_tree[], *vp9_tree_p;
|
||||
|
||||
|
||||
typedef const struct vp8_token_struct {
|
||||
typedef const struct vp9_token_struct {
|
||||
int value;
|
||||
int Len;
|
||||
} vp8_token;
|
||||
} vp9_token;
|
||||
|
||||
/* Construct encoding array from tree. */
|
||||
|
||||
void vp9_tokens_from_tree(struct vp8_token_struct *, vp8_tree);
|
||||
void vp9_tokens_from_tree_offset(struct vp8_token_struct *, vp8_tree,
|
||||
void vp9_tokens_from_tree(struct vp9_token_struct *, vp9_tree);
|
||||
void vp9_tokens_from_tree_offset(struct vp9_token_struct *, vp9_tree,
|
||||
int offset);
|
||||
|
||||
|
||||
@ -64,27 +61,15 @@ void vp9_tokens_from_tree_offset(struct vp8_token_struct *, vp8_tree,
|
||||
|
||||
void vp9_tree_probs_from_distribution(
|
||||
int n, /* n = size of alphabet */
|
||||
vp8_token tok [ /* n */ ],
|
||||
vp8_tree tree,
|
||||
vp8_prob probs [ /* n-1 */ ],
|
||||
vp9_token tok [ /* n */ ],
|
||||
vp9_tree tree,
|
||||
vp9_prob probs [ /* n-1 */ ],
|
||||
unsigned int branch_ct [ /* n-1 */ ] [2],
|
||||
const unsigned int num_events[ /* n */ ],
|
||||
unsigned int Pfactor,
|
||||
int Round
|
||||
);
|
||||
|
||||
/* Variant of above using coder spec rather than hardwired 8-bit probs. */
|
||||
|
||||
void vp8bc_tree_probs_from_distribution(
|
||||
int n, /* n = size of alphabet */
|
||||
vp8_token tok [ /* n */ ],
|
||||
vp8_tree tree,
|
||||
vp8_prob probs [ /* n-1 */ ],
|
||||
unsigned int branch_ct [ /* n-1 */ ] [2],
|
||||
const unsigned int num_events[ /* n */ ],
|
||||
c_bool_coder_spec *s
|
||||
);
|
||||
|
||||
vp8_prob vp9_bin_prob_from_distribution(const unsigned int counts[2]);
|
||||
vp9_prob vp9_bin_prob_from_distribution(const unsigned int counts[2]);
|
||||
|
||||
#endif
|
||||
|
@ -25,10 +25,10 @@
|
||||
// coefficients.
|
||||
|
||||
DECLARE_ALIGNED(16, static const unsigned int, rounding_c[4]) = {
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
};
|
||||
|
||||
// Creating a macro to do more than four pixels at once to hide instruction
|
||||
@ -62,7 +62,7 @@ DECLARE_ALIGNED(16, static const unsigned int, rounding_c[4]) = {
|
||||
const __m128i mad4567 = _mm_add_epi32(mad45, mad67); \
|
||||
__m128i mad_all = _mm_add_epi32(mad0123, mad4567); \
|
||||
mad_all = _mm_add_epi32(mad_all, rounding); \
|
||||
result = _mm_srai_epi32(mad_all, VP8_FILTER_SHIFT); \
|
||||
result = _mm_srai_epi32(mad_all, VP9_FILTER_SHIFT); \
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_4x4_8_sse2
|
||||
|
@ -47,10 +47,10 @@ DECLARE_ALIGNED(16, static const unsigned char, mask4567_c[16]) = {
|
||||
0x09, 0x0A,
|
||||
};
|
||||
DECLARE_ALIGNED(16, static const unsigned int, rounding_c[4]) = {
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP8_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
VP9_FILTER_WEIGHT >> 1,
|
||||
};
|
||||
DECLARE_ALIGNED(16, static const unsigned char, transpose_c[16]) = {
|
||||
0, 4, 8, 12,
|
||||
@ -81,7 +81,7 @@ DECLARE_ALIGNED(16, static const unsigned char, transpose_c[16]) = {
|
||||
__m128i mad4567 = _mm_add_epi32(mad45, mad67); \
|
||||
__m128i mad_all = _mm_add_epi32(mad0123, mad4567); \
|
||||
mad_all = _mm_add_epi32(mad_all, rounding); \
|
||||
result = _mm_srai_epi32(mad_all, VP8_FILTER_SHIFT); \
|
||||
result = _mm_srai_epi32(mad_all, VP9_FILTER_SHIFT); \
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_4x4_8_sse4_1
|
||||
@ -219,7 +219,7 @@ void vp9_filter_block2d_4x4_8_sse4_1
|
||||
__m128i mad4567 = _mm_add_epi32(mad45, mad67);
|
||||
__m128i mad_all = _mm_add_epi32(mad0123, mad4567);
|
||||
mad_all = _mm_add_epi32(mad_all, rounding);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP8_FILTER_SHIFT);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP9_FILTER_SHIFT);
|
||||
mad_all = _mm_packs_epi32(mad_all, mad_all);
|
||||
col0 = _mm_packus_epi16(mad_all, mad_all);
|
||||
}
|
||||
@ -242,7 +242,7 @@ void vp9_filter_block2d_4x4_8_sse4_1
|
||||
__m128i mad4567 = _mm_add_epi32(mad45, mad67);
|
||||
__m128i mad_all = _mm_add_epi32(mad0123, mad4567);
|
||||
mad_all = _mm_add_epi32(mad_all, rounding);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP8_FILTER_SHIFT);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP9_FILTER_SHIFT);
|
||||
mad_all = _mm_packs_epi32(mad_all, mad_all);
|
||||
col1 = _mm_packus_epi16(mad_all, mad_all);
|
||||
}
|
||||
@ -265,7 +265,7 @@ void vp9_filter_block2d_4x4_8_sse4_1
|
||||
__m128i mad4567 = _mm_add_epi32(mad45, mad67);
|
||||
__m128i mad_all = _mm_add_epi32(mad0123, mad4567);
|
||||
mad_all = _mm_add_epi32(mad_all, rounding);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP8_FILTER_SHIFT);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP9_FILTER_SHIFT);
|
||||
mad_all = _mm_packs_epi32(mad_all, mad_all);
|
||||
col2 = _mm_packus_epi16(mad_all, mad_all);
|
||||
}
|
||||
@ -288,7 +288,7 @@ void vp9_filter_block2d_4x4_8_sse4_1
|
||||
__m128i mad4567 = _mm_add_epi32(mad45, mad67);
|
||||
__m128i mad_all = _mm_add_epi32(mad0123, mad4567);
|
||||
mad_all = _mm_add_epi32(mad_all, rounding);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP8_FILTER_SHIFT);
|
||||
mad_all = _mm_srai_epi32(mad_all, VP9_FILTER_SHIFT);
|
||||
mad_all = _mm_packs_epi32(mad_all, mad_all);
|
||||
col3 = _mm_packus_epi16(mad_all, mad_all);
|
||||
}
|
||||
|
@ -28,20 +28,20 @@ extern prototype_second_order(vp9_short_inv_walsh4x4_mmx);
|
||||
extern prototype_second_order(vp9_short_inv_walsh4x4_1_mmx);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_idct_idct1
|
||||
#define vp8_idct_idct1 vp9_short_idct4x4llm_1_mmx
|
||||
#undef vp9_idct_idct1
|
||||
#define vp9_idct_idct1 vp9_short_idct4x4llm_1_mmx
|
||||
|
||||
#undef vp8_idct_idct16
|
||||
#define vp8_idct_idct16 vp9_short_idct4x4llm_mmx
|
||||
#undef vp9_idct_idct16
|
||||
#define vp9_idct_idct16 vp9_short_idct4x4llm_mmx
|
||||
|
||||
#undef vp8_idct_idct1_scalar_add
|
||||
#define vp8_idct_idct1_scalar_add vp9_dc_only_idct_add_mmx
|
||||
#undef vp9_idct_idct1_scalar_add
|
||||
#define vp9_idct_idct1_scalar_add vp9_dc_only_idct_add_mmx
|
||||
|
||||
#undef vp8_idct_iwalsh16
|
||||
#define vp8_idct_iwalsh16 vp9_short_inv_walsh4x4_mmx
|
||||
#undef vp9_idct_iwalsh16
|
||||
#define vp9_idct_iwalsh16 vp9_short_inv_walsh4x4_mmx
|
||||
|
||||
#undef vp8_idct_iwalsh1
|
||||
#define vp8_idct_iwalsh1 vp9_short_inv_walsh4x4_1_mmx
|
||||
#undef vp9_idct_iwalsh1
|
||||
#define vp9_idct_iwalsh1 vp9_short_inv_walsh4x4_1_mmx
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -52,8 +52,8 @@ extern prototype_second_order(vp9_short_inv_walsh4x4_sse2);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
|
||||
#undef vp8_idct_iwalsh16
|
||||
#define vp8_idct_iwalsh16 vp9_short_inv_walsh4x4_sse2
|
||||
#undef vp9_idct_iwalsh16
|
||||
#define vp9_idct_iwalsh16 vp9_short_inv_walsh4x4_sse2
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -238,20 +238,20 @@ void vp9_mbloop_filter_horizontal_edge_c_sse2
|
||||
t80);
|
||||
const __m128i qs1 = _mm_xor_si128(_mm_loadu_si128((__m128i *)(s + 1 * p)),
|
||||
t80);
|
||||
__m128i vp8_filt;
|
||||
__m128i filt;
|
||||
__m128i work_a;
|
||||
__m128i filter1, filter2;
|
||||
|
||||
vp8_filt = _mm_and_si128(_mm_subs_epi8(ps1, qs1), hev);
|
||||
filt = _mm_and_si128(_mm_subs_epi8(ps1, qs1), hev);
|
||||
work_a = _mm_subs_epi8(qs0, ps0);
|
||||
vp8_filt = _mm_adds_epi8(vp8_filt, work_a);
|
||||
vp8_filt = _mm_adds_epi8(vp8_filt, work_a);
|
||||
vp8_filt = _mm_adds_epi8(vp8_filt, work_a);
|
||||
/* (vp8_filter + 3 * (qs0 - ps0)) & mask */
|
||||
vp8_filt = _mm_and_si128(vp8_filt, mask);
|
||||
filt = _mm_adds_epi8(filt, work_a);
|
||||
filt = _mm_adds_epi8(filt, work_a);
|
||||
filt = _mm_adds_epi8(filt, work_a);
|
||||
/* (vp9_filter + 3 * (qs0 - ps0)) & mask */
|
||||
filt = _mm_and_si128(filt, mask);
|
||||
|
||||
filter1 = _mm_adds_epi8(vp8_filt, t4);
|
||||
filter2 = _mm_adds_epi8(vp8_filt, t3);
|
||||
filter1 = _mm_adds_epi8(filt, t4);
|
||||
filter2 = _mm_adds_epi8(filt, t3);
|
||||
|
||||
/* Filter1 >> 3 */
|
||||
work_a = _mm_cmpgt_epi8(zero, filter1);
|
||||
@ -267,15 +267,15 @@ void vp9_mbloop_filter_horizontal_edge_c_sse2
|
||||
filter2 = _mm_and_si128(filter2, t1f);
|
||||
filter2 = _mm_or_si128(filter2, work_a);
|
||||
|
||||
/* vp8_filt >> 1 */
|
||||
vp8_filt = _mm_adds_epi8(filter1, t1);
|
||||
work_a = _mm_cmpgt_epi8(zero, vp8_filt);
|
||||
vp8_filt = _mm_srli_epi16(vp8_filt, 1);
|
||||
/* filt >> 1 */
|
||||
filt = _mm_adds_epi8(filter1, t1);
|
||||
work_a = _mm_cmpgt_epi8(zero, filt);
|
||||
filt = _mm_srli_epi16(filt, 1);
|
||||
work_a = _mm_and_si128(work_a, t80);
|
||||
vp8_filt = _mm_and_si128(vp8_filt, t7f);
|
||||
vp8_filt = _mm_or_si128(vp8_filt, work_a);
|
||||
filt = _mm_and_si128(filt, t7f);
|
||||
filt = _mm_or_si128(filt, work_a);
|
||||
|
||||
vp8_filt = _mm_andnot_si128(hev, vp8_filt);
|
||||
filt = _mm_andnot_si128(hev, filt);
|
||||
|
||||
work_a = _mm_xor_si128(_mm_subs_epi8(qs0, filter1), t80);
|
||||
q0 = _mm_load_si128((__m128i *)flat_oq0);
|
||||
@ -283,7 +283,7 @@ void vp9_mbloop_filter_horizontal_edge_c_sse2
|
||||
q0 = _mm_and_si128(flat, q0);
|
||||
q0 = _mm_or_si128(work_a, q0);
|
||||
|
||||
work_a = _mm_xor_si128(_mm_subs_epi8(qs1, vp8_filt), t80);
|
||||
work_a = _mm_xor_si128(_mm_subs_epi8(qs1, filt), t80);
|
||||
q1 = _mm_load_si128((__m128i *)flat_oq1);
|
||||
work_a = _mm_andnot_si128(flat, work_a);
|
||||
q1 = _mm_and_si128(flat, q1);
|
||||
@ -301,7 +301,7 @@ void vp9_mbloop_filter_horizontal_edge_c_sse2
|
||||
p0 = _mm_and_si128(flat, p0);
|
||||
p0 = _mm_or_si128(work_a, p0);
|
||||
|
||||
work_a = _mm_xor_si128(_mm_adds_epi8(ps1, vp8_filt), t80);
|
||||
work_a = _mm_xor_si128(_mm_adds_epi8(ps1, filt), t80);
|
||||
p1 = _mm_load_si128((__m128i *)flat_op1);
|
||||
work_a = _mm_andnot_si128(flat, work_a);
|
||||
p1 = _mm_and_si128(flat, p1);
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
%include "vpx_ports/x86_abi_support.asm"
|
||||
|
||||
%define VP8_FILTER_WEIGHT 128
|
||||
%define VP8_FILTER_SHIFT 7
|
||||
%define VP9_FILTER_WEIGHT 128
|
||||
%define VP9_FILTER_SHIFT 7
|
||||
|
||||
;void vp9_post_proc_down_and_across_mmx
|
||||
;(
|
||||
@ -129,7 +129,7 @@ sym(vp9_post_proc_down_and_across_mmx):
|
||||
|
||||
|
||||
paddusw mm3, RD ; mm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; mm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; mm3 /= 128
|
||||
|
||||
pand mm1, mm7 ; mm1 select vals > thresh from source
|
||||
pandn mm7, mm3 ; mm7 select vals < thresh from blurred result
|
||||
@ -225,7 +225,7 @@ sym(vp9_post_proc_down_and_across_mmx):
|
||||
por mm7, mm6 ; accumulate thresholds
|
||||
|
||||
paddusw mm3, RD ; mm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; mm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; mm3 /= 128
|
||||
|
||||
pand mm1, mm7 ; mm1 select vals > thresh from source
|
||||
pandn mm7, mm3 ; mm7 select vals < thresh from blurred result
|
||||
|
@ -25,14 +25,14 @@ extern prototype_postproc(vp9_post_proc_down_and_across_mmx);
|
||||
extern prototype_postproc_addnoise(vp9_plane_add_noise_mmx);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_postproc_down
|
||||
#define vp8_postproc_down vp9_mbpost_proc_down_mmx
|
||||
#undef vp9_postproc_down
|
||||
#define vp9_postproc_down vp9_mbpost_proc_down_mmx
|
||||
|
||||
#undef vp8_postproc_downacross
|
||||
#define vp8_postproc_downacross vp9_post_proc_down_and_across_mmx
|
||||
#undef vp9_postproc_downacross
|
||||
#define vp9_postproc_downacross vp9_post_proc_down_and_across_mmx
|
||||
|
||||
#undef vp8_postproc_addnoise
|
||||
#define vp8_postproc_addnoise vp9_plane_add_noise_mmx
|
||||
#undef vp9_postproc_addnoise
|
||||
#define vp9_postproc_addnoise vp9_plane_add_noise_mmx
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -45,17 +45,17 @@ extern prototype_postproc(vp9_post_proc_down_and_across_xmm);
|
||||
extern prototype_postproc_addnoise(vp9_plane_add_noise_wmt);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_postproc_down
|
||||
#define vp8_postproc_down vp9_mbpost_proc_down_xmm
|
||||
#undef vp9_postproc_down
|
||||
#define vp9_postproc_down vp9_mbpost_proc_down_xmm
|
||||
|
||||
#undef vp8_postproc_across
|
||||
#define vp8_postproc_across vp9_mbpost_proc_across_ip_xmm
|
||||
#undef vp9_postproc_across
|
||||
#define vp9_postproc_across vp9_mbpost_proc_across_ip_xmm
|
||||
|
||||
#undef vp8_postproc_downacross
|
||||
#define vp8_postproc_downacross vp9_post_proc_down_and_across_xmm
|
||||
#undef vp9_postproc_downacross
|
||||
#define vp9_postproc_downacross vp9_post_proc_down_and_across_xmm
|
||||
|
||||
#undef vp8_postproc_addnoise
|
||||
#define vp8_postproc_addnoise vp9_plane_add_noise_wmt
|
||||
#undef vp9_postproc_addnoise
|
||||
#define vp9_postproc_addnoise vp9_plane_add_noise_wmt
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -15,7 +15,7 @@
|
||||
#define build_intra_predictors_mbuv_prototype(sym) \
|
||||
void sym(unsigned char *dst, int dst_stride, \
|
||||
const unsigned char *src, int src_stride)
|
||||
typedef build_intra_predictors_mbuv_prototype((*build_intra_predictors_mbuv_fn_t));
|
||||
typedef build_intra_predictors_mbuv_prototype((*build_intra_pred_mbuv_fn_t));
|
||||
|
||||
extern build_intra_predictors_mbuv_prototype(vp9_intra_pred_uv_dc_mmx2);
|
||||
extern build_intra_predictors_mbuv_prototype(vp9_intra_pred_uv_dctop_mmx2);
|
||||
@ -27,14 +27,14 @@ extern build_intra_predictors_mbuv_prototype(vp9_intra_pred_uv_ve_mmx);
|
||||
extern build_intra_predictors_mbuv_prototype(vp9_intra_pred_uv_tm_sse2);
|
||||
extern build_intra_predictors_mbuv_prototype(vp9_intra_pred_uv_tm_ssse3);
|
||||
|
||||
static void vp9_build_intra_predictors_mbuv_x86(MACROBLOCKD *xd,
|
||||
unsigned char *dst_u,
|
||||
unsigned char *dst_v,
|
||||
int dst_stride,
|
||||
build_intra_predictors_mbuv_fn_t tm_func,
|
||||
build_intra_predictors_mbuv_fn_t ho_func) {
|
||||
static void build_intra_predictors_mbuv_x86(MACROBLOCKD *xd,
|
||||
unsigned char *dst_u,
|
||||
unsigned char *dst_v,
|
||||
int dst_stride,
|
||||
build_intra_pred_mbuv_fn_t tm_fn,
|
||||
build_intra_pred_mbuv_fn_t ho_fn) {
|
||||
int mode = xd->mode_info_context->mbmi.uv_mode;
|
||||
build_intra_predictors_mbuv_fn_t fn;
|
||||
build_intra_pred_mbuv_fn_t fn;
|
||||
int src_stride = xd->dst.uv_stride;
|
||||
|
||||
switch (mode) {
|
||||
@ -42,10 +42,10 @@ static void vp9_build_intra_predictors_mbuv_x86(MACROBLOCKD *xd,
|
||||
fn = vp9_intra_pred_uv_ve_mmx;
|
||||
break;
|
||||
case H_PRED:
|
||||
fn = ho_func;
|
||||
fn = ho_fn;
|
||||
break;
|
||||
case TM_PRED:
|
||||
fn = tm_func;
|
||||
fn = tm_fn;
|
||||
break;
|
||||
case DC_PRED:
|
||||
if (xd->up_available) {
|
||||
@ -73,29 +73,29 @@ static void vp9_build_intra_predictors_mbuv_x86(MACROBLOCKD *xd,
|
||||
}
|
||||
|
||||
void vp9_build_intra_predictors_mbuv_sse2(MACROBLOCKD *xd) {
|
||||
vp9_build_intra_predictors_mbuv_x86(xd, &xd->predictor[256],
|
||||
&xd->predictor[320], 8,
|
||||
vp9_intra_pred_uv_tm_sse2,
|
||||
vp9_intra_pred_uv_ho_mmx2);
|
||||
build_intra_predictors_mbuv_x86(xd, &xd->predictor[256],
|
||||
&xd->predictor[320], 8,
|
||||
vp9_intra_pred_uv_tm_sse2,
|
||||
vp9_intra_pred_uv_ho_mmx2);
|
||||
}
|
||||
|
||||
void vp9_build_intra_predictors_mbuv_ssse3(MACROBLOCKD *xd) {
|
||||
vp9_build_intra_predictors_mbuv_x86(xd, &xd->predictor[256],
|
||||
&xd->predictor[320], 8,
|
||||
vp9_intra_pred_uv_tm_ssse3,
|
||||
vp9_intra_pred_uv_ho_ssse3);
|
||||
build_intra_predictors_mbuv_x86(xd, &xd->predictor[256],
|
||||
&xd->predictor[320], 8,
|
||||
vp9_intra_pred_uv_tm_ssse3,
|
||||
vp9_intra_pred_uv_ho_ssse3);
|
||||
}
|
||||
|
||||
void vp9_build_intra_predictors_mbuv_s_sse2(MACROBLOCKD *xd) {
|
||||
vp9_build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
|
||||
xd->dst.v_buffer, xd->dst.uv_stride,
|
||||
vp9_intra_pred_uv_tm_sse2,
|
||||
vp9_intra_pred_uv_ho_mmx2);
|
||||
build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
|
||||
xd->dst.v_buffer, xd->dst.uv_stride,
|
||||
vp9_intra_pred_uv_tm_sse2,
|
||||
vp9_intra_pred_uv_ho_mmx2);
|
||||
}
|
||||
|
||||
void vp9_build_intra_predictors_mbuv_s_ssse3(MACROBLOCKD *xd) {
|
||||
vp9_build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
|
||||
xd->dst.v_buffer, xd->dst.uv_stride,
|
||||
vp9_intra_pred_uv_tm_ssse3,
|
||||
vp9_intra_pred_uv_ho_ssse3);
|
||||
build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
|
||||
xd->dst.v_buffer, xd->dst.uv_stride,
|
||||
vp9_intra_pred_uv_tm_ssse3,
|
||||
vp9_intra_pred_uv_ho_ssse3);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
#if HAVE_SSE2
|
||||
unsigned int vp8_sad16x3_sse2(
|
||||
unsigned int vp9_sad16x3_sse2(
|
||||
const unsigned char *src_ptr,
|
||||
int src_stride,
|
||||
const unsigned char *ref_ptr,
|
||||
@ -45,7 +45,7 @@ unsigned int vp8_sad16x3_sse2(
|
||||
return _mm_cvtsi128_si32(sad);
|
||||
}
|
||||
|
||||
unsigned int vp8_sad3x16_sse2(
|
||||
unsigned int vp9_sad3x16_sse2(
|
||||
const unsigned char *src_ptr,
|
||||
int src_stride,
|
||||
const unsigned char *ref_ptr,
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
|
||||
%define BLOCK_HEIGHT_WIDTH 4
|
||||
%define vp8_filter_weight 128
|
||||
%define VP8_FILTER_SHIFT 7
|
||||
%define vp9_filter_weight 128
|
||||
%define VP9_FILTER_SHIFT 7
|
||||
|
||||
|
||||
;void vp9_filter_block1d_h6_mmx
|
||||
@ -25,7 +25,7 @@
|
||||
; unsigned int pixel_step,
|
||||
; unsigned int output_height,
|
||||
; unsigned int output_width,
|
||||
; short * vp8_filter
|
||||
; short * vp9_filter
|
||||
;)
|
||||
global sym(vp9_filter_block1d_h6_mmx)
|
||||
sym(vp9_filter_block1d_h6_mmx):
|
||||
@ -37,7 +37,7 @@ sym(vp9_filter_block1d_h6_mmx):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rdx, arg(6) ;vp8_filter
|
||||
mov rdx, arg(6) ;vp9_filter
|
||||
|
||||
movq mm1, [rdx + 16] ; do both the negative taps first!!!
|
||||
movq mm2, [rdx + 32] ;
|
||||
@ -85,7 +85,7 @@ sym(vp9_filter_block1d_h6_mmx):
|
||||
paddsw mm3, mm5 ; mm3 += mm5
|
||||
|
||||
paddsw mm3, [GLOBAL(rd)] ; mm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; mm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; mm3 /= 128
|
||||
packuswb mm3, mm0 ; pack and unpack to saturate
|
||||
punpcklbw mm3, mm0 ;
|
||||
|
||||
@ -122,7 +122,7 @@ sym(vp9_filter_block1d_h6_mmx):
|
||||
; unsigned int pixel_step,
|
||||
; unsigned int output_height,
|
||||
; unsigned int output_width,
|
||||
; short * vp8_filter
|
||||
; short * vp9_filter
|
||||
;)
|
||||
global sym(vp9_filter_block1dc_v6_mmx)
|
||||
sym(vp9_filter_block1dc_v6_mmx):
|
||||
@ -136,7 +136,7 @@ sym(vp9_filter_block1dc_v6_mmx):
|
||||
|
||||
movq mm5, [GLOBAL(rd)]
|
||||
push rbx
|
||||
mov rbx, arg(7) ;vp8_filter
|
||||
mov rbx, arg(7) ;vp9_filter
|
||||
movq mm1, [rbx + 16] ; do both the negative taps first!!!
|
||||
movq mm2, [rbx + 32] ;
|
||||
movq mm6, [rbx + 48] ;
|
||||
@ -181,7 +181,7 @@ sym(vp9_filter_block1dc_v6_mmx):
|
||||
|
||||
|
||||
paddsw mm3, mm5 ; mm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; mm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; mm3 /= 128
|
||||
packuswb mm3, mm0 ; pack and saturate
|
||||
|
||||
movd [rdi],mm3 ; store the results in the destination
|
||||
@ -273,10 +273,10 @@ sym(vp9_bilinear_predict8x8_mmx):
|
||||
paddw mm4, mm6 ;
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw mm4, [GLOBAL(rd)] ;
|
||||
psraw mm4, VP8_FILTER_SHIFT ;
|
||||
psraw mm4, VP9_FILTER_SHIFT ;
|
||||
|
||||
movq mm7, mm3 ;
|
||||
packuswb mm7, mm4 ;
|
||||
@ -314,10 +314,10 @@ sym(vp9_bilinear_predict8x8_mmx):
|
||||
pmullw mm6, [rax] ;
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw mm4, [GLOBAL(rd)] ;
|
||||
psraw mm4, VP8_FILTER_SHIFT ;
|
||||
psraw mm4, VP9_FILTER_SHIFT ;
|
||||
|
||||
movq mm7, mm3 ;
|
||||
packuswb mm7, mm4 ;
|
||||
@ -331,10 +331,10 @@ sym(vp9_bilinear_predict8x8_mmx):
|
||||
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw mm4, [GLOBAL(rd)] ;
|
||||
psraw mm4, VP8_FILTER_SHIFT ;
|
||||
psraw mm4, VP9_FILTER_SHIFT ;
|
||||
|
||||
packuswb mm3, mm4
|
||||
|
||||
@ -428,10 +428,10 @@ sym(vp9_bilinear_predict8x4_mmx):
|
||||
paddw mm4, mm6 ;
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw mm4, [GLOBAL(rd)] ;
|
||||
psraw mm4, VP8_FILTER_SHIFT ;
|
||||
psraw mm4, VP9_FILTER_SHIFT ;
|
||||
|
||||
movq mm7, mm3 ;
|
||||
packuswb mm7, mm4 ;
|
||||
@ -469,10 +469,10 @@ sym(vp9_bilinear_predict8x4_mmx):
|
||||
pmullw mm6, [rax] ;
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw mm4, [GLOBAL(rd)] ;
|
||||
psraw mm4, VP8_FILTER_SHIFT ;
|
||||
psraw mm4, VP9_FILTER_SHIFT ;
|
||||
|
||||
movq mm7, mm3 ;
|
||||
packuswb mm7, mm4 ;
|
||||
@ -486,10 +486,10 @@ sym(vp9_bilinear_predict8x4_mmx):
|
||||
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw mm4, [GLOBAL(rd)] ;
|
||||
psraw mm4, VP8_FILTER_SHIFT ;
|
||||
psraw mm4, VP9_FILTER_SHIFT ;
|
||||
|
||||
packuswb mm3, mm4
|
||||
|
||||
@ -573,7 +573,7 @@ sym(vp9_bilinear_predict4x4_mmx):
|
||||
paddw mm3, mm5 ;
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
movq mm7, mm3 ;
|
||||
packuswb mm7, mm0 ;
|
||||
@ -597,7 +597,7 @@ sym(vp9_bilinear_predict4x4_mmx):
|
||||
pmullw mm5, [rax] ;
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
movq mm7, mm3 ;
|
||||
|
||||
packuswb mm7, mm0 ;
|
||||
@ -607,7 +607,7 @@ sym(vp9_bilinear_predict4x4_mmx):
|
||||
|
||||
|
||||
paddw mm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw mm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw mm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
packuswb mm3, mm0
|
||||
movd [rdi], mm3 ; store the results in the destination
|
||||
|
@ -12,8 +12,8 @@
|
||||
%include "vpx_ports/x86_abi_support.asm"
|
||||
|
||||
%define BLOCK_HEIGHT_WIDTH 4
|
||||
%define VP8_FILTER_WEIGHT 128
|
||||
%define VP8_FILTER_SHIFT 7
|
||||
%define VP9_FILTER_WEIGHT 128
|
||||
%define VP9_FILTER_SHIFT 7
|
||||
|
||||
|
||||
;/************************************************************************************
|
||||
@ -30,7 +30,7 @@
|
||||
; unsigned int pixel_step,
|
||||
; unsigned int output_height,
|
||||
; unsigned int output_width,
|
||||
; short *vp8_filter
|
||||
; short *vp9_filter
|
||||
;)
|
||||
global sym(vp9_filter_block1d8_h6_sse2)
|
||||
sym(vp9_filter_block1d8_h6_sse2):
|
||||
@ -43,7 +43,7 @@ sym(vp9_filter_block1d8_h6_sse2):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rdx, arg(6) ;vp8_filter
|
||||
mov rdx, arg(6) ;vp9_filter
|
||||
mov rsi, arg(0) ;src_ptr
|
||||
|
||||
mov rdi, arg(1) ;output_ptr
|
||||
@ -144,7 +144,7 @@ sym(vp9_filter_block1d8_h6_sse2):
|
||||
; unsigned int pixel_step,
|
||||
; unsigned int output_height,
|
||||
; unsigned int output_width,
|
||||
; short *vp8_filter
|
||||
; short *vp9_filter
|
||||
;)
|
||||
;/************************************************************************************
|
||||
; Notes: filter_block1d_h6 applies a 6 tap filter horizontally to the input pixels. The
|
||||
@ -163,7 +163,7 @@ sym(vp9_filter_block1d16_h6_sse2):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rdx, arg(6) ;vp8_filter
|
||||
mov rdx, arg(6) ;vp9_filter
|
||||
mov rsi, arg(0) ;src_ptr
|
||||
|
||||
mov rdi, arg(1) ;output_ptr
|
||||
@ -322,7 +322,7 @@ sym(vp9_filter_block1d16_h6_sse2):
|
||||
; unsigned int pixel_step,
|
||||
; unsigned int output_height,
|
||||
; unsigned int output_width,
|
||||
; short * vp8_filter
|
||||
; short * vp9_filter
|
||||
;)
|
||||
;/************************************************************************************
|
||||
; Notes: filter_block1d8_v6 applies a 6 tap filter vertically to the input pixels. The
|
||||
@ -339,7 +339,7 @@ sym(vp9_filter_block1d8_v6_sse2):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rax, arg(7) ;vp8_filter
|
||||
mov rax, arg(7) ;vp9_filter
|
||||
movsxd rdx, dword ptr arg(3) ;pixels_per_line
|
||||
|
||||
mov rdi, arg(1) ;output_ptr
|
||||
@ -417,7 +417,7 @@ sym(vp9_filter_block1d8_v6_sse2):
|
||||
; unsigned int pixel_step,
|
||||
; unsigned int output_height,
|
||||
; unsigned int output_width,
|
||||
; const short *vp8_filter
|
||||
; const short *vp9_filter
|
||||
;)
|
||||
;/************************************************************************************
|
||||
; Notes: filter_block1d16_v6 applies a 6 tap filter vertically to the input pixels. The
|
||||
@ -434,7 +434,7 @@ sym(vp9_filter_block1d16_v6_sse2):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rax, arg(7) ;vp8_filter
|
||||
mov rax, arg(7) ;vp9_filter
|
||||
movsxd rdx, dword ptr arg(3) ;pixels_per_line
|
||||
|
||||
mov rdi, arg(1) ;output_ptr
|
||||
@ -530,7 +530,7 @@ sym(vp9_filter_block1d16_v6_sse2):
|
||||
; unsigned char *output_ptr,
|
||||
; int dst_ptich,
|
||||
; unsigned int output_height,
|
||||
; const short *vp8_filter
|
||||
; const short *vp9_filter
|
||||
;)
|
||||
; First-pass filter only when yoffset==0
|
||||
global sym(vp9_filter_block1d8_h6_only_sse2)
|
||||
@ -544,7 +544,7 @@ sym(vp9_filter_block1d8_h6_only_sse2):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rdx, arg(5) ;vp8_filter
|
||||
mov rdx, arg(5) ;vp9_filter
|
||||
mov rsi, arg(0) ;src_ptr
|
||||
|
||||
mov rdi, arg(2) ;output_ptr
|
||||
@ -643,7 +643,7 @@ sym(vp9_filter_block1d8_h6_only_sse2):
|
||||
; unsigned char *output_ptr,
|
||||
; int dst_ptich,
|
||||
; unsigned int output_height,
|
||||
; const short *vp8_filter
|
||||
; const short *vp9_filter
|
||||
;)
|
||||
; First-pass filter only when yoffset==0
|
||||
global sym(vp9_filter_block1d16_h6_only_sse2)
|
||||
@ -657,7 +657,7 @@ sym(vp9_filter_block1d16_h6_only_sse2):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
mov rdx, arg(5) ;vp8_filter
|
||||
mov rdx, arg(5) ;vp9_filter
|
||||
mov rsi, arg(0) ;src_ptr
|
||||
|
||||
mov rdi, arg(2) ;output_ptr
|
||||
@ -808,7 +808,7 @@ sym(vp9_filter_block1d16_h6_only_sse2):
|
||||
; unsigned char *output_ptr,
|
||||
; int dst_ptich,
|
||||
; unsigned int output_height,
|
||||
; const short *vp8_filter
|
||||
; const short *vp9_filter
|
||||
;)
|
||||
; Second-pass filter only when xoffset==0
|
||||
global sym(vp9_filter_block1d8_v6_only_sse2)
|
||||
@ -828,7 +828,7 @@ sym(vp9_filter_block1d8_v6_only_sse2):
|
||||
movsxd rcx, dword ptr arg(4) ;output_height
|
||||
movsxd rdx, dword ptr arg(1) ;src_pixels_per_line
|
||||
|
||||
mov rax, arg(5) ;vp8_filter
|
||||
mov rax, arg(5) ;vp9_filter
|
||||
|
||||
pxor xmm0, xmm0 ; clear xmm0
|
||||
|
||||
@ -1032,10 +1032,10 @@ sym(vp9_bilinear_predict16x16_sse2):
|
||||
paddw xmm4, xmm6
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)]
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
|
||||
movdqa xmm7, xmm3
|
||||
packuswb xmm7, xmm4
|
||||
@ -1073,10 +1073,10 @@ sym(vp9_bilinear_predict16x16_sse2):
|
||||
pmullw xmm6, [rax]
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)]
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
|
||||
movdqa xmm7, xmm3
|
||||
packuswb xmm7, xmm4
|
||||
@ -1088,10 +1088,10 @@ sym(vp9_bilinear_predict16x16_sse2):
|
||||
paddw xmm4, xmm6
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)]
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm3, xmm4
|
||||
movdqa [rdi], xmm3 ; store the results in the destination
|
||||
@ -1153,10 +1153,10 @@ sym(vp9_bilinear_predict16x16_sse2):
|
||||
paddw xmm4, xmm6
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)]
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm3, xmm4
|
||||
movdqa [rdi], xmm3 ; store the results in the destination
|
||||
@ -1197,10 +1197,10 @@ sym(vp9_bilinear_predict16x16_sse2):
|
||||
paddw xmm4, xmm6
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)]
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm3, xmm4
|
||||
movdqa [rdi], xmm3 ; store the results in the destination
|
||||
@ -1314,7 +1314,7 @@ sym(vp9_bilinear_predict8x8_sse2):
|
||||
paddw xmm3, xmm4
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
movdqa xmm7, xmm3
|
||||
add rsp, 16 ; next line
|
||||
@ -1333,7 +1333,7 @@ sym(vp9_bilinear_predict8x8_sse2):
|
||||
pmullw xmm7, xmm5
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
movdqa xmm4, xmm3
|
||||
|
||||
@ -1343,7 +1343,7 @@ sym(vp9_bilinear_predict8x8_sse2):
|
||||
movdqa xmm7, xmm4
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
packuswb xmm3, xmm0
|
||||
movq [rdi], xmm3 ; store the results in the destination
|
||||
|
@ -12,8 +12,8 @@
|
||||
%include "vpx_ports/x86_abi_support.asm"
|
||||
|
||||
%define BLOCK_HEIGHT_WIDTH 4
|
||||
%define VP8_FILTER_WEIGHT 128
|
||||
%define VP8_FILTER_SHIFT 7
|
||||
%define VP9_FILTER_WEIGHT 128
|
||||
%define VP9_FILTER_SHIFT 7
|
||||
|
||||
|
||||
;/************************************************************************************
|
||||
@ -32,7 +32,7 @@
|
||||
; unsigned char *output_ptr,
|
||||
; unsigned int output_pitch,
|
||||
; unsigned int output_height,
|
||||
; unsigned int vp8_filter_index
|
||||
; unsigned int vp9_filter_index
|
||||
;)
|
||||
global sym(vp9_filter_block1d8_h6_ssse3)
|
||||
sym(vp9_filter_block1d8_h6_ssse3):
|
||||
@ -56,7 +56,7 @@ sym(vp9_filter_block1d8_h6_ssse3):
|
||||
mov rdi, arg(2) ;output_ptr
|
||||
|
||||
cmp esi, DWORD PTR [rax]
|
||||
je vp8_filter_block1d8_h4_ssse3
|
||||
je vp9_filter_block1d8_h4_ssse3
|
||||
|
||||
movdqa xmm4, XMMWORD PTR [rax] ;k0_k5
|
||||
movdqa xmm5, XMMWORD PTR [rax+256] ;k2_k4
|
||||
@ -113,7 +113,7 @@ sym(vp9_filter_block1d8_h6_ssse3):
|
||||
pop rbp
|
||||
ret
|
||||
|
||||
vp8_filter_block1d8_h4_ssse3:
|
||||
vp9_filter_block1d8_h4_ssse3:
|
||||
movdqa xmm5, XMMWORD PTR [rax+256] ;k2_k4
|
||||
movdqa xmm6, XMMWORD PTR [rax+128] ;k1_k3
|
||||
|
||||
@ -175,7 +175,7 @@ vp8_filter_block1d8_h4_ssse3:
|
||||
; unsigned char *output_ptr,
|
||||
; unsigned int output_pitch,
|
||||
; unsigned int output_height,
|
||||
; unsigned int vp8_filter_index
|
||||
; unsigned int vp9_filter_index
|
||||
;)
|
||||
global sym(vp9_filter_block1d16_h6_ssse3)
|
||||
sym(vp9_filter_block1d16_h6_ssse3):
|
||||
@ -282,7 +282,7 @@ sym(vp9_filter_block1d16_h6_ssse3):
|
||||
; unsigned char *output_ptr,
|
||||
; unsigned int output_pitch,
|
||||
; unsigned int output_height,
|
||||
; unsigned int vp8_filter_index
|
||||
; unsigned int vp9_filter_index
|
||||
;)
|
||||
global sym(vp9_filter_block1d4_h6_ssse3)
|
||||
sym(vp9_filter_block1d4_h6_ssse3):
|
||||
@ -304,7 +304,7 @@ sym(vp9_filter_block1d4_h6_ssse3):
|
||||
movdqa xmm7, [GLOBAL(rd)]
|
||||
|
||||
cmp esi, DWORD PTR [rax]
|
||||
je .vp8_filter_block1d4_h4_ssse3
|
||||
je .vp9_filter_block1d4_h4_ssse3
|
||||
|
||||
movdqa xmm4, XMMWORD PTR [rax] ;k0_k5
|
||||
movdqa xmm5, XMMWORD PTR [rax+256] ;k2_k4
|
||||
@ -356,7 +356,7 @@ sym(vp9_filter_block1d4_h6_ssse3):
|
||||
pop rbp
|
||||
ret
|
||||
|
||||
.vp8_filter_block1d4_h4_ssse3:
|
||||
.vp9_filter_block1d4_h4_ssse3:
|
||||
movdqa xmm5, XMMWORD PTR [rax+256] ;k2_k4
|
||||
movdqa xmm6, XMMWORD PTR [rax+128] ;k1_k3
|
||||
movdqa xmm0, XMMWORD PTR [GLOBAL(shuf2b)]
|
||||
@ -411,7 +411,7 @@ sym(vp9_filter_block1d4_h6_ssse3):
|
||||
; unsigned char *output_ptr,
|
||||
; unsigned int out_pitch,
|
||||
; unsigned int output_height,
|
||||
; unsigned int vp8_filter_index
|
||||
; unsigned int vp9_filter_index
|
||||
;)
|
||||
global sym(vp9_filter_block1d16_v6_ssse3)
|
||||
sym(vp9_filter_block1d16_v6_ssse3):
|
||||
@ -432,7 +432,7 @@ sym(vp9_filter_block1d16_v6_ssse3):
|
||||
add rax, rdx
|
||||
|
||||
cmp esi, DWORD PTR [rax]
|
||||
je .vp8_filter_block1d16_v4_ssse3
|
||||
je .vp9_filter_block1d16_v4_ssse3
|
||||
|
||||
movdqa xmm5, XMMWORD PTR [rax] ;k0_k5
|
||||
movdqa xmm6, XMMWORD PTR [rax+256] ;k2_k4
|
||||
@ -519,7 +519,7 @@ sym(vp9_filter_block1d16_v6_ssse3):
|
||||
pop rbp
|
||||
ret
|
||||
|
||||
.vp8_filter_block1d16_v4_ssse3:
|
||||
.vp9_filter_block1d16_v4_ssse3:
|
||||
movdqa xmm6, XMMWORD PTR [rax+256] ;k2_k4
|
||||
movdqa xmm7, XMMWORD PTR [rax+128] ;k1_k3
|
||||
|
||||
@ -534,7 +534,7 @@ sym(vp9_filter_block1d16_v6_ssse3):
|
||||
movsxd rcx, DWORD PTR arg(4) ;output_height
|
||||
add rax, rdx
|
||||
|
||||
.vp8_filter_block1d16_v4_ssse3_loop:
|
||||
.vp9_filter_block1d16_v4_ssse3_loop:
|
||||
movq xmm2, MMWORD PTR [rsi + rdx] ;B
|
||||
movq xmm3, MMWORD PTR [rsi + rdx * 2] ;C
|
||||
movq xmm4, MMWORD PTR [rax + rdx * 2] ;D
|
||||
@ -581,7 +581,7 @@ sym(vp9_filter_block1d16_v6_ssse3):
|
||||
add rdi, r8
|
||||
%endif
|
||||
dec rcx
|
||||
jnz .vp8_filter_block1d16_v4_ssse3_loop
|
||||
jnz .vp9_filter_block1d16_v4_ssse3_loop
|
||||
|
||||
; begin epilog
|
||||
pop rdi
|
||||
@ -599,7 +599,7 @@ sym(vp9_filter_block1d16_v6_ssse3):
|
||||
; unsigned char *output_ptr,
|
||||
; unsigned int out_pitch,
|
||||
; unsigned int output_height,
|
||||
; unsigned int vp8_filter_index
|
||||
; unsigned int vp9_filter_index
|
||||
;)
|
||||
global sym(vp9_filter_block1d8_v6_ssse3)
|
||||
sym(vp9_filter_block1d8_v6_ssse3):
|
||||
@ -627,7 +627,7 @@ sym(vp9_filter_block1d8_v6_ssse3):
|
||||
movsxd rcx, DWORD PTR arg(4) ;[output_height]
|
||||
|
||||
cmp esi, DWORD PTR [rax]
|
||||
je .vp8_filter_block1d8_v4_ssse3
|
||||
je .vp9_filter_block1d8_v4_ssse3
|
||||
|
||||
movdqa xmm5, XMMWORD PTR [rax] ;k0_k5
|
||||
movdqa xmm6, XMMWORD PTR [rax+256] ;k2_k4
|
||||
@ -684,7 +684,7 @@ sym(vp9_filter_block1d8_v6_ssse3):
|
||||
pop rbp
|
||||
ret
|
||||
|
||||
.vp8_filter_block1d8_v4_ssse3:
|
||||
.vp9_filter_block1d8_v4_ssse3:
|
||||
movdqa xmm6, XMMWORD PTR [rax+256] ;k2_k4
|
||||
movdqa xmm7, XMMWORD PTR [rax+128] ;k1_k3
|
||||
movdqa xmm5, [GLOBAL(rd)]
|
||||
@ -694,7 +694,7 @@ sym(vp9_filter_block1d8_v6_ssse3):
|
||||
mov rax, rsi
|
||||
add rax, rdx
|
||||
|
||||
.vp8_filter_block1d8_v4_ssse3_loop:
|
||||
.vp9_filter_block1d8_v4_ssse3_loop:
|
||||
movq xmm2, MMWORD PTR [rsi + rdx] ;B
|
||||
movq xmm3, MMWORD PTR [rsi + rdx * 2] ;C
|
||||
movq xmm4, MMWORD PTR [rax + rdx * 2] ;D
|
||||
@ -722,7 +722,7 @@ sym(vp9_filter_block1d8_v6_ssse3):
|
||||
add rdi, r8
|
||||
%endif
|
||||
dec rcx
|
||||
jnz .vp8_filter_block1d8_v4_ssse3_loop
|
||||
jnz .vp9_filter_block1d8_v4_ssse3_loop
|
||||
|
||||
; begin epilog
|
||||
pop rdi
|
||||
@ -739,7 +739,7 @@ sym(vp9_filter_block1d8_v6_ssse3):
|
||||
; unsigned char *output_ptr,
|
||||
; unsigned int out_pitch,
|
||||
; unsigned int output_height,
|
||||
; unsigned int vp8_filter_index
|
||||
; unsigned int vp9_filter_index
|
||||
;)
|
||||
global sym(vp9_filter_block1d4_v6_ssse3)
|
||||
sym(vp9_filter_block1d4_v6_ssse3):
|
||||
@ -766,7 +766,7 @@ sym(vp9_filter_block1d4_v6_ssse3):
|
||||
movsxd rcx, DWORD PTR arg(4) ;[output_height]
|
||||
|
||||
cmp esi, DWORD PTR [rax]
|
||||
je .vp8_filter_block1d4_v4_ssse3
|
||||
je .vp9_filter_block1d4_v4_ssse3
|
||||
|
||||
movq mm5, MMWORD PTR [rax] ;k0_k5
|
||||
movq mm6, MMWORD PTR [rax+256] ;k2_k4
|
||||
@ -823,7 +823,7 @@ sym(vp9_filter_block1d4_v6_ssse3):
|
||||
pop rbp
|
||||
ret
|
||||
|
||||
.vp8_filter_block1d4_v4_ssse3:
|
||||
.vp9_filter_block1d4_v4_ssse3:
|
||||
movq mm6, MMWORD PTR [rax+256] ;k2_k4
|
||||
movq mm7, MMWORD PTR [rax+128] ;k1_k3
|
||||
movq mm5, MMWORD PTR [GLOBAL(rd)]
|
||||
@ -833,7 +833,7 @@ sym(vp9_filter_block1d4_v6_ssse3):
|
||||
mov rax, rsi
|
||||
add rax, rdx
|
||||
|
||||
.vp8_filter_block1d4_v4_ssse3_loop:
|
||||
.vp9_filter_block1d4_v4_ssse3_loop:
|
||||
movd mm2, DWORD PTR [rsi + rdx] ;B
|
||||
movd mm3, DWORD PTR [rsi + rdx * 2] ;C
|
||||
movd mm4, DWORD PTR [rax + rdx * 2] ;D
|
||||
@ -861,7 +861,7 @@ sym(vp9_filter_block1d4_v6_ssse3):
|
||||
add rdi, r8
|
||||
%endif
|
||||
dec rcx
|
||||
jnz .vp8_filter_block1d4_v4_ssse3_loop
|
||||
jnz .vp9_filter_block1d4_v4_ssse3_loop
|
||||
|
||||
; begin epilog
|
||||
pop rdi
|
||||
@ -891,7 +891,7 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
push rdi
|
||||
; end prolog
|
||||
|
||||
lea rcx, [GLOBAL(vp8_bilinear_filters_ssse3)]
|
||||
lea rcx, [GLOBAL(bilinear_filters_ssse3)]
|
||||
movsxd rax, dword ptr arg(2) ; xoffset
|
||||
|
||||
cmp rax, 0 ; skip first_pass filter if xoffset=0
|
||||
@ -939,10 +939,10 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
pmaddubsw xmm4, xmm1 ; 01 03 05 07 09 11 13 15
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)] ; xmm4 += round value
|
||||
psraw xmm4, VP8_FILTER_SHIFT ; xmm4 /= 128
|
||||
psraw xmm4, VP9_FILTER_SHIFT ; xmm4 /= 128
|
||||
|
||||
movdqa xmm7, xmm3
|
||||
packuswb xmm7, xmm4 ; 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
|
||||
@ -963,10 +963,10 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
pmaddubsw xmm4, xmm1
|
||||
|
||||
paddw xmm6, [GLOBAL(rd)] ; xmm6 += round value
|
||||
psraw xmm6, VP8_FILTER_SHIFT ; xmm6 /= 128
|
||||
psraw xmm6, VP9_FILTER_SHIFT ; xmm6 /= 128
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)] ; xmm4 += round value
|
||||
psraw xmm4, VP8_FILTER_SHIFT ; xmm4 /= 128
|
||||
psraw xmm4, VP9_FILTER_SHIFT ; xmm4 /= 128
|
||||
|
||||
packuswb xmm6, xmm4
|
||||
movdqa xmm5, xmm7
|
||||
@ -978,10 +978,10 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
pmaddubsw xmm7, xmm2
|
||||
|
||||
paddw xmm5, [GLOBAL(rd)] ; xmm5 += round value
|
||||
psraw xmm5, VP8_FILTER_SHIFT ; xmm5 /= 128
|
||||
psraw xmm5, VP9_FILTER_SHIFT ; xmm5 /= 128
|
||||
|
||||
paddw xmm7, [GLOBAL(rd)] ; xmm7 += round value
|
||||
psraw xmm7, VP8_FILTER_SHIFT ; xmm7 /= 128
|
||||
psraw xmm7, VP9_FILTER_SHIFT ; xmm7 /= 128
|
||||
|
||||
packuswb xmm5, xmm7
|
||||
movdqa xmm7, xmm6
|
||||
@ -1040,8 +1040,8 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
pmaddubsw xmm5, xmm1
|
||||
paddw xmm2, [GLOBAL(rd)]
|
||||
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm2, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
psraw xmm2, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm4, xmm2
|
||||
paddw xmm3, [GLOBAL(rd)]
|
||||
@ -1049,8 +1049,8 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
movdqa [rdi], xmm4 ; store row 0
|
||||
paddw xmm5, [GLOBAL(rd)]
|
||||
|
||||
psraw xmm3, VP8_FILTER_SHIFT
|
||||
psraw xmm5, VP8_FILTER_SHIFT
|
||||
psraw xmm3, VP9_FILTER_SHIFT
|
||||
psraw xmm5, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm3, xmm5
|
||||
movdqa xmm4, xmm7
|
||||
@ -1091,7 +1091,7 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
movq xmm7, [rsi+1]
|
||||
|
||||
movq xmm6, [rsi+8]
|
||||
psraw xmm2, VP8_FILTER_SHIFT
|
||||
psraw xmm2, VP9_FILTER_SHIFT
|
||||
|
||||
punpcklbw xmm5, xmm7
|
||||
movq xmm7, [rsi+9]
|
||||
@ -1099,7 +1099,7 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
paddw xmm3, [GLOBAL(rd)]
|
||||
pmaddubsw xmm5, xmm1
|
||||
|
||||
psraw xmm3, VP8_FILTER_SHIFT
|
||||
psraw xmm3, VP9_FILTER_SHIFT
|
||||
punpcklbw xmm6, xmm7
|
||||
|
||||
packuswb xmm2, xmm3
|
||||
@ -1109,10 +1109,10 @@ sym(vp9_bilinear_predict16x16_ssse3):
|
||||
paddw xmm5, [GLOBAL(rd)]
|
||||
|
||||
lea rdi, [rdi + rdx] ; dst_pitch
|
||||
psraw xmm5, VP8_FILTER_SHIFT
|
||||
psraw xmm5, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm6, [GLOBAL(rd)]
|
||||
psraw xmm6, VP8_FILTER_SHIFT
|
||||
psraw xmm6, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm5, xmm6
|
||||
lea rsi, [rsi + rax] ; next line
|
||||
@ -1157,7 +1157,7 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
ALIGN_STACK 16, rax
|
||||
sub rsp, 144 ; reserve 144 bytes
|
||||
|
||||
lea rcx, [GLOBAL(vp8_bilinear_filters_ssse3)]
|
||||
lea rcx, [GLOBAL(bilinear_filters_ssse3)]
|
||||
|
||||
mov rsi, arg(0) ;src_ptr
|
||||
movsxd rdx, dword ptr arg(1) ;src_pixels_per_line
|
||||
@ -1223,7 +1223,7 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
pmaddubsw xmm3, xmm0 ; 00 02 04 06 08 10 12 14
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)] ; xmm3 += round value
|
||||
psraw xmm3, VP8_FILTER_SHIFT ; xmm3 /= 128
|
||||
psraw xmm3, VP9_FILTER_SHIFT ; xmm3 /= 128
|
||||
|
||||
movdqa xmm7, xmm3
|
||||
packuswb xmm7, xmm7 ; 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
|
||||
@ -1240,7 +1240,7 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
pmaddubsw xmm6, xmm0
|
||||
|
||||
paddw xmm6, [GLOBAL(rd)] ; xmm6 += round value
|
||||
psraw xmm6, VP8_FILTER_SHIFT ; xmm6 /= 128
|
||||
psraw xmm6, VP9_FILTER_SHIFT ; xmm6 /= 128
|
||||
|
||||
packuswb xmm6, xmm6
|
||||
|
||||
@ -1248,7 +1248,7 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
pmaddubsw xmm7, xmm1
|
||||
|
||||
paddw xmm7, [GLOBAL(rd)] ; xmm7 += round value
|
||||
psraw xmm7, VP8_FILTER_SHIFT ; xmm7 /= 128
|
||||
psraw xmm7, VP9_FILTER_SHIFT ; xmm7 /= 128
|
||||
|
||||
packuswb xmm7, xmm7
|
||||
|
||||
@ -1303,21 +1303,21 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
paddw xmm1, [GLOBAL(rd)]
|
||||
|
||||
paddw xmm2, [GLOBAL(rd)]
|
||||
psraw xmm1, VP8_FILTER_SHIFT
|
||||
psraw xmm1, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)]
|
||||
psraw xmm2, VP8_FILTER_SHIFT
|
||||
psraw xmm2, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm4, [GLOBAL(rd)]
|
||||
psraw xmm3, VP8_FILTER_SHIFT
|
||||
psraw xmm3, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm5, [GLOBAL(rd)]
|
||||
psraw xmm4, VP8_FILTER_SHIFT
|
||||
psraw xmm4, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm6, [GLOBAL(rd)]
|
||||
psraw xmm5, VP8_FILTER_SHIFT
|
||||
psraw xmm5, VP9_FILTER_SHIFT
|
||||
|
||||
psraw xmm6, VP8_FILTER_SHIFT
|
||||
psraw xmm6, VP9_FILTER_SHIFT
|
||||
packuswb xmm1, xmm1
|
||||
|
||||
packuswb xmm2, xmm2
|
||||
@ -1350,10 +1350,10 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
pmaddubsw xmm1, xmm0
|
||||
paddw xmm7, [GLOBAL(rd)]
|
||||
|
||||
psraw xmm7, VP8_FILTER_SHIFT
|
||||
psraw xmm7, VP9_FILTER_SHIFT
|
||||
paddw xmm1, [GLOBAL(rd)]
|
||||
|
||||
psraw xmm1, VP8_FILTER_SHIFT
|
||||
psraw xmm1, VP9_FILTER_SHIFT
|
||||
packuswb xmm7, xmm7
|
||||
|
||||
packuswb xmm1, xmm1
|
||||
@ -1401,16 +1401,16 @@ sym(vp9_bilinear_predict8x8_ssse3):
|
||||
pmaddubsw xmm7, xmm0
|
||||
|
||||
paddw xmm1, [GLOBAL(rd)]
|
||||
psraw xmm1, VP8_FILTER_SHIFT
|
||||
psraw xmm1, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm3, [GLOBAL(rd)]
|
||||
psraw xmm3, VP8_FILTER_SHIFT
|
||||
psraw xmm3, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm5, [GLOBAL(rd)]
|
||||
psraw xmm5, VP8_FILTER_SHIFT
|
||||
psraw xmm5, VP9_FILTER_SHIFT
|
||||
|
||||
paddw xmm7, [GLOBAL(rd)]
|
||||
psraw xmm7, VP8_FILTER_SHIFT
|
||||
psraw xmm7, VP9_FILTER_SHIFT
|
||||
|
||||
packuswb xmm1, xmm1
|
||||
packuswb xmm3, xmm3
|
||||
@ -1495,7 +1495,7 @@ k2_k4:
|
||||
times 8 db 36, -11
|
||||
times 8 db 12, -6
|
||||
align 16
|
||||
vp8_bilinear_filters_ssse3:
|
||||
bilinear_filters_ssse3:
|
||||
times 8 db 128, 0
|
||||
times 8 db 120, 8
|
||||
times 8 db 112, 16
|
||||
|
@ -31,29 +31,29 @@ extern prototype_subpixel_predict(vp9_bilinear_predict4x4_mmx);
|
||||
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_subpix_sixtap16x16
|
||||
#define vp8_subpix_sixtap16x16 vp9_sixtap_predict16x16_mmx
|
||||
#undef vp9_subpix_sixtap16x16
|
||||
#define vp9_subpix_sixtap16x16 vp9_sixtap_predict16x16_mmx
|
||||
|
||||
#undef vp8_subpix_sixtap8x8
|
||||
#define vp8_subpix_sixtap8x8 vp9_sixtap_predict8x8_mmx
|
||||
#undef vp9_subpix_sixtap8x8
|
||||
#define vp9_subpix_sixtap8x8 vp9_sixtap_predict8x8_mmx
|
||||
|
||||
#undef vp8_subpix_sixtap8x4
|
||||
#define vp8_subpix_sixtap8x4 vp9_sixtap_predict8x4_mmx
|
||||
#undef vp9_subpix_sixtap8x4
|
||||
#define vp9_subpix_sixtap8x4 vp9_sixtap_predict8x4_mmx
|
||||
|
||||
#undef vp8_subpix_sixtap4x4
|
||||
#define vp8_subpix_sixtap4x4 vp9_sixtap_predict4x4_mmx
|
||||
#undef vp9_subpix_sixtap4x4
|
||||
#define vp9_subpix_sixtap4x4 vp9_sixtap_predict4x4_mmx
|
||||
|
||||
#undef vp8_subpix_bilinear16x16
|
||||
#define vp8_subpix_bilinear16x16 vp9_bilinear_predict16x16_mmx
|
||||
#undef vp9_subpix_bilinear16x16
|
||||
#define vp9_subpix_bilinear16x16 vp9_bilinear_predict16x16_mmx
|
||||
|
||||
#undef vp8_subpix_bilinear8x8
|
||||
#define vp8_subpix_bilinear8x8 vp9_bilinear_predict8x8_mmx
|
||||
#undef vp9_subpix_bilinear8x8
|
||||
#define vp9_subpix_bilinear8x8 vp9_bilinear_predict8x8_mmx
|
||||
|
||||
#undef vp8_subpix_bilinear8x4
|
||||
#define vp8_subpix_bilinear8x4 vp9_bilinear_predict8x4_mmx
|
||||
#undef vp9_subpix_bilinear8x4
|
||||
#define vp9_subpix_bilinear8x4 vp9_bilinear_predict8x4_mmx
|
||||
|
||||
#undef vp8_subpix_bilinear4x4
|
||||
#define vp8_subpix_bilinear4x4 vp9_bilinear_predict4x4_mmx
|
||||
#undef vp9_subpix_bilinear4x4
|
||||
#define vp9_subpix_bilinear4x4 vp9_bilinear_predict4x4_mmx
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -68,20 +68,20 @@ extern prototype_subpixel_predict(vp9_bilinear_predict8x8_sse2);
|
||||
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_subpix_sixtap16x16
|
||||
#define vp8_subpix_sixtap16x16 vp9_sixtap_predict16x16_sse2
|
||||
#undef vp9_subpix_sixtap16x16
|
||||
#define vp9_subpix_sixtap16x16 vp9_sixtap_predict16x16_sse2
|
||||
|
||||
#undef vp8_subpix_sixtap8x8
|
||||
#define vp8_subpix_sixtap8x8 vp9_sixtap_predict8x8_sse2
|
||||
#undef vp9_subpix_sixtap8x8
|
||||
#define vp9_subpix_sixtap8x8 vp9_sixtap_predict8x8_sse2
|
||||
|
||||
#undef vp8_subpix_sixtap8x4
|
||||
#define vp8_subpix_sixtap8x4 vp9_sixtap_predict8x4_sse2
|
||||
#undef vp9_subpix_sixtap8x4
|
||||
#define vp9_subpix_sixtap8x4 vp9_sixtap_predict8x4_sse2
|
||||
|
||||
#undef vp8_subpix_bilinear16x16
|
||||
#define vp8_subpix_bilinear16x16 vp9_bilinear_predict16x16_sse2
|
||||
#undef vp9_subpix_bilinear16x16
|
||||
#define vp9_subpix_bilinear16x16 vp9_bilinear_predict16x16_sse2
|
||||
|
||||
#undef vp8_subpix_bilinear8x8
|
||||
#define vp8_subpix_bilinear8x8 vp9_bilinear_predict8x8_sse2
|
||||
#undef vp9_subpix_bilinear8x8
|
||||
#define vp9_subpix_bilinear8x8 vp9_bilinear_predict8x8_sse2
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -95,24 +95,24 @@ extern prototype_subpixel_predict(vp9_bilinear_predict16x16_ssse3);
|
||||
extern prototype_subpixel_predict(vp9_bilinear_predict8x8_ssse3);
|
||||
|
||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||
#undef vp8_subpix_sixtap16x16
|
||||
#define vp8_subpix_sixtap16x16 vp9_sixtap_predict16x16_ssse3
|
||||
#undef vp9_subpix_sixtap16x16
|
||||
#define vp9_subpix_sixtap16x16 vp9_sixtap_predict16x16_ssse3
|
||||
|
||||
#undef vp8_subpix_sixtap8x8
|
||||
#define vp8_subpix_sixtap8x8 vp9_sixtap_predict8x8_ssse3
|
||||
#undef vp9_subpix_sixtap8x8
|
||||
#define vp9_subpix_sixtap8x8 vp9_sixtap_predict8x8_ssse3
|
||||
|
||||
#undef vp8_subpix_sixtap8x4
|
||||
#define vp8_subpix_sixtap8x4 vp9_sixtap_predict8x4_ssse3
|
||||
#undef vp9_subpix_sixtap8x4
|
||||
#define vp9_subpix_sixtap8x4 vp9_sixtap_predict8x4_ssse3
|
||||
|
||||
#undef vp8_subpix_sixtap4x4
|
||||
#define vp8_subpix_sixtap4x4 vp9_sixtap_predict4x4_ssse3
|
||||
#undef vp9_subpix_sixtap4x4
|
||||
#define vp9_subpix_sixtap4x4 vp9_sixtap_predict4x4_ssse3
|
||||
|
||||
|
||||
#undef vp8_subpix_bilinear16x16
|
||||
#define vp8_subpix_bilinear16x16 vp9_bilinear_predict16x16_ssse3
|
||||
#undef vp9_subpix_bilinear16x16
|
||||
#define vp9_subpix_bilinear16x16 vp9_bilinear_predict16x16_ssse3
|
||||
|
||||
#undef vp8_subpix_bilinear8x8
|
||||
#define vp8_subpix_bilinear8x8 vp9_bilinear_predict8x8_ssse3
|
||||
#undef vp9_subpix_bilinear8x8
|
||||
#define vp9_subpix_bilinear8x8 vp9_bilinear_predict8x8_ssse3
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@ extern void vp9_filter_block1d_h6_mmx
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1dc_v6_mmx
|
||||
(
|
||||
@ -35,7 +35,7 @@ extern void vp9_filter_block1dc_v6_mmx
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d8_h6_sse2
|
||||
(
|
||||
@ -45,7 +45,7 @@ extern void vp9_filter_block1d8_h6_sse2
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d16_h6_sse2
|
||||
(
|
||||
@ -55,7 +55,7 @@ extern void vp9_filter_block1d16_h6_sse2
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d8_v6_sse2
|
||||
(
|
||||
@ -66,7 +66,7 @@ extern void vp9_filter_block1d8_v6_sse2
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d16_v6_sse2
|
||||
(
|
||||
@ -77,7 +77,7 @@ extern void vp9_filter_block1d16_v6_sse2
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_unpack_block1d16_h6_sse2
|
||||
(
|
||||
@ -94,7 +94,7 @@ extern void vp9_filter_block1d8_h6_only_sse2
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int output_height,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d16_h6_only_sse2
|
||||
(
|
||||
@ -103,7 +103,7 @@ extern void vp9_filter_block1d16_h6_only_sse2
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int output_height,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d8_v6_only_sse2
|
||||
(
|
||||
@ -112,7 +112,7 @@ extern void vp9_filter_block1d8_v6_only_sse2
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int output_height,
|
||||
const short *vp8_filter
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern prototype_subpixel_predict(vp9_bilinear_predict8x8_mmx);
|
||||
|
||||
@ -363,7 +363,7 @@ extern void vp9_filter_block1d8_h6_ssse3
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp8_filter_index
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
extern void vp9_filter_block1d16_h6_ssse3
|
||||
@ -373,7 +373,7 @@ extern void vp9_filter_block1d16_h6_ssse3
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp8_filter_index
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
extern void vp9_filter_block1d16_v6_ssse3
|
||||
@ -383,7 +383,7 @@ extern void vp9_filter_block1d16_v6_ssse3
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp8_filter_index
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
extern void vp9_filter_block1d8_v6_ssse3
|
||||
@ -393,7 +393,7 @@ extern void vp9_filter_block1d8_v6_ssse3
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp8_filter_index
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
extern void vp9_filter_block1d4_h6_ssse3
|
||||
@ -403,7 +403,7 @@ extern void vp9_filter_block1d4_h6_ssse3
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp8_filter_index
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
extern void vp9_filter_block1d4_v6_ssse3
|
||||
@ -413,7 +413,7 @@ extern void vp9_filter_block1d4_v6_ssse3
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp8_filter_index
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
void vp9_sixtap_predict16x16_ssse3
|
||||
|
@ -35,14 +35,14 @@ int vp9_start_decode(BOOL_DECODER *br,
|
||||
void vp9_bool_decoder_fill(BOOL_DECODER *br) {
|
||||
const unsigned char *bufptr;
|
||||
const unsigned char *bufend;
|
||||
VP8_BD_VALUE value;
|
||||
VP9_BD_VALUE value;
|
||||
int count;
|
||||
bufend = br->user_buffer_end;
|
||||
bufptr = br->user_buffer;
|
||||
value = br->value;
|
||||
count = br->count;
|
||||
|
||||
VP8DX_BOOL_DECODER_FILL(count, value, bufptr, bufend);
|
||||
VP9DX_BOOL_DECODER_FILL(count, value, bufptr, bufend);
|
||||
|
||||
br->user_buffer = bufptr;
|
||||
br->value = value;
|
||||
@ -71,11 +71,11 @@ int vp9_decode_uniform(BOOL_DECODER *br, int n) {
|
||||
int l = get_unsigned_bits(n);
|
||||
int m = (1 << l) - n;
|
||||
if (!l) return 0;
|
||||
v = vp8_decode_value(br, l - 1);
|
||||
v = decode_value(br, l - 1);
|
||||
if (v < m)
|
||||
return v;
|
||||
else
|
||||
return (v << 1) - m + vp8_decode_value(br, 1);
|
||||
return (v << 1) - m + decode_value(br, 1);
|
||||
}
|
||||
|
||||
int vp9_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms) {
|
||||
@ -87,11 +87,11 @@ int vp9_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms) {
|
||||
word = vp9_decode_uniform(br, num_syms - mk) + mk;
|
||||
break;
|
||||
} else {
|
||||
if (vp8_decode_value(br, 1)) {
|
||||
if (decode_value(br, 1)) {
|
||||
i++;
|
||||
mk += a;
|
||||
} else {
|
||||
word = vp8_decode_value(br, b) + mk;
|
||||
word = decode_value(br, b) + mk;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -17,18 +17,18 @@
|
||||
#include "vpx_ports/mem.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
typedef size_t VP8_BD_VALUE;
|
||||
typedef size_t VP9_BD_VALUE;
|
||||
|
||||
# define VP8_BD_VALUE_SIZE ((int)sizeof(VP8_BD_VALUE)*CHAR_BIT)
|
||||
# define VP9_BD_VALUE_SIZE ((int)sizeof(VP9_BD_VALUE)*CHAR_BIT)
|
||||
/*This is meant to be a large, positive constant that can still be efficiently
|
||||
loaded as an immediate (on platforms like ARM, for example).
|
||||
Even relatively modest values like 100 would work fine.*/
|
||||
# define VP8_LOTS_OF_BITS (0x40000000)
|
||||
# define VP9_LOTS_OF_BITS (0x40000000)
|
||||
|
||||
typedef struct {
|
||||
const unsigned char *user_buffer_end;
|
||||
const unsigned char *user_buffer;
|
||||
VP8_BD_VALUE value;
|
||||
VP9_BD_VALUE value;
|
||||
int count;
|
||||
unsigned int range;
|
||||
} BOOL_DECODER;
|
||||
@ -51,10 +51,10 @@ int vp9_inv_recenter_nonneg(int v, int m);
|
||||
multiple BOOL_DECODER fields must be modified, and the compiler is not smart
|
||||
enough to eliminate the stores to those fields and the subsequent reloads
|
||||
from them when inlining the function.*/
|
||||
#define VP8DX_BOOL_DECODER_FILL(_count,_value,_bufptr,_bufend) \
|
||||
#define VP9DX_BOOL_DECODER_FILL(_count,_value,_bufptr,_bufend) \
|
||||
do \
|
||||
{ \
|
||||
int shift = VP8_BD_VALUE_SIZE - 8 - ((_count) + 8); \
|
||||
int shift = VP9_BD_VALUE_SIZE - 8 - ((_count) + 8); \
|
||||
int loop_end, x; \
|
||||
size_t bits_left = ((_bufend)-(_bufptr))*CHAR_BIT; \
|
||||
\
|
||||
@ -62,25 +62,25 @@ int vp9_inv_recenter_nonneg(int v, int m);
|
||||
loop_end = 0; \
|
||||
if(x >= 0) \
|
||||
{ \
|
||||
(_count) += VP8_LOTS_OF_BITS; \
|
||||
(_count) += VP9_LOTS_OF_BITS; \
|
||||
loop_end = x; \
|
||||
if(!bits_left) break; \
|
||||
} \
|
||||
while(shift >= loop_end) \
|
||||
{ \
|
||||
(_count) += CHAR_BIT; \
|
||||
(_value) |= (VP8_BD_VALUE)*(_bufptr)++ << shift; \
|
||||
(_value) |= (VP9_BD_VALUE)*(_bufptr)++ << shift; \
|
||||
shift -= CHAR_BIT; \
|
||||
} \
|
||||
} \
|
||||
while(0) \
|
||||
|
||||
|
||||
static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
|
||||
static int decode_bool(BOOL_DECODER *br, int probability) {
|
||||
unsigned int bit = 0;
|
||||
VP8_BD_VALUE value;
|
||||
VP9_BD_VALUE value;
|
||||
unsigned int split;
|
||||
VP8_BD_VALUE bigsplit;
|
||||
VP9_BD_VALUE bigsplit;
|
||||
int count;
|
||||
unsigned int range;
|
||||
|
||||
@ -92,7 +92,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
|
||||
value = br->value;
|
||||
count = br->count;
|
||||
|
||||
bigsplit = (VP8_BD_VALUE)split << (VP8_BD_VALUE_SIZE - 8);
|
||||
bigsplit = (VP9_BD_VALUE)split << (VP9_BD_VALUE_SIZE - 8);
|
||||
|
||||
range = split;
|
||||
|
||||
@ -115,18 +115,18 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
|
||||
return bit;
|
||||
}
|
||||
|
||||
static int vp8_decode_value(BOOL_DECODER *br, int bits) {
|
||||
static int decode_value(BOOL_DECODER *br, int bits) {
|
||||
int z = 0;
|
||||
int bit;
|
||||
|
||||
for (bit = bits - 1; bit >= 0; bit--) {
|
||||
z |= (vp8dx_decode_bool(br, 0x80) << bit);
|
||||
z |= (decode_bool(br, 0x80) << bit);
|
||||
}
|
||||
|
||||
return z;
|
||||
}
|
||||
|
||||
static int vp8dx_bool_error(BOOL_DECODER *br) {
|
||||
static int bool_error(BOOL_DECODER *br) {
|
||||
/* Check if we have reached the end of the buffer.
|
||||
*
|
||||
* Variable 'count' stores the number of bits in the 'value' buffer, minus
|
||||
@ -136,10 +136,10 @@ static int vp8dx_bool_error(BOOL_DECODER *br) {
|
||||
*
|
||||
* When reading a byte from the user's buffer, count is filled with 8 and
|
||||
* one byte is filled into the value buffer. When we reach the end of the
|
||||
* data, count is additionally filled with VP8_LOTS_OF_BITS. So when
|
||||
* count == VP8_LOTS_OF_BITS - 1, the user's data has been exhausted.
|
||||
* data, count is additionally filled with VP9_LOTS_OF_BITS. So when
|
||||
* count == VP9_LOTS_OF_BITS - 1, the user's data has been exhausted.
|
||||
*/
|
||||
if ((br->count > VP8_BD_VALUE_SIZE) && (br->count < VP8_LOTS_OF_BITS)) {
|
||||
if ((br->count > VP9_BD_VALUE_SIZE) && (br->count < VP9_LOTS_OF_BITS)) {
|
||||
/* We have tried to decode bits after the end of
|
||||
* stream was encountered.
|
||||
*/
|
||||
|
@ -28,60 +28,58 @@
|
||||
int dec_mvcount = 0;
|
||||
#endif
|
||||
|
||||
static int vp8_read_bmode(vp8_reader *bc, const vp8_prob *p) {
|
||||
return vp8_treed_read(bc, vp9_bmode_tree, p);
|
||||
static int read_bmode(vp9_reader *bc, const vp9_prob *p) {
|
||||
return treed_read(bc, vp9_bmode_tree, p);
|
||||
}
|
||||
|
||||
|
||||
static int vp8_read_ymode(vp8_reader *bc, const vp8_prob *p) {
|
||||
return vp8_treed_read(bc, vp9_ymode_tree, p);
|
||||
static int read_ymode(vp9_reader *bc, const vp9_prob *p) {
|
||||
return treed_read(bc, vp9_ymode_tree, p);
|
||||
}
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
static int vp8_sb_kfread_ymode(vp8_reader *bc, const vp8_prob *p) {
|
||||
return vp8_treed_read(bc, vp9_uv_mode_tree, p);
|
||||
static int read_kf_sb_ymode(vp9_reader *bc, const vp9_prob *p) {
|
||||
return treed_read(bc, vp9_uv_mode_tree, p);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int vp8_kfread_ymode(vp8_reader *bc, const vp8_prob *p) {
|
||||
return vp8_treed_read(bc, vp9_kf_ymode_tree, p);
|
||||
static int read_kf_mb_ymode(vp9_reader *bc, const vp9_prob *p) {
|
||||
return treed_read(bc, vp9_kf_ymode_tree, p);
|
||||
}
|
||||
|
||||
static int vp8_read_i8x8_mode(vp8_reader *bc, const vp8_prob *p) {
|
||||
return vp8_treed_read(bc, vp9_i8x8_mode_tree, p);
|
||||
static int read_i8x8_mode(vp9_reader *bc, const vp9_prob *p) {
|
||||
return treed_read(bc, vp9_i8x8_mode_tree, p);
|
||||
}
|
||||
|
||||
|
||||
static int vp8_read_uv_mode(vp8_reader *bc, const vp8_prob *p) {
|
||||
return vp8_treed_read(bc, vp9_uv_mode_tree, p);
|
||||
static int read_uv_mode(vp9_reader *bc, const vp9_prob *p) {
|
||||
return treed_read(bc, vp9_uv_mode_tree, p);
|
||||
}
|
||||
|
||||
// This function reads the current macro block's segnent id from the bitstream
|
||||
// It should only be called if a segment map update is indicated.
|
||||
static void vp8_read_mb_segid(vp8_reader *r, MB_MODE_INFO *mi,
|
||||
MACROBLOCKD *xd) {
|
||||
static void read_mb_segid(vp9_reader *r, MB_MODE_INFO *mi,
|
||||
MACROBLOCKD *xd) {
|
||||
/* Is segmentation enabled */
|
||||
if (xd->segmentation_enabled && xd->update_mb_segmentation_map) {
|
||||
/* If so then read the segment id. */
|
||||
if (vp8_read(r, xd->mb_segment_tree_probs[0]))
|
||||
if (vp9_read(r, xd->mb_segment_tree_probs[0]))
|
||||
mi->segment_id =
|
||||
(unsigned char)(2 + vp8_read(r, xd->mb_segment_tree_probs[2]));
|
||||
(unsigned char)(2 + vp9_read(r, xd->mb_segment_tree_probs[2]));
|
||||
else
|
||||
mi->segment_id =
|
||||
(unsigned char)(vp8_read(r, xd->mb_segment_tree_probs[1]));
|
||||
(unsigned char)(vp9_read(r, xd->mb_segment_tree_probs[1]));
|
||||
}
|
||||
}
|
||||
|
||||
#if CONFIG_NEW_MVREF
|
||||
int vp8_read_mv_ref_id(vp8_reader *r,
|
||||
vp8_prob * ref_id_probs) {
|
||||
int vp9_read_mv_ref_id(vp9_reader *r,
|
||||
vp9_prob * ref_id_probs) {
|
||||
int ref_index = 0;
|
||||
|
||||
if (vp8_read(r, ref_id_probs[0])) {
|
||||
if (vp9_read(r, ref_id_probs[0])) {
|
||||
ref_index++;
|
||||
if (vp8_read(r, ref_id_probs[1])) {
|
||||
if (vp9_read(r, ref_id_probs[1])) {
|
||||
ref_index++;
|
||||
if (vp8_read(r, ref_id_probs[2]))
|
||||
if (vp9_read(r, ref_id_probs[2]))
|
||||
ref_index++;
|
||||
}
|
||||
}
|
||||
@ -104,7 +102,7 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
// this frame (reset to 0 by default).
|
||||
m->mbmi.segment_id = 0;
|
||||
if (pbi->mb.update_mb_segmentation_map) {
|
||||
vp8_read_mb_segid(bc, &m->mbmi, &pbi->mb);
|
||||
read_mb_segid(bc, &m->mbmi, &pbi->mb);
|
||||
pbi->common.last_frame_seg_map[map_index] = m->mbmi.segment_id;
|
||||
}
|
||||
|
||||
@ -116,7 +114,7 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
m->mbmi.segment_id, SEG_LVL_EOB) != 0))) {
|
||||
MACROBLOCKD *const xd = &pbi->mb;
|
||||
m->mbmi.mb_skip_coeff =
|
||||
vp8_read(bc, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
|
||||
vp9_read(bc, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
|
||||
} else {
|
||||
if (vp9_segfeature_active(&pbi->mb,
|
||||
m->mbmi.segment_id, SEG_LVL_EOB) &&
|
||||
@ -129,11 +127,11 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
if (m->mbmi.encoded_as_sb) {
|
||||
y_mode = (MB_PREDICTION_MODE) vp8_sb_kfread_ymode(bc,
|
||||
y_mode = (MB_PREDICTION_MODE) read_kf_sb_ymode(bc,
|
||||
pbi->common.sb_kf_ymode_prob[pbi->common.kf_ymode_probs_index]);
|
||||
} else
|
||||
#endif
|
||||
y_mode = (MB_PREDICTION_MODE) vp8_kfread_ymode(bc,
|
||||
y_mode = (MB_PREDICTION_MODE) read_kf_mb_ymode(bc,
|
||||
pbi->common.kf_ymode_prob[pbi->common.kf_ymode_probs_index]);
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
m->mbmi.second_mode = (MB_PREDICTION_MODE)(DC_PRED - 1);
|
||||
@ -144,19 +142,19 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
if ((m->mbmi.mode = y_mode) == B_PRED) {
|
||||
int i = 0;
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
int use_comp_pred = vp8_read(bc, 128);
|
||||
int use_comp_pred = vp9_read(bc, 128);
|
||||
#endif
|
||||
do {
|
||||
const B_PREDICTION_MODE A = above_block_mode(m, i, mis);
|
||||
const B_PREDICTION_MODE L = left_block_mode(m, i);
|
||||
|
||||
m->bmi[i].as_mode.first =
|
||||
(B_PREDICTION_MODE) vp8_read_bmode(
|
||||
(B_PREDICTION_MODE) read_bmode(
|
||||
bc, pbi->common.kf_bmode_prob [A] [L]);
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
if (use_comp_pred) {
|
||||
m->bmi[i].as_mode.second =
|
||||
(B_PREDICTION_MODE) vp8_read_bmode(
|
||||
(B_PREDICTION_MODE) read_bmode(
|
||||
bc, pbi->common.kf_bmode_prob [A] [L]);
|
||||
} else {
|
||||
m->bmi[i].as_mode.second = (B_PREDICTION_MODE)(B_DC_PRED - 1);
|
||||
@ -169,7 +167,7 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
int mode8x8;
|
||||
for (i = 0; i < 4; i++) {
|
||||
int ib = vp9_i8x8_block[i];
|
||||
mode8x8 = vp8_read_i8x8_mode(bc, pbi->common.fc.i8x8_mode_prob);
|
||||
mode8x8 = read_i8x8_mode(bc, pbi->common.fc.i8x8_mode_prob);
|
||||
m->bmi[ib + 0].as_mode.first = mode8x8;
|
||||
m->bmi[ib + 1].as_mode.first = mode8x8;
|
||||
m->bmi[ib + 4].as_mode.first = mode8x8;
|
||||
@ -182,8 +180,8 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
#endif
|
||||
}
|
||||
} else
|
||||
m->mbmi.uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc,
|
||||
pbi->common.kf_uv_mode_prob[m->mbmi.mode]);
|
||||
m->mbmi.uv_mode = (MB_PREDICTION_MODE)read_uv_mode(bc,
|
||||
pbi->common.kf_uv_mode_prob[m->mbmi.mode]);
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
m->mbmi.second_uv_mode = (MB_PREDICTION_MODE)(DC_PRED - 1);
|
||||
#endif
|
||||
@ -196,9 +194,9 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
if (cm->txfm_mode == TX_MODE_SELECT && m->mbmi.mb_skip_coeff == 0 &&
|
||||
m->mbmi.mode <= I8X8_PRED) {
|
||||
// FIXME(rbultje) code ternary symbol once all experiments are merged
|
||||
m->mbmi.txfm_size = vp8_read(bc, cm->prob_tx[0]);
|
||||
m->mbmi.txfm_size = vp9_read(bc, cm->prob_tx[0]);
|
||||
if (m->mbmi.txfm_size != TX_4X4 && m->mbmi.mode != I8X8_PRED)
|
||||
m->mbmi.txfm_size += vp8_read(bc, cm->prob_tx[1]);
|
||||
m->mbmi.txfm_size += vp9_read(bc, cm->prob_tx[1]);
|
||||
} else if (cm->txfm_mode >= ALLOW_16X16 && m->mbmi.mode <= TM_PRED) {
|
||||
m->mbmi.txfm_size = TX_16X16;
|
||||
} else if (cm->txfm_mode >= ALLOW_8X8 && m->mbmi.mode != B_PRED) {
|
||||
@ -208,20 +206,20 @@ static void kfread_modes(VP9D_COMP *pbi,
|
||||
}
|
||||
}
|
||||
|
||||
static int read_nmv_component(vp8_reader *r,
|
||||
static int read_nmv_component(vp9_reader *r,
|
||||
int rv,
|
||||
const nmv_component *mvcomp) {
|
||||
int v, s, z, c, o, d;
|
||||
s = vp8_read(r, mvcomp->sign);
|
||||
c = vp8_treed_read(r, vp9_mv_class_tree, mvcomp->classes);
|
||||
s = vp9_read(r, mvcomp->sign);
|
||||
c = treed_read(r, vp9_mv_class_tree, mvcomp->classes);
|
||||
if (c == MV_CLASS_0) {
|
||||
d = vp8_treed_read(r, vp9_mv_class0_tree, mvcomp->class0);
|
||||
d = treed_read(r, vp9_mv_class0_tree, mvcomp->class0);
|
||||
} else {
|
||||
int i, b;
|
||||
d = 0;
|
||||
b = c + CLASS0_BITS - 1; /* number of bits */
|
||||
for (i = 0; i < b; ++i)
|
||||
d |= (vp8_read(r, mvcomp->bits[i]) << i);
|
||||
d |= (vp9_read(r, mvcomp->bits[i]) << i);
|
||||
}
|
||||
o = d << 3;
|
||||
|
||||
@ -230,7 +228,7 @@ static int read_nmv_component(vp8_reader *r,
|
||||
return v;
|
||||
}
|
||||
|
||||
static int read_nmv_component_fp(vp8_reader *r,
|
||||
static int read_nmv_component_fp(vp9_reader *r,
|
||||
int v,
|
||||
int rv,
|
||||
const nmv_component *mvcomp,
|
||||
@ -244,17 +242,17 @@ static int read_nmv_component_fp(vp8_reader *r,
|
||||
d = o >> 3;
|
||||
|
||||
if (c == MV_CLASS_0) {
|
||||
f = vp8_treed_read(r, vp9_mv_fp_tree, mvcomp->class0_fp[d]);
|
||||
f = treed_read(r, vp9_mv_fp_tree, mvcomp->class0_fp[d]);
|
||||
} else {
|
||||
f = vp8_treed_read(r, vp9_mv_fp_tree, mvcomp->fp);
|
||||
f = treed_read(r, vp9_mv_fp_tree, mvcomp->fp);
|
||||
}
|
||||
o += (f << 1);
|
||||
|
||||
if (usehp) {
|
||||
if (c == MV_CLASS_0) {
|
||||
e = vp8_read(r, mvcomp->class0_hp);
|
||||
e = vp9_read(r, mvcomp->class0_hp);
|
||||
} else {
|
||||
e = vp8_read(r, mvcomp->hp);
|
||||
e = vp9_read(r, mvcomp->hp);
|
||||
}
|
||||
o += e;
|
||||
} else {
|
||||
@ -265,9 +263,9 @@ static int read_nmv_component_fp(vp8_reader *r,
|
||||
return v;
|
||||
}
|
||||
|
||||
static void read_nmv(vp8_reader *r, MV *mv, const MV *ref,
|
||||
static void read_nmv(vp9_reader *r, MV *mv, const MV *ref,
|
||||
const nmv_context *mvctx) {
|
||||
MV_JOINT_TYPE j = vp8_treed_read(r, vp9_mv_joint_tree, mvctx->joints);
|
||||
MV_JOINT_TYPE j = treed_read(r, vp9_mv_joint_tree, mvctx->joints);
|
||||
mv->row = mv-> col = 0;
|
||||
if (j == MV_JOINT_HZVNZ || j == MV_JOINT_HNZVNZ) {
|
||||
mv->row = read_nmv_component(r, ref->row, &mvctx->comps[0]);
|
||||
@ -277,7 +275,7 @@ static void read_nmv(vp8_reader *r, MV *mv, const MV *ref,
|
||||
}
|
||||
}
|
||||
|
||||
static void read_nmv_fp(vp8_reader *r, MV *mv, const MV *ref,
|
||||
static void read_nmv_fp(vp9_reader *r, MV *mv, const MV *ref,
|
||||
const nmv_context *mvctx, int usehp) {
|
||||
MV_JOINT_TYPE j = vp9_get_mv_joint(*mv);
|
||||
usehp = usehp && vp9_use_nmv_hp(ref);
|
||||
@ -292,41 +290,41 @@ static void read_nmv_fp(vp8_reader *r, MV *mv, const MV *ref,
|
||||
//printf(" %d: %d %d ref: %d %d\n", usehp, mv->row, mv-> col, ref->row, ref->col);
|
||||
}
|
||||
|
||||
static void update_nmv(vp8_reader *bc, vp8_prob *const p,
|
||||
const vp8_prob upd_p) {
|
||||
if (vp8_read(bc, upd_p)) {
|
||||
static void update_nmv(vp9_reader *bc, vp9_prob *const p,
|
||||
const vp9_prob upd_p) {
|
||||
if (vp9_read(bc, upd_p)) {
|
||||
#ifdef LOW_PRECISION_MV_UPDATE
|
||||
*p = (vp8_read_literal(bc, 7) << 1) | 1;
|
||||
*p = (vp9_read_literal(bc, 7) << 1) | 1;
|
||||
#else
|
||||
*p = (vp8_read_literal(bc, 8));
|
||||
*p = (vp9_read_literal(bc, 8));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static void read_nmvprobs(vp8_reader *bc, nmv_context *mvctx,
|
||||
static void read_nmvprobs(vp9_reader *bc, nmv_context *mvctx,
|
||||
int usehp) {
|
||||
int i, j, k;
|
||||
#ifdef MV_GROUP_UPDATE
|
||||
if (!vp8_read_bit(bc)) return;
|
||||
if (!vp9_read_bit(bc)) return;
|
||||
#endif
|
||||
for (j = 0; j < MV_JOINTS - 1; ++j) {
|
||||
update_nmv(bc, &mvctx->joints[j],
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
for (i = 0; i < 2; ++i) {
|
||||
update_nmv(bc, &mvctx->comps[i].sign,
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
for (j = 0; j < MV_CLASSES - 1; ++j) {
|
||||
update_nmv(bc, &mvctx->comps[i].classes[j],
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
for (j = 0; j < CLASS0_SIZE - 1; ++j) {
|
||||
update_nmv(bc, &mvctx->comps[i].class0[j],
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
for (j = 0; j < MV_OFFSET_BITS; ++j) {
|
||||
update_nmv(bc, &mvctx->comps[i].bits[j],
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,27 +332,27 @@ static void read_nmvprobs(vp8_reader *bc, nmv_context *mvctx,
|
||||
for (j = 0; j < CLASS0_SIZE; ++j) {
|
||||
for (k = 0; k < 3; ++k)
|
||||
update_nmv(bc, &mvctx->comps[i].class0_fp[j][k],
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
for (j = 0; j < 3; ++j) {
|
||||
update_nmv(bc, &mvctx->comps[i].fp[j],
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
}
|
||||
|
||||
if (usehp) {
|
||||
for (i = 0; i < 2; ++i) {
|
||||
update_nmv(bc, &mvctx->comps[i].class0_hp,
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
update_nmv(bc, &mvctx->comps[i].hp,
|
||||
VP8_NMV_UPDATE_PROB);
|
||||
VP9_NMV_UPDATE_PROB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Read the referncence frame
|
||||
static MV_REFERENCE_FRAME read_ref_frame(VP9D_COMP *pbi,
|
||||
vp8_reader *const bc,
|
||||
vp9_reader *const bc,
|
||||
unsigned char segment_id) {
|
||||
MV_REFERENCE_FRAME ref_frame;
|
||||
int seg_ref_active;
|
||||
@ -381,14 +379,14 @@ static MV_REFERENCE_FRAME read_ref_frame(VP9D_COMP *pbi,
|
||||
if (!seg_ref_active || (seg_ref_count > 1)) {
|
||||
// Values used in prediction model coding
|
||||
unsigned char prediction_flag;
|
||||
vp8_prob pred_prob;
|
||||
vp9_prob pred_prob;
|
||||
MV_REFERENCE_FRAME pred_ref;
|
||||
|
||||
// Get the context probability the prediction flag
|
||||
pred_prob = vp9_get_pred_prob(cm, xd, PRED_REF);
|
||||
|
||||
// Read the prediction status flag
|
||||
prediction_flag = (unsigned char)vp8_read(bc, pred_prob);
|
||||
prediction_flag = (unsigned char)vp9_read(bc, pred_prob);
|
||||
|
||||
// Store the prediction flag.
|
||||
vp9_set_pred_flag(xd, PRED_REF, prediction_flag);
|
||||
@ -402,7 +400,7 @@ static MV_REFERENCE_FRAME read_ref_frame(VP9D_COMP *pbi,
|
||||
}
|
||||
// else decode the explicitly coded value
|
||||
else {
|
||||
vp8_prob mod_refprobs[PREDICTION_PROBS];
|
||||
vp9_prob mod_refprobs[PREDICTION_PROBS];
|
||||
vpx_memcpy(mod_refprobs,
|
||||
cm->mod_refprobs[pred_ref], sizeof(mod_refprobs));
|
||||
|
||||
@ -423,21 +421,21 @@ static MV_REFERENCE_FRAME read_ref_frame(VP9D_COMP *pbi,
|
||||
|
||||
// Do we need to decode the Intra/Inter branch
|
||||
if (mod_refprobs[0])
|
||||
ref_frame = (MV_REFERENCE_FRAME) vp8_read(bc, mod_refprobs[0]);
|
||||
ref_frame = (MV_REFERENCE_FRAME) vp9_read(bc, mod_refprobs[0]);
|
||||
else
|
||||
ref_frame++;
|
||||
|
||||
if (ref_frame) {
|
||||
// Do we need to decode the Last/Gf_Arf branch
|
||||
if (mod_refprobs[1])
|
||||
ref_frame += vp8_read(bc, mod_refprobs[1]);
|
||||
ref_frame += vp9_read(bc, mod_refprobs[1]);
|
||||
else
|
||||
ref_frame++;
|
||||
|
||||
if (ref_frame > 1) {
|
||||
// Do we need to decode the GF/Arf branch
|
||||
if (mod_refprobs[2])
|
||||
ref_frame += vp8_read(bc, mod_refprobs[2]);
|
||||
ref_frame += vp9_read(bc, mod_refprobs[2]);
|
||||
else {
|
||||
if (seg_ref_active) {
|
||||
if ((pred_ref == GOLDEN_FRAME) ||
|
||||
@ -467,17 +465,17 @@ static MV_REFERENCE_FRAME read_ref_frame(VP9D_COMP *pbi,
|
||||
}
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
static MB_PREDICTION_MODE read_sb_mv_ref(vp8_reader *bc, const vp8_prob *p) {
|
||||
return (MB_PREDICTION_MODE) vp8_treed_read(bc, vp9_sb_mv_ref_tree, p);
|
||||
static MB_PREDICTION_MODE read_sb_mv_ref(vp9_reader *bc, const vp9_prob *p) {
|
||||
return (MB_PREDICTION_MODE) treed_read(bc, vp9_sb_mv_ref_tree, p);
|
||||
}
|
||||
#endif
|
||||
|
||||
static MB_PREDICTION_MODE read_mv_ref(vp8_reader *bc, const vp8_prob *p) {
|
||||
return (MB_PREDICTION_MODE) vp8_treed_read(bc, vp9_mv_ref_tree, p);
|
||||
static MB_PREDICTION_MODE read_mv_ref(vp9_reader *bc, const vp9_prob *p) {
|
||||
return (MB_PREDICTION_MODE) treed_read(bc, vp9_mv_ref_tree, p);
|
||||
}
|
||||
|
||||
static B_PREDICTION_MODE sub_mv_ref(vp8_reader *bc, const vp8_prob *p) {
|
||||
return (B_PREDICTION_MODE) vp8_treed_read(bc, vp9_sub_mv_ref_tree, p);
|
||||
static B_PREDICTION_MODE sub_mv_ref(vp9_reader *bc, const vp9_prob *p) {
|
||||
return (B_PREDICTION_MODE) treed_read(bc, vp9_sub_mv_ref_tree, p);
|
||||
}
|
||||
|
||||
#ifdef VPX_MODE_COUNT
|
||||
@ -502,56 +500,56 @@ static void read_switchable_interp_probs(VP9D_COMP* const pbi,
|
||||
BOOL_DECODER* const bc) {
|
||||
VP9_COMMON *const cm = &pbi->common;
|
||||
int i, j;
|
||||
for (j = 0; j <= VP8_SWITCHABLE_FILTERS; ++j) {
|
||||
for (i = 0; i < VP8_SWITCHABLE_FILTERS - 1; ++i) {
|
||||
cm->fc.switchable_interp_prob[j][i] = vp8_read_literal(bc, 8);
|
||||
for (j = 0; j <= VP9_SWITCHABLE_FILTERS; ++j) {
|
||||
for (i = 0; i < VP9_SWITCHABLE_FILTERS - 1; ++i) {
|
||||
cm->fc.switchable_interp_prob[j][i] = vp9_read_literal(bc, 8);
|
||||
}
|
||||
}
|
||||
//printf("DECODER: %d %d\n", cm->fc.switchable_interp_prob[0],
|
||||
//cm->fc.switchable_interp_prob[1]);
|
||||
}
|
||||
|
||||
static void mb_mode_mv_init(VP9D_COMP *pbi, vp8_reader *bc) {
|
||||
static void mb_mode_mv_init(VP9D_COMP *pbi, vp9_reader *bc) {
|
||||
VP9_COMMON *const cm = &pbi->common;
|
||||
nmv_context *const nmvc = &pbi->common.fc.nmvc;
|
||||
MACROBLOCKD *const xd = &pbi->mb;
|
||||
|
||||
if (cm->frame_type == KEY_FRAME) {
|
||||
if (!cm->kf_ymode_probs_update)
|
||||
cm->kf_ymode_probs_index = vp8_read_literal(bc, 3);
|
||||
cm->kf_ymode_probs_index = vp9_read_literal(bc, 3);
|
||||
} else {
|
||||
#if CONFIG_PRED_FILTER
|
||||
cm->pred_filter_mode = (vp8_prob)vp8_read_literal(bc, 2);
|
||||
cm->pred_filter_mode = (vp9_prob)vp9_read_literal(bc, 2);
|
||||
|
||||
if (cm->pred_filter_mode == 2)
|
||||
cm->prob_pred_filter_off = (vp8_prob)vp8_read_literal(bc, 8);
|
||||
cm->prob_pred_filter_off = (vp9_prob)vp9_read_literal(bc, 8);
|
||||
#endif
|
||||
if (cm->mcomp_filter_type == SWITCHABLE)
|
||||
read_switchable_interp_probs(pbi, bc);
|
||||
// Decode the baseline probabilities for decoding reference frame
|
||||
cm->prob_intra_coded = (vp8_prob)vp8_read_literal(bc, 8);
|
||||
cm->prob_last_coded = (vp8_prob)vp8_read_literal(bc, 8);
|
||||
cm->prob_gf_coded = (vp8_prob)vp8_read_literal(bc, 8);
|
||||
cm->prob_intra_coded = (vp9_prob)vp9_read_literal(bc, 8);
|
||||
cm->prob_last_coded = (vp9_prob)vp9_read_literal(bc, 8);
|
||||
cm->prob_gf_coded = (vp9_prob)vp9_read_literal(bc, 8);
|
||||
|
||||
// Computes a modified set of probabilities for use when reference
|
||||
// frame prediction fails.
|
||||
vp9_compute_mod_refprobs(cm);
|
||||
|
||||
pbi->common.comp_pred_mode = vp8_read(bc, 128);
|
||||
pbi->common.comp_pred_mode = vp9_read(bc, 128);
|
||||
if (cm->comp_pred_mode)
|
||||
cm->comp_pred_mode += vp8_read(bc, 128);
|
||||
cm->comp_pred_mode += vp9_read(bc, 128);
|
||||
if (cm->comp_pred_mode == HYBRID_PREDICTION) {
|
||||
int i;
|
||||
for (i = 0; i < COMP_PRED_CONTEXTS; i++)
|
||||
cm->prob_comppred[i] = (vp8_prob)vp8_read_literal(bc, 8);
|
||||
cm->prob_comppred[i] = (vp9_prob)vp9_read_literal(bc, 8);
|
||||
}
|
||||
|
||||
if (vp8_read_bit(bc)) {
|
||||
if (vp9_read_bit(bc)) {
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
cm->fc.ymode_prob[i] = (vp8_prob) vp8_read_literal(bc, 8);
|
||||
} while (++i < VP8_YMODES - 1);
|
||||
cm->fc.ymode_prob[i] = (vp9_prob) vp9_read_literal(bc, 8);
|
||||
} while (++i < VP9_YMODES - 1);
|
||||
}
|
||||
|
||||
#if CONFIG_NEW_MVREF
|
||||
@ -581,12 +579,12 @@ static void read_mb_segment_id(VP9D_COMP *pbi,
|
||||
if (cm->temporal_update) {
|
||||
// Get the context based probability for reading the
|
||||
// prediction status flag
|
||||
vp8_prob pred_prob =
|
||||
vp9_prob pred_prob =
|
||||
vp9_get_pred_prob(cm, xd, PRED_SEG_ID);
|
||||
|
||||
// Read the prediction status flag
|
||||
unsigned char seg_pred_flag =
|
||||
(unsigned char)vp8_read(bc, pred_prob);
|
||||
(unsigned char)vp9_read(bc, pred_prob);
|
||||
|
||||
// Store the prediction flag.
|
||||
vp9_set_pred_flag(xd, PRED_SEG_ID, seg_pred_flag);
|
||||
@ -598,12 +596,12 @@ static void read_mb_segment_id(VP9D_COMP *pbi,
|
||||
}
|
||||
// Else .... decode it explicitly
|
||||
else {
|
||||
vp8_read_mb_segid(bc, mbmi, xd);
|
||||
read_mb_segid(bc, mbmi, xd);
|
||||
}
|
||||
}
|
||||
// Normal unpredicted coding mode
|
||||
else {
|
||||
vp8_read_mb_segid(bc, mbmi, xd);
|
||||
read_mb_segid(bc, mbmi, xd);
|
||||
}
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
if (mbmi->encoded_as_sb) {
|
||||
@ -694,7 +692,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
(vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_EOB) != 0))) {
|
||||
// Read the macroblock coeff skip flag if this feature is in use,
|
||||
// else default to 0
|
||||
mbmi->mb_skip_coeff = vp8_read(bc, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
|
||||
mbmi->mb_skip_coeff = vp9_read(bc, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
|
||||
} else {
|
||||
if (vp9_segfeature_active(xd,
|
||||
mbmi->segment_id, SEG_LVL_EOB) &&
|
||||
@ -712,7 +710,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
int rct[4];
|
||||
int_mv nearest, nearby, best_mv;
|
||||
int_mv nearest_second, nearby_second, best_mv_second;
|
||||
vp8_prob mv_ref_p [VP8_MVREFS - 1];
|
||||
vp9_prob mv_ref_p [VP9_MVREFS - 1];
|
||||
|
||||
#if CONFIG_NEWBESTREFMV
|
||||
int recon_y_stride, recon_yoffset;
|
||||
@ -751,7 +749,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
ref_frame, mbmi->ref_mvs[ref_frame],
|
||||
cm->ref_frame_sign_bias);
|
||||
|
||||
vp8_find_best_ref_mvs(xd,
|
||||
vp9_find_best_ref_mvs(xd,
|
||||
xd->pre.y_buffer,
|
||||
recon_y_stride,
|
||||
mbmi->ref_mvs[ref_frame],
|
||||
@ -781,7 +779,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
// Is the prediction filter enabled
|
||||
if (cm->pred_filter_mode == 2)
|
||||
mbmi->pred_filter_enabled =
|
||||
vp8_read(bc, cm->prob_pred_filter_off);
|
||||
vp9_read(bc, cm->prob_pred_filter_off);
|
||||
else
|
||||
mbmi->pred_filter_enabled = cm->pred_filter_mode;
|
||||
}
|
||||
@ -790,8 +788,8 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
{
|
||||
if (cm->mcomp_filter_type == SWITCHABLE) {
|
||||
mbmi->interp_filter = vp9_switchable_interp[
|
||||
vp8_treed_read(bc, vp9_switchable_interp_tree,
|
||||
vp9_get_pred_probs(cm, xd, PRED_SWITCHABLE_INTERP))];
|
||||
treed_read(bc, vp9_switchable_interp_tree,
|
||||
vp9_get_pred_probs(cm, xd, PRED_SWITCHABLE_INTERP))];
|
||||
} else {
|
||||
mbmi->interp_filter = cm->mcomp_filter_type;
|
||||
}
|
||||
@ -799,7 +797,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
|
||||
if (cm->comp_pred_mode == COMP_PREDICTION_ONLY ||
|
||||
(cm->comp_pred_mode == HYBRID_PREDICTION &&
|
||||
vp8_read(bc, vp9_get_pred_prob(cm, xd, PRED_COMP)))) {
|
||||
vp9_read(bc, vp9_get_pred_prob(cm, xd, PRED_COMP)))) {
|
||||
/* Since we have 3 reference frames, we can only have 3 unique
|
||||
* combinations of combinations of 2 different reference frames
|
||||
* (A-G, G-L or A-L). In the bitstream, we use this to simply
|
||||
@ -839,7 +837,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
mbmi->ref_mvs[mbmi->second_ref_frame],
|
||||
cm->ref_frame_sign_bias);
|
||||
|
||||
vp8_find_best_ref_mvs(xd,
|
||||
vp9_find_best_ref_mvs(xd,
|
||||
xd->second_pre.y_buffer,
|
||||
recon_y_stride,
|
||||
mbmi->ref_mvs[mbmi->second_ref_frame],
|
||||
@ -862,7 +860,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
switch (mbmi->mode) {
|
||||
case SPLITMV: {
|
||||
const int s = mbmi->partitioning =
|
||||
vp8_treed_read(bc, vp9_mbsplit_tree, cm->fc.mbsplit_prob);
|
||||
treed_read(bc, vp9_mbsplit_tree, cm->fc.mbsplit_prob);
|
||||
const int num_p = vp9_mbsplit_count [s];
|
||||
int j = 0;
|
||||
cm->fc.mbsplit_counts[s]++;
|
||||
@ -938,17 +936,17 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
break;
|
||||
}
|
||||
|
||||
mbmi->need_to_clamp_mvs |= vp8_check_mv_bounds(&blockmv,
|
||||
mb_to_left_edge,
|
||||
mb_to_right_edge,
|
||||
mb_to_top_edge,
|
||||
mb_to_bottom_edge);
|
||||
mbmi->need_to_clamp_mvs |= check_mv_bounds(&blockmv,
|
||||
mb_to_left_edge,
|
||||
mb_to_right_edge,
|
||||
mb_to_top_edge,
|
||||
mb_to_bottom_edge);
|
||||
if (mbmi->second_ref_frame) {
|
||||
mbmi->need_to_clamp_mvs |= vp8_check_mv_bounds(&secondmv,
|
||||
mb_to_left_edge,
|
||||
mb_to_right_edge,
|
||||
mb_to_top_edge,
|
||||
mb_to_bottom_edge);
|
||||
mbmi->need_to_clamp_mvs |= check_mv_bounds(&secondmv,
|
||||
mb_to_left_edge,
|
||||
mb_to_right_edge,
|
||||
mb_to_top_edge,
|
||||
mb_to_bottom_edge);
|
||||
}
|
||||
|
||||
{
|
||||
@ -979,24 +977,24 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
case NEARMV:
|
||||
mv->as_int = nearby.as_int;
|
||||
/* Clip "next_nearest" so that it does not extend to far out of image */
|
||||
vp8_clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
if (mbmi->second_ref_frame) {
|
||||
mbmi->mv[1].as_int = nearby_second.as_int;
|
||||
vp8_clamp_mv(&mbmi->mv[1], mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
clamp_mv(&mbmi->mv[1], mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
}
|
||||
break;
|
||||
|
||||
case NEARESTMV:
|
||||
mv->as_int = nearest.as_int;
|
||||
/* Clip "next_nearest" so that it does not extend to far out of image */
|
||||
vp8_clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
if (mbmi->second_ref_frame) {
|
||||
mbmi->mv[1].as_int = nearest_second.as_int;
|
||||
vp8_clamp_mv(&mbmi->mv[1], mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
clamp_mv(&mbmi->mv[1], mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1015,7 +1013,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
|
||||
// Encode the index of the choice.
|
||||
best_index =
|
||||
vp8_read_mv_ref_id(bc, xd->mb_mv_ref_id_probs[ref_frame]);
|
||||
vp9_read_mv_ref_id(bc, xd->mb_mv_ref_id_probs[ref_frame]);
|
||||
|
||||
best_mv.as_int = mbmi->ref_mvs[ref_frame][best_index].as_int;
|
||||
}
|
||||
@ -1035,11 +1033,11 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
* so signal to the prediction stage whether special
|
||||
* handling may be required.
|
||||
*/
|
||||
mbmi->need_to_clamp_mvs = vp8_check_mv_bounds(mv,
|
||||
mb_to_left_edge,
|
||||
mb_to_right_edge,
|
||||
mb_to_top_edge,
|
||||
mb_to_bottom_edge);
|
||||
mbmi->need_to_clamp_mvs = check_mv_bounds(mv,
|
||||
mb_to_left_edge,
|
||||
mb_to_right_edge,
|
||||
mb_to_top_edge,
|
||||
mb_to_bottom_edge);
|
||||
|
||||
if (mbmi->second_ref_frame) {
|
||||
#if CONFIG_NEW_MVREF
|
||||
@ -1049,7 +1047,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
|
||||
// Encode the index of the choice.
|
||||
best_index =
|
||||
vp8_read_mv_ref_id(bc, xd->mb_mv_ref_id_probs[ref_frame]);
|
||||
vp9_read_mv_ref_id(bc, xd->mb_mv_ref_id_probs[ref_frame]);
|
||||
best_mv_second.as_int = mbmi->ref_mvs[ref_frame][best_index].as_int;
|
||||
}
|
||||
#endif
|
||||
@ -1062,9 +1060,9 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
mbmi->mv[1].as_mv.row += best_mv_second.as_mv.row;
|
||||
mbmi->mv[1].as_mv.col += best_mv_second.as_mv.col;
|
||||
mbmi->need_to_clamp_secondmv |=
|
||||
vp8_check_mv_bounds(&mbmi->mv[1],
|
||||
mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
check_mv_bounds(&mbmi->mv[1],
|
||||
mb_to_left_edge, mb_to_right_edge,
|
||||
mb_to_top_edge, mb_to_bottom_edge);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -1083,7 +1081,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
else {
|
||||
// FIXME write using SB mode tree
|
||||
mbmi->mode = (MB_PREDICTION_MODE)
|
||||
vp8_read_ymode(bc, pbi->common.fc.ymode_prob);
|
||||
read_ymode(bc, pbi->common.fc.ymode_prob);
|
||||
pbi->common.fc.ymode_counts[mbmi->mode]++;
|
||||
}
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
@ -1094,14 +1092,14 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
if (mbmi->mode == B_PRED) {
|
||||
int j = 0;
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
int use_comp_pred = vp8_read(bc, 128);
|
||||
int use_comp_pred = vp9_read(bc, 128);
|
||||
#endif
|
||||
do {
|
||||
mi->bmi[j].as_mode.first = (B_PREDICTION_MODE)vp8_read_bmode(bc, pbi->common.fc.bmode_prob);
|
||||
mi->bmi[j].as_mode.first = (B_PREDICTION_MODE)read_bmode(bc, pbi->common.fc.bmode_prob);
|
||||
/*
|
||||
{
|
||||
int p;
|
||||
for (p = 0; p < VP8_BINTRAMODES - 1; ++p)
|
||||
for (p = 0; p < VP9_BINTRAMODES - 1; ++p)
|
||||
printf(" %d", pbi->common.fc.bmode_prob[p]);
|
||||
printf("\nbmode[%d][%d]: %d\n", pbi->common.current_video_frame, j, mi->bmi[j].as_mode.first);
|
||||
}
|
||||
@ -1109,7 +1107,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
pbi->common.fc.bmode_counts[mi->bmi[j].as_mode.first]++;
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
if (use_comp_pred) {
|
||||
mi->bmi[j].as_mode.second = (B_PREDICTION_MODE)vp8_read_bmode(bc, pbi->common.fc.bmode_prob);
|
||||
mi->bmi[j].as_mode.second = (B_PREDICTION_MODE)read_bmode(bc, pbi->common.fc.bmode_prob);
|
||||
} else {
|
||||
mi->bmi[j].as_mode.second = (B_PREDICTION_MODE)(B_DC_PRED - 1);
|
||||
}
|
||||
@ -1122,7 +1120,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
int mode8x8;
|
||||
for (i = 0; i < 4; i++) {
|
||||
int ib = vp9_i8x8_block[i];
|
||||
mode8x8 = vp8_read_i8x8_mode(bc, pbi->common.fc.i8x8_mode_prob);
|
||||
mode8x8 = read_i8x8_mode(bc, pbi->common.fc.i8x8_mode_prob);
|
||||
mi->bmi[ib + 0].as_mode.first = mode8x8;
|
||||
mi->bmi[ib + 1].as_mode.first = mode8x8;
|
||||
mi->bmi[ib + 4].as_mode.first = mode8x8;
|
||||
@ -1136,7 +1134,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
mbmi->uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(
|
||||
mbmi->uv_mode = (MB_PREDICTION_MODE)read_uv_mode(
|
||||
bc, pbi->common.fc.uv_mode_prob[mbmi->mode]);
|
||||
pbi->common.fc.uv_mode_counts[mbmi->mode][mbmi->uv_mode]++;
|
||||
}
|
||||
@ -1156,10 +1154,10 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
|
||||
(mbmi->ref_frame != INTRA_FRAME && !(mbmi->mode == SPLITMV &&
|
||||
mbmi->partitioning == PARTITIONING_4X4)))) {
|
||||
// FIXME(rbultje) code ternary symbol once all experiments are merged
|
||||
mbmi->txfm_size = vp8_read(bc, cm->prob_tx[0]);
|
||||
mbmi->txfm_size = vp9_read(bc, cm->prob_tx[0]);
|
||||
if (mbmi->txfm_size != TX_4X4 && mbmi->mode != I8X8_PRED &&
|
||||
mbmi->mode != SPLITMV)
|
||||
mbmi->txfm_size += vp8_read(bc, cm->prob_tx[1]);
|
||||
mbmi->txfm_size += vp9_read(bc, cm->prob_tx[1]);
|
||||
} else if (cm->txfm_mode >= ALLOW_16X16 &&
|
||||
((mbmi->ref_frame == INTRA_FRAME && mbmi->mode <= TM_PRED) ||
|
||||
(mbmi->ref_frame != INTRA_FRAME && mbmi->mode != SPLITMV))) {
|
||||
@ -1181,7 +1179,7 @@ void vp9_decode_mode_mvs_init(VP9D_COMP *pbi, BOOL_DECODER* const bc) {
|
||||
if (pbi->common.mb_no_coeff_skip) {
|
||||
int k;
|
||||
for (k = 0; k < MBSKIP_CONTEXTS; ++k)
|
||||
cm->mbskip_pred_probs[k] = (vp8_prob)vp8_read_literal(bc, 8);
|
||||
cm->mbskip_pred_probs[k] = (vp9_prob)vp9_read_literal(bc, 8);
|
||||
}
|
||||
|
||||
mb_mode_mv_init(pbi, bc);
|
||||
|
@ -67,9 +67,9 @@ static int inv_remap_prob(int v, int m) {
|
||||
return i;
|
||||
}
|
||||
|
||||
static vp8_prob read_prob_diff_update(vp8_reader *const bc, int oldp) {
|
||||
static vp9_prob read_prob_diff_update(vp9_reader *const bc, int oldp) {
|
||||
int delp = vp9_decode_term_subexp(bc, SUBEXP_PARAM, 255);
|
||||
return (vp8_prob)inv_remap_prob(delp, oldp);
|
||||
return (vp9_prob)inv_remap_prob(delp, oldp);
|
||||
}
|
||||
|
||||
void vp9_init_de_quantizer(VP9D_COMP *pbi) {
|
||||
@ -241,7 +241,7 @@ static void decode_macroblock(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
xd->left_context--;
|
||||
}
|
||||
#endif
|
||||
} else if (!vp8dx_bool_error(bc)) {
|
||||
} else if (!bool_error(bc)) {
|
||||
for (i = 0; i < 25; i++) {
|
||||
xd->block[i].eob = 0;
|
||||
xd->eobs[i] = 0;
|
||||
@ -262,7 +262,7 @@ static void decode_macroblock(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
|
||||
if (eobtotal == 0 && mode != B_PRED && mode != SPLITMV
|
||||
&& mode != I8X8_PRED
|
||||
&& !vp8dx_bool_error(bc)) {
|
||||
&& !bool_error(bc)) {
|
||||
/* Special case: Force the loopfilter to skip when eobtotal and
|
||||
* mb_skip_coeff are zero.
|
||||
* */
|
||||
@ -364,7 +364,7 @@ static void decode_macroblock(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
vp9_intra4x4_predict(b, b_mode, b->predictor);
|
||||
#if CONFIG_COMP_INTRA_PRED
|
||||
} else {
|
||||
vp8_comp_intra4x4_predict(b, b_mode, b_mode2, b->predictor);
|
||||
vp9_comp_intra4x4_predict(b, b_mode, b_mode2, b->predictor);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -511,13 +511,13 @@ static void decode_macroblock(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
}
|
||||
|
||||
|
||||
static int get_delta_q(vp8_reader *bc, int prev, int *q_update) {
|
||||
static int get_delta_q(vp9_reader *bc, int prev, int *q_update) {
|
||||
int ret_val = 0;
|
||||
|
||||
if (vp8_read_bit(bc)) {
|
||||
ret_val = vp8_read_literal(bc, 4);
|
||||
if (vp9_read_bit(bc)) {
|
||||
ret_val = vp9_read_literal(bc, 4);
|
||||
|
||||
if (vp8_read_bit(bc))
|
||||
if (vp9_read_bit(bc))
|
||||
ret_val = -ret_val;
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ decode_sb_row(VP9D_COMP *pbi, VP9_COMMON *pc, int mbrow, MACROBLOCKD *xd,
|
||||
MODE_INFO *mi = xd->mode_info_context;
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
mi->mbmi.encoded_as_sb = vp8_read(bc, pc->sb_coded);
|
||||
mi->mbmi.encoded_as_sb = vp9_read(bc, pc->sb_coded);
|
||||
#endif
|
||||
|
||||
// Process the 4 MBs within the SB in the order:
|
||||
@ -666,7 +666,7 @@ decode_sb_row(VP9D_COMP *pbi, VP9_COMMON *pc, int mbrow, MACROBLOCKD *xd,
|
||||
decode_macroblock(pbi, xd, mb_row, mb_col, bc);
|
||||
|
||||
/* check if the boolean decoder has suffered an error */
|
||||
xd->corrupted |= vp8dx_bool_error(bc);
|
||||
xd->corrupted |= bool_error(bc);
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
if (mi->mbmi.encoded_as_sb) {
|
||||
@ -811,12 +811,12 @@ static void init_frame(VP9D_COMP *pbi) {
|
||||
|
||||
#if 0
|
||||
static void read_coef_probs2(VP9D_COMP *pbi) {
|
||||
const vp8_prob grpupd = 192;
|
||||
const vp9_prob grpupd = 192;
|
||||
int i, j, k, l;
|
||||
vp8_reader *const bc = &pbi->bc;
|
||||
vp9_reader *const bc = &pbi->bc;
|
||||
VP9_COMMON *const pc = &pbi->common;
|
||||
for (l = 0; l < ENTROPY_NODES; l++) {
|
||||
if (vp8_read(bc, grpupd)) {
|
||||
if (vp9_read(bc, grpupd)) {
|
||||
// printf("Decoding %d\n", l);
|
||||
for (i = 0; i < BLOCK_TYPES; i++)
|
||||
for (j = !i; j < COEF_BANDS; j++)
|
||||
@ -825,8 +825,8 @@ static void read_coef_probs2(VP9D_COMP *pbi) {
|
||||
(i > 0 && j == 0)))
|
||||
continue;
|
||||
{
|
||||
vp8_prob *const p = pc->fc.coef_probs [i][j][k] + l;
|
||||
int u = vp8_read(bc, COEF_UPDATE_PROB);
|
||||
vp9_prob *const p = pc->fc.coef_probs [i][j][k] + l;
|
||||
int u = vp9_read(bc, COEF_UPDATE_PROB);
|
||||
if (u) *p = read_prob_diff_update(bc, *p);
|
||||
}
|
||||
}
|
||||
@ -834,7 +834,7 @@ static void read_coef_probs2(VP9D_COMP *pbi) {
|
||||
}
|
||||
if (pbi->common.txfm_mode == ALLOW_8X8) {
|
||||
for (l = 0; l < ENTROPY_NODES; l++) {
|
||||
if (vp8_read(bc, grpupd)) {
|
||||
if (vp9_read(bc, grpupd)) {
|
||||
for (i = 0; i < BLOCK_TYPES_8X8; i++)
|
||||
for (j = !i; j < COEF_BANDS; j++)
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; k++) {
|
||||
@ -842,9 +842,9 @@ static void read_coef_probs2(VP9D_COMP *pbi) {
|
||||
(i > 0 && j == 0)))
|
||||
continue;
|
||||
{
|
||||
vp8_prob *const p = pc->fc.coef_probs_8x8 [i][j][k] + l;
|
||||
vp9_prob *const p = pc->fc.coef_probs_8x8 [i][j][k] + l;
|
||||
|
||||
int u = vp8_read(bc, COEF_UPDATE_PROB_8X8);
|
||||
int u = vp9_read(bc, COEF_UPDATE_PROB_8X8);
|
||||
if (u) *p = read_prob_diff_update(bc, *p);
|
||||
}
|
||||
}
|
||||
@ -856,11 +856,11 @@ static void read_coef_probs2(VP9D_COMP *pbi) {
|
||||
|
||||
static void read_coef_probs_common(
|
||||
BOOL_DECODER* const bc,
|
||||
vp8_prob coef_probs[BLOCK_TYPES][COEF_BANDS]
|
||||
vp9_prob coef_probs[BLOCK_TYPES][COEF_BANDS]
|
||||
[PREV_COEF_CONTEXTS][ENTROPY_NODES]) {
|
||||
int i, j, k, l;
|
||||
|
||||
if (vp8_read_bit(bc)) {
|
||||
if (vp9_read_bit(bc)) {
|
||||
for (i = 0; i < BLOCK_TYPES; i++) {
|
||||
for (j = !i; j < COEF_BANDS; j++) {
|
||||
/* NB: This j loop starts from 1 on block type i == 0 */
|
||||
@ -869,9 +869,9 @@ static void read_coef_probs_common(
|
||||
(i > 0 && j == 0)))
|
||||
continue;
|
||||
for (l = 0; l < ENTROPY_NODES; l++) {
|
||||
vp8_prob *const p = coef_probs[i][j][k] + l;
|
||||
vp9_prob *const p = coef_probs[i][j][k] + l;
|
||||
|
||||
if (vp8_read(bc, COEF_UPDATE_PROB)) {
|
||||
if (vp9_read(bc, COEF_UPDATE_PROB)) {
|
||||
*p = read_prob_diff_update(bc, *p);
|
||||
}
|
||||
}
|
||||
@ -990,17 +990,17 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
|
||||
"Failed to allocate bool decoder 0");
|
||||
if (pc->frame_type == KEY_FRAME) {
|
||||
pc->clr_type = (YUV_TYPE)vp8_read_bit(&header_bc);
|
||||
pc->clamp_type = (CLAMP_TYPE)vp8_read_bit(&header_bc);
|
||||
pc->clr_type = (YUV_TYPE)vp9_read_bit(&header_bc);
|
||||
pc->clamp_type = (CLAMP_TYPE)vp9_read_bit(&header_bc);
|
||||
}
|
||||
|
||||
/* Is segmentation enabled */
|
||||
xd->segmentation_enabled = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->segmentation_enabled = (unsigned char)vp9_read_bit(&header_bc);
|
||||
|
||||
if (xd->segmentation_enabled) {
|
||||
// Read whether or not the segmentation map is being explicitly
|
||||
// updated this frame.
|
||||
xd->update_mb_segmentation_map = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->update_mb_segmentation_map = (unsigned char)vp9_read_bit(&header_bc);
|
||||
|
||||
// If so what method will be used.
|
||||
if (xd->update_mb_segmentation_map) {
|
||||
@ -1009,28 +1009,28 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
// Read the probs used to decode the segment id for each macro
|
||||
// block.
|
||||
for (i = 0; i < MB_FEATURE_TREE_PROBS; i++) {
|
||||
xd->mb_segment_tree_probs[i] = vp8_read_bit(&header_bc) ?
|
||||
(vp8_prob)vp8_read_literal(&header_bc, 8) : 255;
|
||||
xd->mb_segment_tree_probs[i] = vp9_read_bit(&header_bc) ?
|
||||
(vp9_prob)vp9_read_literal(&header_bc, 8) : 255;
|
||||
}
|
||||
|
||||
// Read the prediction probs needed to decode the segment id
|
||||
pc->temporal_update = (unsigned char)vp8_read_bit(&header_bc);
|
||||
pc->temporal_update = (unsigned char)vp9_read_bit(&header_bc);
|
||||
for (i = 0; i < PREDICTION_PROBS; i++) {
|
||||
if (pc->temporal_update) {
|
||||
pc->segment_pred_probs[i] = vp8_read_bit(&header_bc) ?
|
||||
(vp8_prob)vp8_read_literal(&header_bc, 8) : 255;
|
||||
pc->segment_pred_probs[i] = vp9_read_bit(&header_bc) ?
|
||||
(vp9_prob)vp9_read_literal(&header_bc, 8) : 255;
|
||||
} else {
|
||||
pc->segment_pred_probs[i] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Is the segment data being updated
|
||||
xd->update_mb_segmentation_data = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->update_mb_segmentation_data = (unsigned char)vp9_read_bit(&header_bc);
|
||||
|
||||
if (xd->update_mb_segmentation_data) {
|
||||
int data;
|
||||
|
||||
xd->mb_segment_abs_delta = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->mb_segment_abs_delta = (unsigned char)vp9_read_bit(&header_bc);
|
||||
|
||||
vp9_clearall_segfeatures(xd);
|
||||
|
||||
@ -1039,16 +1039,16 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
// For each of the segments features...
|
||||
for (j = 0; j < SEG_LVL_MAX; j++) {
|
||||
// Is the feature enabled
|
||||
if (vp8_read_bit(&header_bc)) {
|
||||
if (vp9_read_bit(&header_bc)) {
|
||||
// Update the feature data and mask
|
||||
vp9_enable_segfeature(xd, i, j);
|
||||
|
||||
data = (signed char)vp8_read_literal(
|
||||
data = (signed char)vp9_read_literal(
|
||||
&header_bc, vp9_seg_feature_data_bits(j));
|
||||
|
||||
// Is the segment data signed..
|
||||
if (vp9_is_segfeature_signed(j)) {
|
||||
if (vp8_read_bit(&header_bc))
|
||||
if (vp9_read_bit(&header_bc))
|
||||
data = - data;
|
||||
}
|
||||
} else
|
||||
@ -1069,53 +1069,53 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
pc->ref_pred_probs[2] = 40;
|
||||
} else {
|
||||
for (i = 0; i < PREDICTION_PROBS; i++) {
|
||||
if (vp8_read_bit(&header_bc))
|
||||
pc->ref_pred_probs[i] = (vp8_prob)vp8_read_literal(&header_bc, 8);
|
||||
if (vp9_read_bit(&header_bc))
|
||||
pc->ref_pred_probs[i] = (vp9_prob)vp9_read_literal(&header_bc, 8);
|
||||
}
|
||||
}
|
||||
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
pc->sb_coded = vp8_read_literal(&header_bc, 8);
|
||||
pc->sb_coded = vp9_read_literal(&header_bc, 8);
|
||||
#endif
|
||||
|
||||
/* Read the loop filter level and type */
|
||||
pc->txfm_mode = vp8_read_literal(&header_bc, 2);
|
||||
pc->txfm_mode = vp9_read_literal(&header_bc, 2);
|
||||
if (pc->txfm_mode == TX_MODE_SELECT) {
|
||||
pc->prob_tx[0] = vp8_read_literal(&header_bc, 8);
|
||||
pc->prob_tx[1] = vp8_read_literal(&header_bc, 8);
|
||||
pc->prob_tx[0] = vp9_read_literal(&header_bc, 8);
|
||||
pc->prob_tx[1] = vp9_read_literal(&header_bc, 8);
|
||||
}
|
||||
|
||||
pc->filter_type = (LOOPFILTERTYPE) vp8_read_bit(&header_bc);
|
||||
pc->filter_level = vp8_read_literal(&header_bc, 6);
|
||||
pc->sharpness_level = vp8_read_literal(&header_bc, 3);
|
||||
pc->filter_type = (LOOPFILTERTYPE) vp9_read_bit(&header_bc);
|
||||
pc->filter_level = vp9_read_literal(&header_bc, 6);
|
||||
pc->sharpness_level = vp9_read_literal(&header_bc, 3);
|
||||
|
||||
/* Read in loop filter deltas applied at the MB level based on mode or ref frame. */
|
||||
xd->mode_ref_lf_delta_update = 0;
|
||||
xd->mode_ref_lf_delta_enabled = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->mode_ref_lf_delta_enabled = (unsigned char)vp9_read_bit(&header_bc);
|
||||
|
||||
if (xd->mode_ref_lf_delta_enabled) {
|
||||
/* Do the deltas need to be updated */
|
||||
xd->mode_ref_lf_delta_update = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->mode_ref_lf_delta_update = (unsigned char)vp9_read_bit(&header_bc);
|
||||
|
||||
if (xd->mode_ref_lf_delta_update) {
|
||||
/* Send update */
|
||||
for (i = 0; i < MAX_REF_LF_DELTAS; i++) {
|
||||
if (vp8_read_bit(&header_bc)) {
|
||||
/*sign = vp8_read_bit( &header_bc );*/
|
||||
xd->ref_lf_deltas[i] = (signed char)vp8_read_literal(&header_bc, 6);
|
||||
if (vp9_read_bit(&header_bc)) {
|
||||
/*sign = vp9_read_bit( &header_bc );*/
|
||||
xd->ref_lf_deltas[i] = (signed char)vp9_read_literal(&header_bc, 6);
|
||||
|
||||
if (vp8_read_bit(&header_bc)) /* Apply sign */
|
||||
if (vp9_read_bit(&header_bc)) /* Apply sign */
|
||||
xd->ref_lf_deltas[i] = xd->ref_lf_deltas[i] * -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Send update */
|
||||
for (i = 0; i < MAX_MODE_LF_DELTAS; i++) {
|
||||
if (vp8_read_bit(&header_bc)) {
|
||||
/*sign = vp8_read_bit( &header_bc );*/
|
||||
xd->mode_lf_deltas[i] = (signed char)vp8_read_literal(&header_bc, 6);
|
||||
if (vp9_read_bit(&header_bc)) {
|
||||
/*sign = vp9_read_bit( &header_bc );*/
|
||||
xd->mode_lf_deltas[i] = (signed char)vp9_read_literal(&header_bc, 6);
|
||||
|
||||
if (vp8_read_bit(&header_bc)) /* Apply sign */
|
||||
if (vp9_read_bit(&header_bc)) /* Apply sign */
|
||||
xd->mode_lf_deltas[i] = xd->mode_lf_deltas[i] * -1;
|
||||
}
|
||||
}
|
||||
@ -1123,7 +1123,7 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
}
|
||||
|
||||
// Dummy read for now
|
||||
vp8_read_literal(&header_bc, 2);
|
||||
vp9_read_literal(&header_bc, 2);
|
||||
|
||||
setup_token_decoder(pbi, data + first_partition_length_in_bytes,
|
||||
&residual_bc);
|
||||
@ -1132,7 +1132,7 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
{
|
||||
int Q, q_update;
|
||||
|
||||
Q = vp8_read_literal(&header_bc, QINDEX_BITS);
|
||||
Q = vp9_read_literal(&header_bc, QINDEX_BITS);
|
||||
pc->base_qindex = Q;
|
||||
q_update = 0;
|
||||
/* AC 1st order Q = default */
|
||||
@ -1155,8 +1155,8 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
*/
|
||||
if (pc->frame_type != KEY_FRAME) {
|
||||
/* Should the GF or ARF be updated from the current frame */
|
||||
pc->refresh_golden_frame = vp8_read_bit(&header_bc);
|
||||
pc->refresh_alt_ref_frame = vp8_read_bit(&header_bc);
|
||||
pc->refresh_golden_frame = vp9_read_bit(&header_bc);
|
||||
pc->refresh_alt_ref_frame = vp9_read_bit(&header_bc);
|
||||
|
||||
if (pc->refresh_alt_ref_frame) {
|
||||
vpx_memcpy(&pc->fc, &pc->lfc_a, sizeof(pc->fc));
|
||||
@ -1174,35 +1174,35 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
pc->copy_buffer_to_gf = 0;
|
||||
|
||||
if (!pc->refresh_golden_frame)
|
||||
pc->copy_buffer_to_gf = vp8_read_literal(&header_bc, 2);
|
||||
pc->copy_buffer_to_gf = vp9_read_literal(&header_bc, 2);
|
||||
|
||||
pc->copy_buffer_to_arf = 0;
|
||||
|
||||
if (!pc->refresh_alt_ref_frame)
|
||||
pc->copy_buffer_to_arf = vp8_read_literal(&header_bc, 2);
|
||||
pc->copy_buffer_to_arf = vp9_read_literal(&header_bc, 2);
|
||||
|
||||
pc->ref_frame_sign_bias[GOLDEN_FRAME] = vp8_read_bit(&header_bc);
|
||||
pc->ref_frame_sign_bias[ALTREF_FRAME] = vp8_read_bit(&header_bc);
|
||||
pc->ref_frame_sign_bias[GOLDEN_FRAME] = vp9_read_bit(&header_bc);
|
||||
pc->ref_frame_sign_bias[ALTREF_FRAME] = vp9_read_bit(&header_bc);
|
||||
|
||||
/* Is high precision mv allowed */
|
||||
xd->allow_high_precision_mv = (unsigned char)vp8_read_bit(&header_bc);
|
||||
xd->allow_high_precision_mv = (unsigned char)vp9_read_bit(&header_bc);
|
||||
// Read the type of subpel filter to use
|
||||
if (vp8_read_bit(&header_bc)) {
|
||||
if (vp9_read_bit(&header_bc)) {
|
||||
pc->mcomp_filter_type = SWITCHABLE;
|
||||
} else {
|
||||
pc->mcomp_filter_type = vp8_read_literal(&header_bc, 2);
|
||||
pc->mcomp_filter_type = vp9_read_literal(&header_bc, 2);
|
||||
}
|
||||
/* To enable choice of different interploation filters */
|
||||
vp9_setup_interp_filters(xd, pc->mcomp_filter_type, pc);
|
||||
}
|
||||
|
||||
pc->refresh_entropy_probs = vp8_read_bit(&header_bc);
|
||||
pc->refresh_entropy_probs = vp9_read_bit(&header_bc);
|
||||
if (pc->refresh_entropy_probs == 0) {
|
||||
vpx_memcpy(&pc->lfc, &pc->fc, sizeof(pc->fc));
|
||||
}
|
||||
|
||||
pc->refresh_last_frame = (pc->frame_type == KEY_FRAME)
|
||||
|| vp8_read_bit(&header_bc);
|
||||
|| vp9_read_bit(&header_bc);
|
||||
|
||||
if (0) {
|
||||
FILE *z = fopen("decodestats.stt", "a");
|
||||
@ -1216,40 +1216,40 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
fclose(z);
|
||||
}
|
||||
|
||||
vp8_copy(pbi->common.fc.pre_coef_probs,
|
||||
vp9_copy(pbi->common.fc.pre_coef_probs,
|
||||
pbi->common.fc.coef_probs);
|
||||
vp8_copy(pbi->common.fc.pre_hybrid_coef_probs,
|
||||
vp9_copy(pbi->common.fc.pre_hybrid_coef_probs,
|
||||
pbi->common.fc.hybrid_coef_probs);
|
||||
vp8_copy(pbi->common.fc.pre_coef_probs_8x8,
|
||||
vp9_copy(pbi->common.fc.pre_coef_probs_8x8,
|
||||
pbi->common.fc.coef_probs_8x8);
|
||||
vp8_copy(pbi->common.fc.pre_hybrid_coef_probs_8x8,
|
||||
vp9_copy(pbi->common.fc.pre_hybrid_coef_probs_8x8,
|
||||
pbi->common.fc.hybrid_coef_probs_8x8);
|
||||
vp8_copy(pbi->common.fc.pre_coef_probs_16x16,
|
||||
vp9_copy(pbi->common.fc.pre_coef_probs_16x16,
|
||||
pbi->common.fc.coef_probs_16x16);
|
||||
vp8_copy(pbi->common.fc.pre_hybrid_coef_probs_16x16,
|
||||
vp9_copy(pbi->common.fc.pre_hybrid_coef_probs_16x16,
|
||||
pbi->common.fc.hybrid_coef_probs_16x16);
|
||||
vp8_copy(pbi->common.fc.pre_ymode_prob, pbi->common.fc.ymode_prob);
|
||||
vp8_copy(pbi->common.fc.pre_uv_mode_prob, pbi->common.fc.uv_mode_prob);
|
||||
vp8_copy(pbi->common.fc.pre_bmode_prob, pbi->common.fc.bmode_prob);
|
||||
vp8_copy(pbi->common.fc.pre_i8x8_mode_prob, pbi->common.fc.i8x8_mode_prob);
|
||||
vp8_copy(pbi->common.fc.pre_sub_mv_ref_prob, pbi->common.fc.sub_mv_ref_prob);
|
||||
vp8_copy(pbi->common.fc.pre_mbsplit_prob, pbi->common.fc.mbsplit_prob);
|
||||
vp9_copy(pbi->common.fc.pre_ymode_prob, pbi->common.fc.ymode_prob);
|
||||
vp9_copy(pbi->common.fc.pre_uv_mode_prob, pbi->common.fc.uv_mode_prob);
|
||||
vp9_copy(pbi->common.fc.pre_bmode_prob, pbi->common.fc.bmode_prob);
|
||||
vp9_copy(pbi->common.fc.pre_i8x8_mode_prob, pbi->common.fc.i8x8_mode_prob);
|
||||
vp9_copy(pbi->common.fc.pre_sub_mv_ref_prob, pbi->common.fc.sub_mv_ref_prob);
|
||||
vp9_copy(pbi->common.fc.pre_mbsplit_prob, pbi->common.fc.mbsplit_prob);
|
||||
pbi->common.fc.pre_nmvc = pbi->common.fc.nmvc;
|
||||
vp8_zero(pbi->common.fc.coef_counts);
|
||||
vp8_zero(pbi->common.fc.hybrid_coef_counts);
|
||||
vp8_zero(pbi->common.fc.coef_counts_8x8);
|
||||
vp8_zero(pbi->common.fc.hybrid_coef_counts_8x8);
|
||||
vp8_zero(pbi->common.fc.coef_counts_16x16);
|
||||
vp8_zero(pbi->common.fc.hybrid_coef_counts_16x16);
|
||||
vp8_zero(pbi->common.fc.ymode_counts);
|
||||
vp8_zero(pbi->common.fc.uv_mode_counts);
|
||||
vp8_zero(pbi->common.fc.bmode_counts);
|
||||
vp8_zero(pbi->common.fc.i8x8_mode_counts);
|
||||
vp8_zero(pbi->common.fc.sub_mv_ref_counts);
|
||||
vp8_zero(pbi->common.fc.mbsplit_counts);
|
||||
vp8_zero(pbi->common.fc.NMVcount);
|
||||
vp8_zero(pbi->common.fc.mv_ref_ct);
|
||||
vp8_zero(pbi->common.fc.mv_ref_ct_a);
|
||||
vp9_zero(pbi->common.fc.coef_counts);
|
||||
vp9_zero(pbi->common.fc.hybrid_coef_counts);
|
||||
vp9_zero(pbi->common.fc.coef_counts_8x8);
|
||||
vp9_zero(pbi->common.fc.hybrid_coef_counts_8x8);
|
||||
vp9_zero(pbi->common.fc.coef_counts_16x16);
|
||||
vp9_zero(pbi->common.fc.hybrid_coef_counts_16x16);
|
||||
vp9_zero(pbi->common.fc.ymode_counts);
|
||||
vp9_zero(pbi->common.fc.uv_mode_counts);
|
||||
vp9_zero(pbi->common.fc.bmode_counts);
|
||||
vp9_zero(pbi->common.fc.i8x8_mode_counts);
|
||||
vp9_zero(pbi->common.fc.sub_mv_ref_counts);
|
||||
vp9_zero(pbi->common.fc.mbsplit_counts);
|
||||
vp9_zero(pbi->common.fc.NMVcount);
|
||||
vp9_zero(pbi->common.fc.mv_ref_ct);
|
||||
vp9_zero(pbi->common.fc.mv_ref_ct_a);
|
||||
|
||||
read_coef_probs(pbi, &header_bc);
|
||||
|
||||
@ -1272,7 +1272,7 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
vpx_memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
|
||||
/* Read the mb_no_coeff_skip flag */
|
||||
pc->mb_no_coeff_skip = (int)vp8_read_bit(&header_bc);
|
||||
pc->mb_no_coeff_skip = (int)vp9_read_bit(&header_bc);
|
||||
|
||||
vp9_decode_mode_mvs_init(pbi, &header_bc);
|
||||
|
||||
@ -1290,7 +1290,7 @@ int vp9_decode_frame(VP9D_COMP *pbi) {
|
||||
|
||||
/* Collect information about decoder corruption. */
|
||||
/* 1. Check first boolean decoder for errors. */
|
||||
pc->yv12_fb[pc->new_fb_idx].corrupted = vp8dx_bool_error(&header_bc);
|
||||
pc->yv12_fb[pc->new_fb_idx].corrupted = bool_error(&header_bc);
|
||||
/* 2. Check the macroblock information */
|
||||
pc->yv12_fb[pc->new_fb_idx].corrupted |= corrupt_tokens;
|
||||
|
||||
|
@ -157,7 +157,7 @@ void static count_tokens_adaptive_scan(const MACROBLOCKD *xd, INT16 *qcoeff_ptr,
|
||||
break;
|
||||
}
|
||||
|
||||
VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
for (c = !type; c < eob; ++c) {
|
||||
int rc = scan[c];
|
||||
int v = qcoeff_ptr[rc];
|
||||
@ -183,7 +183,7 @@ void static count_tokens(INT16 *qcoeff_ptr, int block, PLANE_TYPE type,
|
||||
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l,
|
||||
int eob, int seg_eob, FRAME_CONTEXT *const fc) {
|
||||
int c, pt, token, band;
|
||||
VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
for (c = !type; c < eob; ++c) {
|
||||
int rc = vp9_default_zig_zag1d[c];
|
||||
int v = qcoeff_ptr[rc];
|
||||
@ -203,7 +203,7 @@ void static count_tokens_8x8(INT16 *qcoeff_ptr, int block, PLANE_TYPE type,
|
||||
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l,
|
||||
int eob, int seg_eob, FRAME_CONTEXT *fc) {
|
||||
int c, pt, token, band;
|
||||
VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
for (c = !type; c < eob; ++c) {
|
||||
int rc = (type == 1 ? vp9_default_zig_zag1d[c] : vp9_default_zig_zag1d_8x8[c]);
|
||||
int v = qcoeff_ptr[rc];
|
||||
@ -229,7 +229,7 @@ void static count_tokens_16x16(INT16 *qcoeff_ptr, int block, PLANE_TYPE type,
|
||||
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l,
|
||||
int eob, int seg_eob, FRAME_CONTEXT *fc) {
|
||||
int c, pt, token;
|
||||
VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l);
|
||||
for (c = !type; c < eob; ++c) {
|
||||
int rc = vp9_default_zig_zag1d_16x16[c];
|
||||
int v = qcoeff_ptr[rc];
|
||||
@ -250,9 +250,9 @@ void static count_tokens_16x16(INT16 *qcoeff_ptr, int block, PLANE_TYPE type,
|
||||
}
|
||||
}
|
||||
|
||||
static int vp8_get_signed(BOOL_DECODER *br, int value_to_sign) {
|
||||
static int get_signed(BOOL_DECODER *br, int value_to_sign) {
|
||||
const int split = (br->range + 1) >> 1;
|
||||
const VP8_BD_VALUE bigsplit = (VP8_BD_VALUE)split << (VP8_BD_VALUE_SIZE - 8);
|
||||
const VP9_BD_VALUE bigsplit = (VP9_BD_VALUE)split << (VP9_BD_VALUE_SIZE - 8);
|
||||
int v;
|
||||
|
||||
if (br->count < 0)
|
||||
@ -276,14 +276,14 @@ static int vp8_get_signed(BOOL_DECODER *br, int value_to_sign) {
|
||||
#define WRITE_COEF_CONTINUE(val) \
|
||||
{ \
|
||||
prob = coef_probs + (ENTROPY_NODES*PREV_CONTEXT_INC(val));\
|
||||
qcoeff_ptr[scan[c]] = (INT16) vp8_get_signed(br, val); \
|
||||
qcoeff_ptr[scan[c]] = (INT16) get_signed(br, val); \
|
||||
c++; \
|
||||
continue; \
|
||||
}
|
||||
|
||||
#define ADJUST_COEF(prob, bits_count) \
|
||||
do { \
|
||||
if (vp8_read(br, prob)) \
|
||||
if (vp9_read(br, prob)) \
|
||||
val += (UINT16)(1 << bits_count);\
|
||||
} while (0);
|
||||
|
||||
@ -297,7 +297,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
|
||||
const int *coef_bands) {
|
||||
FRAME_CONTEXT *const fc = &dx->common.fc;
|
||||
int tmp, c = (type == PLANE_TYPE_Y_NO_DC);
|
||||
const vp8_prob *prob, *coef_probs;
|
||||
const vp9_prob *prob, *coef_probs;
|
||||
|
||||
switch (block_type) {
|
||||
default:
|
||||
@ -318,7 +318,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
|
||||
break;
|
||||
}
|
||||
|
||||
VP8_COMBINEENTROPYCONTEXTS(tmp, *a, *l);
|
||||
VP9_COMBINEENTROPYCONTEXTS(tmp, *a, *l);
|
||||
prob = coef_probs + tmp * ENTROPY_NODES;
|
||||
|
||||
while (1) {
|
||||
@ -326,35 +326,35 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
|
||||
const uint8_t *cat6 = cat6_prob;
|
||||
if (c == seg_eob) break;
|
||||
prob += coef_bands[c];
|
||||
if (!vp8_read(br, prob[EOB_CONTEXT_NODE]))
|
||||
if (!vp9_read(br, prob[EOB_CONTEXT_NODE]))
|
||||
break;
|
||||
SKIP_START:
|
||||
if (c == seg_eob) break;
|
||||
if (!vp8_read(br, prob[ZERO_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[ZERO_CONTEXT_NODE])) {
|
||||
++c;
|
||||
prob = coef_probs + coef_bands[c];
|
||||
goto SKIP_START;
|
||||
}
|
||||
// ONE_CONTEXT_NODE_0_
|
||||
if (!vp8_read(br, prob[ONE_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[ONE_CONTEXT_NODE])) {
|
||||
prob = coef_probs + ENTROPY_NODES;
|
||||
qcoeff_ptr[scan[c]] = (INT16) vp8_get_signed(br, 1);
|
||||
qcoeff_ptr[scan[c]] = (INT16) get_signed(br, 1);
|
||||
++c;
|
||||
continue;
|
||||
}
|
||||
// LOW_VAL_CONTEXT_NODE_0_
|
||||
if (!vp8_read(br, prob[LOW_VAL_CONTEXT_NODE])) {
|
||||
if (!vp8_read(br, prob[TWO_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[LOW_VAL_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[TWO_CONTEXT_NODE])) {
|
||||
WRITE_COEF_CONTINUE(2);
|
||||
}
|
||||
if (!vp8_read(br, prob[THREE_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[THREE_CONTEXT_NODE])) {
|
||||
WRITE_COEF_CONTINUE(3);
|
||||
}
|
||||
WRITE_COEF_CONTINUE(4);
|
||||
}
|
||||
// HIGH_LOW_CONTEXT_NODE_0_
|
||||
if (!vp8_read(br, prob[HIGH_LOW_CONTEXT_NODE])) {
|
||||
if (!vp8_read(br, prob[CAT_ONE_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[HIGH_LOW_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[CAT_ONE_CONTEXT_NODE])) {
|
||||
val = CAT1_MIN_VAL;
|
||||
ADJUST_COEF(CAT1_PROB0, 0);
|
||||
WRITE_COEF_CONTINUE(val);
|
||||
@ -365,8 +365,8 @@ SKIP_START:
|
||||
WRITE_COEF_CONTINUE(val);
|
||||
}
|
||||
// CAT_THREEFOUR_CONTEXT_NODE_0_
|
||||
if (!vp8_read(br, prob[CAT_THREEFOUR_CONTEXT_NODE])) {
|
||||
if (!vp8_read(br, prob[CAT_THREE_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[CAT_THREEFOUR_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[CAT_THREE_CONTEXT_NODE])) {
|
||||
val = CAT3_MIN_VAL;
|
||||
ADJUST_COEF(CAT3_PROB2, 2);
|
||||
ADJUST_COEF(CAT3_PROB1, 1);
|
||||
@ -381,7 +381,7 @@ SKIP_START:
|
||||
WRITE_COEF_CONTINUE(val);
|
||||
}
|
||||
// CAT_FIVE_CONTEXT_NODE_0_:
|
||||
if (!vp8_read(br, prob[CAT_FIVE_CONTEXT_NODE])) {
|
||||
if (!vp9_read(br, prob[CAT_FIVE_CONTEXT_NODE])) {
|
||||
val = CAT5_MIN_VAL;
|
||||
ADJUST_COEF(CAT5_PROB4, 4);
|
||||
ADJUST_COEF(CAT5_PROB3, 3);
|
||||
@ -392,7 +392,7 @@ SKIP_START:
|
||||
}
|
||||
val = 0;
|
||||
while (*cat6) {
|
||||
val = (val << 1) | vp8_read(br, *cat6++);
|
||||
val = (val << 1) | vp9_read(br, *cat6++);
|
||||
}
|
||||
val += CAT6_MIN_VAL;
|
||||
WRITE_COEF_CONTINUE(val);
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011 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 VP8_DEC_EC_TYPES_H
|
||||
#define VP8_DEC_EC_TYPES_H
|
||||
|
||||
#define MAX_OVERLAPS 16
|
||||
|
||||
|
||||
|
||||
/* The area (pixel area in Q6) the block pointed to by bmi overlaps
|
||||
* another block with.
|
||||
*/
|
||||
typedef struct {
|
||||
int overlap;
|
||||
union b_mode_info *bmi;
|
||||
} OVERLAP_NODE;
|
||||
|
||||
/* Structure to keep track of overlapping blocks on a block level. */
|
||||
typedef struct {
|
||||
/* TODO(holmer): This array should be exchanged for a linked list */
|
||||
OVERLAP_NODE overlaps[MAX_OVERLAPS];
|
||||
} B_OVERLAP;
|
||||
|
||||
/* Structure used to hold all the overlaps of a macroblock. The overlaps of a
|
||||
* macroblock is further divided into block overlaps.
|
||||
*/
|
||||
typedef struct {
|
||||
B_OVERLAP overlaps[16];
|
||||
} MB_OVERLAP;
|
||||
|
||||
/* Structure for keeping track of motion vectors and which reference frame they
|
||||
* refer to. Used for motion vector interpolation.
|
||||
*/
|
||||
typedef struct {
|
||||
MV mv;
|
||||
MV_REFERENCE_FRAME ref_frame;
|
||||
} EC_BLOCK;
|
||||
|
||||
#endif /* VP8_DEC_EC_TYPES_H */
|
@ -33,13 +33,12 @@
|
||||
#include "vpx_ports/arm.h"
|
||||
#endif
|
||||
|
||||
extern void vp8_init_loop_filter(VP9_COMMON *cm);
|
||||
extern void vp9_init_de_quantizer(VP9D_COMP *pbi);
|
||||
static int get_free_fb(VP9_COMMON *cm);
|
||||
static void ref_cnt_fb(int *buf, int *idx, int new_idx);
|
||||
|
||||
#if CONFIG_DEBUG
|
||||
void vp8_recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
|
||||
static void recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
|
||||
FILE *yuv_file = fopen((char *)name, "ab");
|
||||
unsigned char *src = s->y_buffer;
|
||||
int h = s->y_height;
|
||||
@ -115,7 +114,7 @@ void vp9_initialize_dec(void) {
|
||||
}
|
||||
}
|
||||
|
||||
VP8D_PTR vp9_create_decompressor(VP8D_CONFIG *oxcf) {
|
||||
VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf) {
|
||||
VP9D_COMP *pbi = vpx_memalign(32, sizeof(VP9D_COMP));
|
||||
|
||||
if (!pbi)
|
||||
@ -149,10 +148,10 @@ VP8D_PTR vp9_create_decompressor(VP8D_CONFIG *oxcf) {
|
||||
|
||||
pbi->decoded_key_frame = 0;
|
||||
|
||||
return (VP8D_PTR) pbi;
|
||||
return (VP9D_PTR) pbi;
|
||||
}
|
||||
|
||||
void vp9_remove_decompressor(VP8D_PTR ptr) {
|
||||
void vp9_remove_decompressor(VP9D_PTR ptr) {
|
||||
VP9D_COMP *pbi = (VP9D_COMP *) ptr;
|
||||
|
||||
if (!pbi)
|
||||
@ -168,17 +167,17 @@ void vp9_remove_decompressor(VP8D_PTR ptr) {
|
||||
}
|
||||
|
||||
|
||||
vpx_codec_err_t vp9_get_reference_dec(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag,
|
||||
vpx_codec_err_t vp9_get_reference_dec(VP9D_PTR ptr, VP9_REFFRAME ref_frame_flag,
|
||||
YV12_BUFFER_CONFIG *sd) {
|
||||
VP9D_COMP *pbi = (VP9D_COMP *) ptr;
|
||||
VP9_COMMON *cm = &pbi->common;
|
||||
int ref_fb_idx;
|
||||
|
||||
if (ref_frame_flag == VP8_LAST_FLAG)
|
||||
if (ref_frame_flag == VP9_LAST_FLAG)
|
||||
ref_fb_idx = cm->lst_fb_idx;
|
||||
else if (ref_frame_flag == VP8_GOLD_FLAG)
|
||||
else if (ref_frame_flag == VP9_GOLD_FLAG)
|
||||
ref_fb_idx = cm->gld_fb_idx;
|
||||
else if (ref_frame_flag == VP8_ALT_FLAG)
|
||||
else if (ref_frame_flag == VP9_ALT_FLAG)
|
||||
ref_fb_idx = cm->alt_fb_idx;
|
||||
else {
|
||||
vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR,
|
||||
@ -199,18 +198,18 @@ vpx_codec_err_t vp9_get_reference_dec(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag,
|
||||
}
|
||||
|
||||
|
||||
vpx_codec_err_t vp9_set_reference_dec(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag,
|
||||
vpx_codec_err_t vp9_set_reference_dec(VP9D_PTR ptr, VP9_REFFRAME ref_frame_flag,
|
||||
YV12_BUFFER_CONFIG *sd) {
|
||||
VP9D_COMP *pbi = (VP9D_COMP *) ptr;
|
||||
VP9_COMMON *cm = &pbi->common;
|
||||
int *ref_fb_ptr = NULL;
|
||||
int free_fb;
|
||||
|
||||
if (ref_frame_flag == VP8_LAST_FLAG)
|
||||
if (ref_frame_flag == VP9_LAST_FLAG)
|
||||
ref_fb_ptr = &cm->lst_fb_idx;
|
||||
else if (ref_frame_flag == VP8_GOLD_FLAG)
|
||||
else if (ref_frame_flag == VP9_GOLD_FLAG)
|
||||
ref_fb_ptr = &cm->gld_fb_idx;
|
||||
else if (ref_frame_flag == VP8_ALT_FLAG)
|
||||
else if (ref_frame_flag == VP9_ALT_FLAG)
|
||||
ref_fb_ptr = &cm->alt_fb_idx;
|
||||
else {
|
||||
vpx_internal_error(&pbi->common.error, VPX_CODEC_ERROR,
|
||||
@ -241,8 +240,8 @@ vpx_codec_err_t vp9_set_reference_dec(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag,
|
||||
|
||||
/*For ARM NEON, d8-d15 are callee-saved registers, and need to be saved by us.*/
|
||||
#if HAVE_ARMV7
|
||||
extern void vp8_push_neon(int64_t *store);
|
||||
extern void vp8_pop_neon(int64_t *store);
|
||||
extern void vp9_push_neon(int64_t *store);
|
||||
extern void vp9_pop_neon(int64_t *store);
|
||||
#endif
|
||||
|
||||
static int get_free_fb(VP9_COMMON *cm) {
|
||||
@ -318,23 +317,7 @@ static int swap_frame_buffers(VP9_COMMON *cm) {
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
static void vp8_print_yuv_rec_mb(VP9_COMMON *cm, int mb_row, int mb_col)
|
||||
{
|
||||
YV12_BUFFER_CONFIG *s = cm->frame_to_show;
|
||||
unsigned char *src = s->y_buffer;
|
||||
int i, j;
|
||||
|
||||
printf("After loop filter\n");
|
||||
for (i=0;i<16;i++) {
|
||||
for (j=0;j<16;j++)
|
||||
printf("%3d ", src[(mb_row*16+i)*s->y_stride + mb_col*16+j]);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
int vp9_receive_compressed_data(VP9D_PTR ptr, unsigned long size,
|
||||
const unsigned char *source,
|
||||
int64_t time_stamp) {
|
||||
#if HAVE_ARMV7
|
||||
@ -370,7 +353,7 @@ int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
if (cm->rtcd.flags & HAS_NEON)
|
||||
#endif
|
||||
{
|
||||
vp8_push_neon(dx_store_reg);
|
||||
vp9_push_neon(dx_store_reg);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -382,7 +365,7 @@ int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
if (cm->rtcd.flags & HAS_NEON)
|
||||
#endif
|
||||
{
|
||||
vp8_pop_neon(dx_store_reg);
|
||||
vp9_pop_neon(dx_store_reg);
|
||||
}
|
||||
#endif
|
||||
pbi->common.error.setjmp = 0;
|
||||
@ -408,7 +391,7 @@ int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
if (cm->rtcd.flags & HAS_NEON)
|
||||
#endif
|
||||
{
|
||||
vp8_pop_neon(dx_store_reg);
|
||||
vp9_pop_neon(dx_store_reg);
|
||||
}
|
||||
#endif
|
||||
pbi->common.error.error_code = VPX_CODEC_ERROR;
|
||||
@ -425,7 +408,7 @@ int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
if (cm->rtcd.flags & HAS_NEON)
|
||||
#endif
|
||||
{
|
||||
vp8_pop_neon(dx_store_reg);
|
||||
vp9_pop_neon(dx_store_reg);
|
||||
}
|
||||
#endif
|
||||
pbi->common.error.error_code = VPX_CODEC_ERROR;
|
||||
@ -451,10 +434,10 @@ int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
|
||||
#if CONFIG_DEBUG
|
||||
if (cm->show_frame)
|
||||
vp8_recon_write_yuv_frame("recon.yuv", cm->frame_to_show);
|
||||
recon_write_yuv_frame("recon.yuv", cm->frame_to_show);
|
||||
#endif
|
||||
|
||||
vp8_clear_system_state();
|
||||
vp9_clear_system_state();
|
||||
|
||||
if (cm->show_frame) {
|
||||
vpx_memcpy(cm->prev_mip, cm->mip,
|
||||
@ -479,16 +462,16 @@ int vp9_receive_compressed_data(VP8D_PTR ptr, unsigned long size,
|
||||
if (cm->rtcd.flags & HAS_NEON)
|
||||
#endif
|
||||
{
|
||||
vp8_pop_neon(dx_store_reg);
|
||||
vp9_pop_neon(dx_store_reg);
|
||||
}
|
||||
#endif
|
||||
pbi->common.error.setjmp = 0;
|
||||
return retcode;
|
||||
}
|
||||
|
||||
int vp9_get_raw_frame(VP8D_PTR ptr, YV12_BUFFER_CONFIG *sd,
|
||||
int vp9_get_raw_frame(VP9D_PTR ptr, YV12_BUFFER_CONFIG *sd,
|
||||
int64_t *time_stamp, int64_t *time_end_stamp,
|
||||
vp8_ppflags_t *flags) {
|
||||
vp9_ppflags_t *flags) {
|
||||
int ret = -1;
|
||||
VP9D_COMP *pbi = (VP9D_COMP *) ptr;
|
||||
|
||||
@ -519,6 +502,6 @@ int vp9_get_raw_frame(VP8D_PTR ptr, YV12_BUFFER_CONFIG *sd,
|
||||
}
|
||||
|
||||
#endif /*!CONFIG_POSTPROC*/
|
||||
vp8_clear_system_state();
|
||||
vp9_clear_system_state();
|
||||
return ret;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8D_INT_H
|
||||
#define __INC_VP8D_INT_H
|
||||
#ifndef __INC_ONYXD_INT_H
|
||||
#define __INC_ONYXD_INT_H
|
||||
#include "vpx_ports/config.h"
|
||||
#include "vp8/common/onyxd.h"
|
||||
#include "treereader.h"
|
||||
@ -36,7 +36,7 @@ typedef struct {
|
||||
int const *scan;
|
||||
int const *scan_8x8;
|
||||
UINT8 const *ptr_block2leftabove;
|
||||
vp8_tree_index const *vp9_coef_tree_ptr;
|
||||
vp9_tree_index const *vp9_coef_tree_ptr;
|
||||
unsigned char *norm_ptr;
|
||||
UINT8 *ptr_coef_bands_x;
|
||||
UINT8 *ptr_coef_bands_x_8x8;
|
||||
@ -46,9 +46,9 @@ typedef struct {
|
||||
|
||||
INT16 *qcoeff_start_ptr;
|
||||
|
||||
vp8_prob const *coef_probs[BLOCK_TYPES];
|
||||
vp8_prob const *coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp8_prob const *coef_probs_16X16[BLOCK_TYPES_16X16];
|
||||
vp9_prob const *coef_probs[BLOCK_TYPES];
|
||||
vp9_prob const *coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_prob const *coef_probs_16X16[BLOCK_TYPES_16X16];
|
||||
|
||||
UINT8 eob[25];
|
||||
|
||||
@ -59,13 +59,13 @@ typedef struct VP9Decompressor {
|
||||
|
||||
DECLARE_ALIGNED(16, VP9_COMMON, common);
|
||||
|
||||
VP8D_CONFIG oxcf;
|
||||
VP9D_CONFIG oxcf;
|
||||
|
||||
|
||||
const unsigned char *Source;
|
||||
unsigned int source_sz;
|
||||
|
||||
vp8_reader *mbc;
|
||||
vp9_reader *mbc;
|
||||
int64_t last_time_stamp;
|
||||
int ready_for_new_data;
|
||||
|
||||
@ -77,7 +77,7 @@ typedef struct VP9Decompressor {
|
||||
vp9_dequant_idct_add_y_block_fn_t idct_add_y_block;
|
||||
vp9_dequant_idct_add_uv_block_fn_t idct_add_uv_block;
|
||||
|
||||
vp8_prob prob_skip_false;
|
||||
vp9_prob prob_skip_false;
|
||||
|
||||
int decoded_key_frame;
|
||||
|
||||
@ -103,4 +103,4 @@ int vp9_decode_frame(VP9D_COMP *cpi);
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // __INC_ONYXD_INT_H
|
||||
|
@ -1,843 +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 "vp8/common/reconintra.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "onyxd_int.h"
|
||||
|
||||
/* For skip_recon_mb(), add vp9_build_intra_predictors_mby_s(MACROBLOCKD *xd)
|
||||
* and vp9_build_intra_predictors_mbuv_s(MACROBLOCKD *xd).
|
||||
*/
|
||||
|
||||
void vp8mt_build_intra_predictors_mby(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
int mb_row, int mb_col) {
|
||||
unsigned char *yabove_row; /* = xd->dst.y_buffer - xd->dst.y_stride; */
|
||||
unsigned char *yleft_col;
|
||||
unsigned char yleft_buf[16];
|
||||
unsigned char ytop_left; /* = yabove_row[-1]; */
|
||||
unsigned char *ypred_ptr = xd->predictor;
|
||||
int r, c, i;
|
||||
|
||||
if (pbi->common.filter_level) {
|
||||
yabove_row = pbi->mt_yabove_row[mb_row] + mb_col * 16 + 32;
|
||||
yleft_col = pbi->mt_yleft_col[mb_row];
|
||||
} else {
|
||||
yabove_row = xd->dst.y_buffer - xd->dst.y_stride;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
yleft_buf[i] = xd->dst.y_buffer [i * xd->dst.y_stride - 1];
|
||||
yleft_col = yleft_buf;
|
||||
}
|
||||
|
||||
ytop_left = yabove_row[-1];
|
||||
|
||||
/* for Y */
|
||||
switch (xd->mode_info_context->mbmi.mode) {
|
||||
case DC_PRED: {
|
||||
int expected_dc;
|
||||
int i;
|
||||
int shift;
|
||||
int average = 0;
|
||||
|
||||
|
||||
if (xd->up_available || xd->left_available) {
|
||||
if (xd->up_available) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
average += yabove_row[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (xd->left_available) {
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
average += yleft_col[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
shift = 3 + xd->up_available + xd->left_available;
|
||||
expected_dc = (average + (1 << (shift - 1))) >> shift;
|
||||
} else {
|
||||
expected_dc = 128;
|
||||
}
|
||||
|
||||
vpx_memset(ypred_ptr, expected_dc, 256);
|
||||
}
|
||||
break;
|
||||
case V_PRED: {
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
|
||||
((int *)ypred_ptr)[0] = ((int *)yabove_row)[0];
|
||||
((int *)ypred_ptr)[1] = ((int *)yabove_row)[1];
|
||||
((int *)ypred_ptr)[2] = ((int *)yabove_row)[2];
|
||||
((int *)ypred_ptr)[3] = ((int *)yabove_row)[3];
|
||||
ypred_ptr += 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case H_PRED: {
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
|
||||
vpx_memset(ypred_ptr, yleft_col[r], 16);
|
||||
ypred_ptr += 16;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case TM_PRED: {
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
for (c = 0; c < 16; c++) {
|
||||
int pred = yleft_col[r] + yabove_row[ c] - ytop_left;
|
||||
|
||||
if (pred < 0)
|
||||
pred = 0;
|
||||
|
||||
if (pred > 255)
|
||||
pred = 255;
|
||||
|
||||
ypred_ptr[c] = pred;
|
||||
}
|
||||
|
||||
ypred_ptr += 16;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case B_PRED:
|
||||
case NEARESTMV:
|
||||
case NEARMV:
|
||||
case ZEROMV:
|
||||
case NEWMV:
|
||||
case SPLITMV:
|
||||
case MB_MODE_COUNT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void vp8mt_build_intra_predictors_mby_s(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
int mb_row, int mb_col) {
|
||||
unsigned char *yabove_row; /* = xd->dst.y_buffer - xd->dst.y_stride; */
|
||||
unsigned char *yleft_col;
|
||||
unsigned char yleft_buf[16];
|
||||
unsigned char ytop_left; /* = yabove_row[-1]; */
|
||||
unsigned char *ypred_ptr = xd->predictor;
|
||||
int r, c, i;
|
||||
|
||||
int y_stride = xd->dst.y_stride;
|
||||
ypred_ptr = xd->dst.y_buffer; /*xd->predictor;*/
|
||||
|
||||
if (pbi->common.filter_level) {
|
||||
yabove_row = pbi->mt_yabove_row[mb_row] + mb_col * 16 + 32;
|
||||
yleft_col = pbi->mt_yleft_col[mb_row];
|
||||
} else {
|
||||
yabove_row = xd->dst.y_buffer - xd->dst.y_stride;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
yleft_buf[i] = xd->dst.y_buffer [i * xd->dst.y_stride - 1];
|
||||
yleft_col = yleft_buf;
|
||||
}
|
||||
|
||||
ytop_left = yabove_row[-1];
|
||||
|
||||
/* for Y */
|
||||
switch (xd->mode_info_context->mbmi.mode) {
|
||||
case DC_PRED: {
|
||||
int expected_dc;
|
||||
int i;
|
||||
int shift;
|
||||
int average = 0;
|
||||
|
||||
|
||||
if (xd->up_available || xd->left_available) {
|
||||
if (xd->up_available) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
average += yabove_row[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (xd->left_available) {
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
average += yleft_col[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
shift = 3 + xd->up_available + xd->left_available;
|
||||
expected_dc = (average + (1 << (shift - 1))) >> shift;
|
||||
} else {
|
||||
expected_dc = 128;
|
||||
}
|
||||
|
||||
/*vpx_memset(ypred_ptr, expected_dc, 256);*/
|
||||
for (r = 0; r < 16; r++) {
|
||||
vpx_memset(ypred_ptr, expected_dc, 16);
|
||||
ypred_ptr += y_stride; /*16;*/
|
||||
}
|
||||
}
|
||||
break;
|
||||
case V_PRED: {
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
|
||||
((int *)ypred_ptr)[0] = ((int *)yabove_row)[0];
|
||||
((int *)ypred_ptr)[1] = ((int *)yabove_row)[1];
|
||||
((int *)ypred_ptr)[2] = ((int *)yabove_row)[2];
|
||||
((int *)ypred_ptr)[3] = ((int *)yabove_row)[3];
|
||||
ypred_ptr += y_stride; /*16;*/
|
||||
}
|
||||
}
|
||||
break;
|
||||
case H_PRED: {
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
|
||||
vpx_memset(ypred_ptr, yleft_col[r], 16);
|
||||
ypred_ptr += y_stride; /*16;*/
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case TM_PRED: {
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
for (c = 0; c < 16; c++) {
|
||||
int pred = yleft_col[r] + yabove_row[ c] - ytop_left;
|
||||
|
||||
if (pred < 0)
|
||||
pred = 0;
|
||||
|
||||
if (pred > 255)
|
||||
pred = 255;
|
||||
|
||||
ypred_ptr[c] = pred;
|
||||
}
|
||||
|
||||
ypred_ptr += y_stride; /*16;*/
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case B_PRED:
|
||||
case NEARESTMV:
|
||||
case NEARMV:
|
||||
case ZEROMV:
|
||||
case NEWMV:
|
||||
case SPLITMV:
|
||||
case MB_MODE_COUNT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void vp8mt_build_intra_predictors_mbuv(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
int mb_row, int mb_col) {
|
||||
unsigned char *uabove_row; /* = xd->dst.u_buffer - xd->dst.uv_stride; */
|
||||
unsigned char *uleft_col; /*[16];*/
|
||||
unsigned char uleft_buf[8];
|
||||
unsigned char utop_left; /* = uabove_row[-1]; */
|
||||
unsigned char *vabove_row; /* = xd->dst.v_buffer - xd->dst.uv_stride; */
|
||||
unsigned char *vleft_col; /*[20];*/
|
||||
unsigned char vleft_buf[8];
|
||||
unsigned char vtop_left; /* = vabove_row[-1]; */
|
||||
unsigned char *upred_ptr = &xd->predictor[256];
|
||||
unsigned char *vpred_ptr = &xd->predictor[320];
|
||||
int i, j;
|
||||
|
||||
if (pbi->common.filter_level) {
|
||||
uabove_row = pbi->mt_uabove_row[mb_row] + mb_col * 8 + 16;
|
||||
vabove_row = pbi->mt_vabove_row[mb_row] + mb_col * 8 + 16;
|
||||
uleft_col = pbi->mt_uleft_col[mb_row];
|
||||
vleft_col = pbi->mt_vleft_col[mb_row];
|
||||
} else {
|
||||
uabove_row = xd->dst.u_buffer - xd->dst.uv_stride;
|
||||
vabove_row = xd->dst.v_buffer - xd->dst.uv_stride;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
uleft_buf[i] = xd->dst.u_buffer [i * xd->dst.uv_stride - 1];
|
||||
vleft_buf[i] = xd->dst.v_buffer [i * xd->dst.uv_stride - 1];
|
||||
}
|
||||
uleft_col = uleft_buf;
|
||||
vleft_col = vleft_buf;
|
||||
}
|
||||
utop_left = uabove_row[-1];
|
||||
vtop_left = vabove_row[-1];
|
||||
|
||||
switch (xd->mode_info_context->mbmi.uv_mode) {
|
||||
case DC_PRED: {
|
||||
int expected_udc;
|
||||
int expected_vdc;
|
||||
int i;
|
||||
int shift;
|
||||
int Uaverage = 0;
|
||||
int Vaverage = 0;
|
||||
|
||||
if (xd->up_available) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
Uaverage += uabove_row[i];
|
||||
Vaverage += vabove_row[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (xd->left_available) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
Uaverage += uleft_col[i];
|
||||
Vaverage += vleft_col[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (!xd->up_available && !xd->left_available) {
|
||||
expected_udc = 128;
|
||||
expected_vdc = 128;
|
||||
} else {
|
||||
shift = 2 + xd->up_available + xd->left_available;
|
||||
expected_udc = (Uaverage + (1 << (shift - 1))) >> shift;
|
||||
expected_vdc = (Vaverage + (1 << (shift - 1))) >> shift;
|
||||
}
|
||||
|
||||
|
||||
vpx_memset(upred_ptr, expected_udc, 64);
|
||||
vpx_memset(vpred_ptr, expected_vdc, 64);
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case V_PRED: {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
vpx_memcpy(upred_ptr, uabove_row, 8);
|
||||
vpx_memcpy(vpred_ptr, vabove_row, 8);
|
||||
upred_ptr += 8;
|
||||
vpred_ptr += 8;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case H_PRED: {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
vpx_memset(upred_ptr, uleft_col[i], 8);
|
||||
vpx_memset(vpred_ptr, vleft_col[i], 8);
|
||||
upred_ptr += 8;
|
||||
vpred_ptr += 8;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case TM_PRED: {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
for (j = 0; j < 8; j++) {
|
||||
int predu = uleft_col[i] + uabove_row[j] - utop_left;
|
||||
int predv = vleft_col[i] + vabove_row[j] - vtop_left;
|
||||
|
||||
if (predu < 0)
|
||||
predu = 0;
|
||||
|
||||
if (predu > 255)
|
||||
predu = 255;
|
||||
|
||||
if (predv < 0)
|
||||
predv = 0;
|
||||
|
||||
if (predv > 255)
|
||||
predv = 255;
|
||||
|
||||
upred_ptr[j] = predu;
|
||||
vpred_ptr[j] = predv;
|
||||
}
|
||||
|
||||
upred_ptr += 8;
|
||||
vpred_ptr += 8;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case B_PRED:
|
||||
case NEARESTMV:
|
||||
case NEARMV:
|
||||
case ZEROMV:
|
||||
case NEWMV:
|
||||
case SPLITMV:
|
||||
case MB_MODE_COUNT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void vp8mt_build_intra_predictors_mbuv_s(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
int mb_row, int mb_col) {
|
||||
unsigned char *uabove_row; /* = xd->dst.u_buffer - xd->dst.uv_stride; */
|
||||
unsigned char *uleft_col; /*[16];*/
|
||||
unsigned char uleft_buf[8];
|
||||
unsigned char utop_left; /* = uabove_row[-1]; */
|
||||
unsigned char *vabove_row; /* = xd->dst.v_buffer - xd->dst.uv_stride; */
|
||||
unsigned char *vleft_col; /*[20];*/
|
||||
unsigned char vleft_buf[8];
|
||||
unsigned char vtop_left; /* = vabove_row[-1]; */
|
||||
unsigned char *upred_ptr = xd->dst.u_buffer; /*&xd->predictor[256];*/
|
||||
unsigned char *vpred_ptr = xd->dst.v_buffer; /*&xd->predictor[320];*/
|
||||
int uv_stride = xd->dst.uv_stride;
|
||||
int i, j;
|
||||
|
||||
if (pbi->common.filter_level) {
|
||||
uabove_row = pbi->mt_uabove_row[mb_row] + mb_col * 8 + 16;
|
||||
vabove_row = pbi->mt_vabove_row[mb_row] + mb_col * 8 + 16;
|
||||
uleft_col = pbi->mt_uleft_col[mb_row];
|
||||
vleft_col = pbi->mt_vleft_col[mb_row];
|
||||
} else {
|
||||
uabove_row = xd->dst.u_buffer - xd->dst.uv_stride;
|
||||
vabove_row = xd->dst.v_buffer - xd->dst.uv_stride;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
uleft_buf[i] = xd->dst.u_buffer [i * xd->dst.uv_stride - 1];
|
||||
vleft_buf[i] = xd->dst.v_buffer [i * xd->dst.uv_stride - 1];
|
||||
}
|
||||
uleft_col = uleft_buf;
|
||||
vleft_col = vleft_buf;
|
||||
}
|
||||
utop_left = uabove_row[-1];
|
||||
vtop_left = vabove_row[-1];
|
||||
|
||||
switch (xd->mode_info_context->mbmi.uv_mode) {
|
||||
case DC_PRED: {
|
||||
int expected_udc;
|
||||
int expected_vdc;
|
||||
int i;
|
||||
int shift;
|
||||
int Uaverage = 0;
|
||||
int Vaverage = 0;
|
||||
|
||||
if (xd->up_available) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
Uaverage += uabove_row[i];
|
||||
Vaverage += vabove_row[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (xd->left_available) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
Uaverage += uleft_col[i];
|
||||
Vaverage += vleft_col[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (!xd->up_available && !xd->left_available) {
|
||||
expected_udc = 128;
|
||||
expected_vdc = 128;
|
||||
} else {
|
||||
shift = 2 + xd->up_available + xd->left_available;
|
||||
expected_udc = (Uaverage + (1 << (shift - 1))) >> shift;
|
||||
expected_vdc = (Vaverage + (1 << (shift - 1))) >> shift;
|
||||
}
|
||||
|
||||
|
||||
/*vpx_memset(upred_ptr,expected_udc,64);
|
||||
vpx_memset(vpred_ptr,expected_vdc,64);*/
|
||||
for (i = 0; i < 8; i++) {
|
||||
vpx_memset(upred_ptr, expected_udc, 8);
|
||||
vpx_memset(vpred_ptr, expected_vdc, 8);
|
||||
upred_ptr += uv_stride; /*8;*/
|
||||
vpred_ptr += uv_stride; /*8;*/
|
||||
}
|
||||
}
|
||||
break;
|
||||
case V_PRED: {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
vpx_memcpy(upred_ptr, uabove_row, 8);
|
||||
vpx_memcpy(vpred_ptr, vabove_row, 8);
|
||||
upred_ptr += uv_stride; /*8;*/
|
||||
vpred_ptr += uv_stride; /*8;*/
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case H_PRED: {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
vpx_memset(upred_ptr, uleft_col[i], 8);
|
||||
vpx_memset(vpred_ptr, vleft_col[i], 8);
|
||||
upred_ptr += uv_stride; /*8;*/
|
||||
vpred_ptr += uv_stride; /*8;*/
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case TM_PRED: {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
for (j = 0; j < 8; j++) {
|
||||
int predu = uleft_col[i] + uabove_row[j] - utop_left;
|
||||
int predv = vleft_col[i] + vabove_row[j] - vtop_left;
|
||||
|
||||
if (predu < 0)
|
||||
predu = 0;
|
||||
|
||||
if (predu > 255)
|
||||
predu = 255;
|
||||
|
||||
if (predv < 0)
|
||||
predv = 0;
|
||||
|
||||
if (predv > 255)
|
||||
predv = 255;
|
||||
|
||||
upred_ptr[j] = predu;
|
||||
vpred_ptr[j] = predv;
|
||||
}
|
||||
|
||||
upred_ptr += uv_stride; /*8;*/
|
||||
vpred_ptr += uv_stride; /*8;*/
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case B_PRED:
|
||||
case NEARESTMV:
|
||||
case NEARMV:
|
||||
case ZEROMV:
|
||||
case NEWMV:
|
||||
case SPLITMV:
|
||||
case MB_MODE_COUNT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void vp8mt_predict_intra4x4(VP9D_COMP *pbi,
|
||||
MACROBLOCKD *xd,
|
||||
int b_mode,
|
||||
unsigned char *predictor,
|
||||
int mb_row,
|
||||
int mb_col,
|
||||
int num) {
|
||||
int i, r, c;
|
||||
|
||||
unsigned char *Above; /* = *(xd->base_dst) + xd->dst - xd->dst_stride; */
|
||||
unsigned char Left[4];
|
||||
unsigned char top_left; /* = Above[-1]; */
|
||||
|
||||
BLOCKD *blockd = &xd->block[num];
|
||||
|
||||
/*Caution: For some b_mode, it needs 8 pixels (4 above + 4 above-right).*/
|
||||
if (num < 4 && pbi->common.filter_level)
|
||||
Above = pbi->mt_yabove_row[mb_row] + mb_col * 16 + num * 4 + 32;
|
||||
else
|
||||
Above = *(blockd->base_dst) + blockd->dst - blockd->dst_stride;
|
||||
|
||||
if (num % 4 == 0 && pbi->common.filter_level) {
|
||||
for (i = 0; i < 4; i++)
|
||||
Left[i] = pbi->mt_yleft_col[mb_row][num + i];
|
||||
} else {
|
||||
Left[0] = (*(blockd->base_dst))[blockd->dst - 1];
|
||||
Left[1] = (*(blockd->base_dst))[blockd->dst - 1 + blockd->dst_stride];
|
||||
Left[2] = (*(blockd->base_dst))[blockd->dst - 1 + 2 * blockd->dst_stride];
|
||||
Left[3] = (*(blockd->base_dst))[blockd->dst - 1 + 3 * blockd->dst_stride];
|
||||
}
|
||||
|
||||
if ((num == 4 || num == 8 || num == 12) && pbi->common.filter_level)
|
||||
top_left = pbi->mt_yleft_col[mb_row][num - 1];
|
||||
else
|
||||
top_left = Above[-1];
|
||||
|
||||
switch (b_mode) {
|
||||
case B_DC_PRED: {
|
||||
int expected_dc = 0;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
expected_dc += Above[i];
|
||||
expected_dc += Left[i];
|
||||
}
|
||||
|
||||
expected_dc = (expected_dc + 4) >> 3;
|
||||
|
||||
for (r = 0; r < 4; r++) {
|
||||
for (c = 0; c < 4; c++) {
|
||||
predictor[c] = expected_dc;
|
||||
}
|
||||
|
||||
predictor += 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case B_TM_PRED: {
|
||||
/* prediction similar to true_motion prediction */
|
||||
for (r = 0; r < 4; r++) {
|
||||
for (c = 0; c < 4; c++) {
|
||||
int pred = Above[c] - top_left + Left[r];
|
||||
|
||||
if (pred < 0)
|
||||
pred = 0;
|
||||
|
||||
if (pred > 255)
|
||||
pred = 255;
|
||||
|
||||
predictor[c] = pred;
|
||||
}
|
||||
|
||||
predictor += 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case B_VE_PRED: {
|
||||
|
||||
unsigned int ap[4];
|
||||
ap[0] = (top_left + 2 * Above[0] + Above[1] + 2) >> 2;
|
||||
ap[1] = (Above[0] + 2 * Above[1] + Above[2] + 2) >> 2;
|
||||
ap[2] = (Above[1] + 2 * Above[2] + Above[3] + 2) >> 2;
|
||||
ap[3] = (Above[2] + 2 * Above[3] + Above[4] + 2) >> 2;
|
||||
|
||||
for (r = 0; r < 4; r++) {
|
||||
for (c = 0; c < 4; c++) {
|
||||
|
||||
predictor[c] = ap[c];
|
||||
}
|
||||
|
||||
predictor += 16;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case B_HE_PRED: {
|
||||
|
||||
unsigned int lp[4];
|
||||
lp[0] = (top_left + 2 * Left[0] + Left[1] + 2) >> 2;
|
||||
lp[1] = (Left[0] + 2 * Left[1] + Left[2] + 2) >> 2;
|
||||
lp[2] = (Left[1] + 2 * Left[2] + Left[3] + 2) >> 2;
|
||||
lp[3] = (Left[2] + 2 * Left[3] + Left[3] + 2) >> 2;
|
||||
|
||||
for (r = 0; r < 4; r++) {
|
||||
for (c = 0; c < 4; c++) {
|
||||
predictor[c] = lp[r];
|
||||
}
|
||||
|
||||
predictor += 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case B_LD_PRED: {
|
||||
unsigned char *ptr = Above;
|
||||
predictor[0 * 16 + 0] = (ptr[0] + ptr[1] * 2 + ptr[2] + 2) >> 2;
|
||||
predictor[0 * 16 + 1] =
|
||||
predictor[1 * 16 + 0] = (ptr[1] + ptr[2] * 2 + ptr[3] + 2) >> 2;
|
||||
predictor[0 * 16 + 2] =
|
||||
predictor[1 * 16 + 1] =
|
||||
predictor[2 * 16 + 0] = (ptr[2] + ptr[3] * 2 + ptr[4] + 2) >> 2;
|
||||
predictor[0 * 16 + 3] =
|
||||
predictor[1 * 16 + 2] =
|
||||
predictor[2 * 16 + 1] =
|
||||
predictor[3 * 16 + 0] = (ptr[3] + ptr[4] * 2 + ptr[5] + 2) >> 2;
|
||||
predictor[1 * 16 + 3] =
|
||||
predictor[2 * 16 + 2] =
|
||||
predictor[3 * 16 + 1] = (ptr[4] + ptr[5] * 2 + ptr[6] + 2) >> 2;
|
||||
predictor[2 * 16 + 3] =
|
||||
predictor[3 * 16 + 2] = (ptr[5] + ptr[6] * 2 + ptr[7] + 2) >> 2;
|
||||
predictor[3 * 16 + 3] = (ptr[6] + ptr[7] * 2 + ptr[7] + 2) >> 2;
|
||||
|
||||
}
|
||||
break;
|
||||
case B_RD_PRED: {
|
||||
|
||||
unsigned char pp[9];
|
||||
|
||||
pp[0] = Left[3];
|
||||
pp[1] = Left[2];
|
||||
pp[2] = Left[1];
|
||||
pp[3] = Left[0];
|
||||
pp[4] = top_left;
|
||||
pp[5] = Above[0];
|
||||
pp[6] = Above[1];
|
||||
pp[7] = Above[2];
|
||||
pp[8] = Above[3];
|
||||
|
||||
predictor[3 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
|
||||
predictor[3 * 16 + 1] =
|
||||
predictor[2 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
|
||||
predictor[3 * 16 + 2] =
|
||||
predictor[2 * 16 + 1] =
|
||||
predictor[1 * 16 + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
|
||||
predictor[3 * 16 + 3] =
|
||||
predictor[2 * 16 + 2] =
|
||||
predictor[1 * 16 + 1] =
|
||||
predictor[0 * 16 + 0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
|
||||
predictor[2 * 16 + 3] =
|
||||
predictor[1 * 16 + 2] =
|
||||
predictor[0 * 16 + 1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
|
||||
predictor[1 * 16 + 3] =
|
||||
predictor[0 * 16 + 2] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
|
||||
predictor[0 * 16 + 3] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2;
|
||||
|
||||
}
|
||||
break;
|
||||
case B_VR_PRED: {
|
||||
|
||||
unsigned char pp[9];
|
||||
|
||||
pp[0] = Left[3];
|
||||
pp[1] = Left[2];
|
||||
pp[2] = Left[1];
|
||||
pp[3] = Left[0];
|
||||
pp[4] = top_left;
|
||||
pp[5] = Above[0];
|
||||
pp[6] = Above[1];
|
||||
pp[7] = Above[2];
|
||||
pp[8] = Above[3];
|
||||
|
||||
|
||||
predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
|
||||
predictor[2 * 16 + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
|
||||
predictor[3 * 16 + 1] =
|
||||
predictor[1 * 16 + 0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
|
||||
predictor[2 * 16 + 1] =
|
||||
predictor[0 * 16 + 0] = (pp[4] + pp[5] + 1) >> 1;
|
||||
predictor[3 * 16 + 2] =
|
||||
predictor[1 * 16 + 1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
|
||||
predictor[2 * 16 + 2] =
|
||||
predictor[0 * 16 + 1] = (pp[5] + pp[6] + 1) >> 1;
|
||||
predictor[3 * 16 + 3] =
|
||||
predictor[1 * 16 + 2] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
|
||||
predictor[2 * 16 + 3] =
|
||||
predictor[0 * 16 + 2] = (pp[6] + pp[7] + 1) >> 1;
|
||||
predictor[1 * 16 + 3] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2;
|
||||
predictor[0 * 16 + 3] = (pp[7] + pp[8] + 1) >> 1;
|
||||
|
||||
}
|
||||
break;
|
||||
case B_VL_PRED: {
|
||||
|
||||
unsigned char *pp = Above;
|
||||
|
||||
predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
|
||||
predictor[1 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
|
||||
predictor[2 * 16 + 0] =
|
||||
predictor[0 * 16 + 1] = (pp[1] + pp[2] + 1) >> 1;
|
||||
predictor[1 * 16 + 1] =
|
||||
predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
|
||||
predictor[2 * 16 + 1] =
|
||||
predictor[0 * 16 + 2] = (pp[2] + pp[3] + 1) >> 1;
|
||||
predictor[3 * 16 + 1] =
|
||||
predictor[1 * 16 + 2] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
|
||||
predictor[0 * 16 + 3] =
|
||||
predictor[2 * 16 + 2] = (pp[3] + pp[4] + 1) >> 1;
|
||||
predictor[1 * 16 + 3] =
|
||||
predictor[3 * 16 + 2] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
|
||||
predictor[2 * 16 + 3] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
|
||||
predictor[3 * 16 + 3] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case B_HD_PRED: {
|
||||
unsigned char pp[9];
|
||||
pp[0] = Left[3];
|
||||
pp[1] = Left[2];
|
||||
pp[2] = Left[1];
|
||||
pp[3] = Left[0];
|
||||
pp[4] = top_left;
|
||||
pp[5] = Above[0];
|
||||
pp[6] = Above[1];
|
||||
pp[7] = Above[2];
|
||||
pp[8] = Above[3];
|
||||
|
||||
|
||||
predictor[3 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
|
||||
predictor[3 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
|
||||
predictor[2 * 16 + 0] =
|
||||
predictor[3 * 16 + 2] = (pp[1] + pp[2] + 1) >> 1;
|
||||
predictor[2 * 16 + 1] =
|
||||
predictor[3 * 16 + 3] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
|
||||
predictor[2 * 16 + 2] =
|
||||
predictor[1 * 16 + 0] = (pp[2] + pp[3] + 1) >> 1;
|
||||
predictor[2 * 16 + 3] =
|
||||
predictor[1 * 16 + 1] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
|
||||
predictor[1 * 16 + 2] =
|
||||
predictor[0 * 16 + 0] = (pp[3] + pp[4] + 1) >> 1;
|
||||
predictor[1 * 16 + 3] =
|
||||
predictor[0 * 16 + 1] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
|
||||
predictor[0 * 16 + 2] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
|
||||
predictor[0 * 16 + 3] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case B_HU_PRED: {
|
||||
unsigned char *pp = Left;
|
||||
predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
|
||||
predictor[0 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
|
||||
predictor[0 * 16 + 2] =
|
||||
predictor[1 * 16 + 0] = (pp[1] + pp[2] + 1) >> 1;
|
||||
predictor[0 * 16 + 3] =
|
||||
predictor[1 * 16 + 1] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
|
||||
predictor[1 * 16 + 2] =
|
||||
predictor[2 * 16 + 0] = (pp[2] + pp[3] + 1) >> 1;
|
||||
predictor[1 * 16 + 3] =
|
||||
predictor[2 * 16 + 1] = (pp[2] + pp[3] * 2 + pp[3] + 2) >> 2;
|
||||
predictor[2 * 16 + 2] =
|
||||
predictor[2 * 16 + 3] =
|
||||
predictor[3 * 16 + 0] =
|
||||
predictor[3 * 16 + 1] =
|
||||
predictor[3 * 16 + 2] =
|
||||
predictor[3 * 16 + 3] = pp[3];
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
|
||||
* to the right prediction have filled in pixels to use.
|
||||
*/
|
||||
void vp8mt_intra_prediction_down_copy(VP9D_COMP *pbi, MACROBLOCKD *xd,
|
||||
int mb_row, int mb_col) {
|
||||
unsigned char *above_right; // = *(xd->block[0].base_dst) +
|
||||
// xd->block[0].dst -
|
||||
// xd->block[0].dst_stride + 16; */
|
||||
unsigned int *src_ptr;
|
||||
unsigned int *dst_ptr0;
|
||||
unsigned int *dst_ptr1;
|
||||
unsigned int *dst_ptr2;
|
||||
|
||||
if (pbi->common.filter_level)
|
||||
above_right = pbi->mt_yabove_row[mb_row] + mb_col * 16 + 32 + 16;
|
||||
else
|
||||
above_right = *(xd->block[0].base_dst) + xd->block[0].dst -
|
||||
xd->block[0].dst_stride + 16;
|
||||
|
||||
src_ptr = (unsigned int *)above_right;
|
||||
/*dst_ptr0 = (unsigned int *)(above_right + 4 * xd->block[0].dst_stride);
|
||||
dst_ptr1 = (unsigned int *)(above_right + 8 * xd->block[0].dst_stride);
|
||||
dst_ptr2 = (unsigned int *)(above_right + 12 * xd->block[0].dst_stride);*/
|
||||
dst_ptr0 = (unsigned int *)(*(xd->block[0].base_dst) + xd->block[0].dst +
|
||||
16 + 3 * xd->block[0].dst_stride);
|
||||
dst_ptr1 = (unsigned int *)(*(xd->block[0].base_dst) + xd->block[0].dst +
|
||||
16 + 7 * xd->block[0].dst_stride);
|
||||
dst_ptr2 = (unsigned int *)(*(xd->block[0].base_dst) + xd->block[0].dst +
|
||||
16 + 11 * xd->block[0].dst_stride);
|
||||
*dst_ptr0 = *src_ptr;
|
||||
*dst_ptr1 = *src_ptr;
|
||||
*dst_ptr2 = *src_ptr;
|
||||
}
|
@ -16,23 +16,20 @@
|
||||
|
||||
#include "dboolhuff.h"
|
||||
|
||||
typedef BOOL_DECODER vp8_reader;
|
||||
|
||||
#define vp8_read vp8dx_decode_bool
|
||||
#define vp8_read_literal vp8_decode_value
|
||||
#define vp8_read_bit( R) vp8_read( R, vp8_prob_half)
|
||||
typedef BOOL_DECODER vp9_reader;
|
||||
|
||||
#define vp9_read decode_bool
|
||||
#define vp9_read_literal decode_value
|
||||
#define vp9_read_bit(R) vp9_read(R, vp9_prob_half)
|
||||
|
||||
/* Intent of tree data structure is to make decoding trivial. */
|
||||
|
||||
static int vp8_treed_read(
|
||||
vp8_reader *const r, /* !!! must return a 0 or 1 !!! */
|
||||
vp8_tree t,
|
||||
const vp8_prob *const p
|
||||
) {
|
||||
register vp8_tree_index i = 0;
|
||||
static int treed_read(vp9_reader *const r, /* !!! must return a 0 or 1 !!! */
|
||||
vp9_tree t,
|
||||
const vp9_prob *const p) {
|
||||
register vp9_tree_index i = 0;
|
||||
|
||||
while ((i = t[ i + vp8_read(r, p[i >> 1])]) > 0);
|
||||
while ((i = t[ i + vp9_read(r, p[i >> 1])]) > 0);
|
||||
|
||||
return -i;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ extern void (*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12
|
||||
extern void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction);
|
||||
extern void vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction);
|
||||
|
||||
void vp8_arch_arm_encoder_init(VP9_COMP *cpi) {
|
||||
void vp9_arch_arm_encoder_init(VP9_COMP *cpi) {
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
int flags = cpi->common.rtcd.flags;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
EXPORT |vp8_start_encode|
|
||||
EXPORT |vp8_encode_bool|
|
||||
EXPORT |vp9_encode_bool|
|
||||
EXPORT |vp8_stop_encode|
|
||||
EXPORT |vp8_encode_value|
|
||||
|
||||
@ -29,26 +29,26 @@
|
||||
mov r12, #0
|
||||
mov r3, #255
|
||||
mvn r2, #23
|
||||
str r12, [r0, #vp8_writer_lowvalue]
|
||||
str r3, [r0, #vp8_writer_range]
|
||||
str r12, [r0, #vp8_writer_value]
|
||||
str r2, [r0, #vp8_writer_count]
|
||||
str r12, [r0, #vp8_writer_pos]
|
||||
str r1, [r0, #vp8_writer_buffer]
|
||||
str r12, [r0, #vp9_writer_lowvalue]
|
||||
str r3, [r0, #vp9_writer_range]
|
||||
str r12, [r0, #vp9_writer_value]
|
||||
str r2, [r0, #vp9_writer_count]
|
||||
str r12, [r0, #vp9_writer_pos]
|
||||
str r1, [r0, #vp9_writer_buffer]
|
||||
bx lr
|
||||
ENDP
|
||||
|
||||
; r0 BOOL_CODER *br
|
||||
; r1 int bit
|
||||
; r2 int probability
|
||||
|vp8_encode_bool| PROC
|
||||
|vp9_encode_bool| PROC
|
||||
push {r4-r9, lr}
|
||||
|
||||
mov r4, r2
|
||||
|
||||
ldr r2, [r0, #vp8_writer_lowvalue]
|
||||
ldr r5, [r0, #vp8_writer_range]
|
||||
ldr r3, [r0, #vp8_writer_count]
|
||||
ldr r2, [r0, #vp9_writer_lowvalue]
|
||||
ldr r5, [r0, #vp9_writer_range]
|
||||
ldr r3, [r0, #vp9_writer_count]
|
||||
|
||||
sub r7, r5, #1 ; range-1
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
lsls r4, r2, r4 ; if((lowvalue<<(offset-1)) & 0x80000000 )
|
||||
bpl token_high_bit_not_set
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos] ; x
|
||||
ldr r4, [r0, #vp9_writer_pos] ; x
|
||||
sub r4, r4, #1 ; x = w->pos-1
|
||||
b token_zero_while_start
|
||||
token_zero_while_loop
|
||||
@ -85,34 +85,34 @@ token_zero_while_loop
|
||||
sub r4, r4, #1 ; x--
|
||||
token_zero_while_start
|
||||
cmp r4, #0
|
||||
ldrge r7, [r0, #vp8_writer_buffer]
|
||||
ldrge r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r1, [r7, r4]
|
||||
cmpge r1, #0xff
|
||||
beq token_zero_while_loop
|
||||
|
||||
ldr r7, [r0, #vp8_writer_buffer]
|
||||
ldr r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r9, [r7, r4] ; w->buffer[x]
|
||||
add r9, r9, #1
|
||||
strb r9, [r7, r4] ; w->buffer[x] + 1
|
||||
token_high_bit_not_set
|
||||
rsb r4, r6, #24 ; 24-offset
|
||||
ldr r9, [r0, #vp8_writer_buffer]
|
||||
ldr r9, [r0, #vp9_writer_buffer]
|
||||
lsr r7, r2, r4 ; lowvalue >> (24-offset)
|
||||
ldr r4, [r0, #vp8_writer_pos] ; w->pos
|
||||
ldr r4, [r0, #vp9_writer_pos] ; w->pos
|
||||
lsl r2, r2, r6 ; lowvalue <<= offset
|
||||
mov r6, r3 ; shift = count
|
||||
add r1, r4, #1 ; w->pos++
|
||||
bic r2, r2, #0xff000000 ; lowvalue &= 0xffffff
|
||||
str r1, [r0, #vp8_writer_pos]
|
||||
str r1, [r0, #vp9_writer_pos]
|
||||
sub r3, r3, #8 ; count -= 8
|
||||
strb r7, [r9, r4] ; w->buffer[w->pos++]
|
||||
|
||||
token_count_lt_zero
|
||||
lsl r2, r2, r6 ; lowvalue <<= shift
|
||||
|
||||
str r2, [r0, #vp8_writer_lowvalue]
|
||||
str r5, [r0, #vp8_writer_range]
|
||||
str r3, [r0, #vp8_writer_count]
|
||||
str r2, [r0, #vp9_writer_lowvalue]
|
||||
str r5, [r0, #vp9_writer_range]
|
||||
str r3, [r0, #vp9_writer_count]
|
||||
pop {r4-r9, pc}
|
||||
ENDP
|
||||
|
||||
@ -120,9 +120,9 @@ token_count_lt_zero
|
||||
|vp8_stop_encode| PROC
|
||||
push {r4-r10, lr}
|
||||
|
||||
ldr r2, [r0, #vp8_writer_lowvalue]
|
||||
ldr r5, [r0, #vp8_writer_range]
|
||||
ldr r3, [r0, #vp8_writer_count]
|
||||
ldr r2, [r0, #vp9_writer_lowvalue]
|
||||
ldr r5, [r0, #vp9_writer_range]
|
||||
ldr r3, [r0, #vp9_writer_count]
|
||||
|
||||
mov r10, #32
|
||||
|
||||
@ -149,7 +149,7 @@ stop_encode_loop
|
||||
lsls r4, r2, r4 ; if((lowvalue<<(offset-1)) & 0x80000000 )
|
||||
bpl token_high_bit_not_set_se
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos] ; x
|
||||
ldr r4, [r0, #vp9_writer_pos] ; x
|
||||
sub r4, r4, #1 ; x = w->pos-1
|
||||
b token_zero_while_start_se
|
||||
token_zero_while_loop_se
|
||||
@ -158,25 +158,25 @@ token_zero_while_loop_se
|
||||
sub r4, r4, #1 ; x--
|
||||
token_zero_while_start_se
|
||||
cmp r4, #0
|
||||
ldrge r7, [r0, #vp8_writer_buffer]
|
||||
ldrge r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r1, [r7, r4]
|
||||
cmpge r1, #0xff
|
||||
beq token_zero_while_loop_se
|
||||
|
||||
ldr r7, [r0, #vp8_writer_buffer]
|
||||
ldr r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r9, [r7, r4] ; w->buffer[x]
|
||||
add r9, r9, #1
|
||||
strb r9, [r7, r4] ; w->buffer[x] + 1
|
||||
token_high_bit_not_set_se
|
||||
rsb r4, r6, #24 ; 24-offset
|
||||
ldr r9, [r0, #vp8_writer_buffer]
|
||||
ldr r9, [r0, #vp9_writer_buffer]
|
||||
lsr r7, r2, r4 ; lowvalue >> (24-offset)
|
||||
ldr r4, [r0, #vp8_writer_pos] ; w->pos
|
||||
ldr r4, [r0, #vp9_writer_pos] ; w->pos
|
||||
lsl r2, r2, r6 ; lowvalue <<= offset
|
||||
mov r6, r3 ; shift = count
|
||||
add r1, r4, #1 ; w->pos++
|
||||
bic r2, r2, #0xff000000 ; lowvalue &= 0xffffff
|
||||
str r1, [r0, #vp8_writer_pos]
|
||||
str r1, [r0, #vp9_writer_pos]
|
||||
sub r3, r3, #8 ; count -= 8
|
||||
strb r7, [r9, r4] ; w->buffer[w->pos++]
|
||||
|
||||
@ -186,9 +186,9 @@ token_count_lt_zero_se
|
||||
subs r10, r10, #1
|
||||
bne stop_encode_loop
|
||||
|
||||
str r2, [r0, #vp8_writer_lowvalue]
|
||||
str r5, [r0, #vp8_writer_range]
|
||||
str r3, [r0, #vp8_writer_count]
|
||||
str r2, [r0, #vp9_writer_lowvalue]
|
||||
str r5, [r0, #vp9_writer_range]
|
||||
str r3, [r0, #vp9_writer_count]
|
||||
pop {r4-r10, pc}
|
||||
|
||||
ENDP
|
||||
@ -201,9 +201,9 @@ token_count_lt_zero_se
|
||||
|
||||
mov r10, r2
|
||||
|
||||
ldr r2, [r0, #vp8_writer_lowvalue]
|
||||
ldr r5, [r0, #vp8_writer_range]
|
||||
ldr r3, [r0, #vp8_writer_count]
|
||||
ldr r2, [r0, #vp9_writer_lowvalue]
|
||||
ldr r5, [r0, #vp9_writer_range]
|
||||
ldr r3, [r0, #vp9_writer_count]
|
||||
|
||||
rsb r4, r10, #32 ; 32-n
|
||||
|
||||
@ -240,7 +240,7 @@ encode_value_loop
|
||||
lsls r4, r2, r4 ; if((lowvalue<<(offset-1)) & 0x80000000 )
|
||||
bpl token_high_bit_not_set_ev
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos] ; x
|
||||
ldr r4, [r0, #vp9_writer_pos] ; x
|
||||
sub r4, r4, #1 ; x = w->pos-1
|
||||
b token_zero_while_start_ev
|
||||
token_zero_while_loop_ev
|
||||
@ -249,25 +249,25 @@ token_zero_while_loop_ev
|
||||
sub r4, r4, #1 ; x--
|
||||
token_zero_while_start_ev
|
||||
cmp r4, #0
|
||||
ldrge r7, [r0, #vp8_writer_buffer]
|
||||
ldrge r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r11, [r7, r4]
|
||||
cmpge r11, #0xff
|
||||
beq token_zero_while_loop_ev
|
||||
|
||||
ldr r7, [r0, #vp8_writer_buffer]
|
||||
ldr r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r9, [r7, r4] ; w->buffer[x]
|
||||
add r9, r9, #1
|
||||
strb r9, [r7, r4] ; w->buffer[x] + 1
|
||||
token_high_bit_not_set_ev
|
||||
rsb r4, r6, #24 ; 24-offset
|
||||
ldr r9, [r0, #vp8_writer_buffer]
|
||||
ldr r9, [r0, #vp9_writer_buffer]
|
||||
lsr r7, r2, r4 ; lowvalue >> (24-offset)
|
||||
ldr r4, [r0, #vp8_writer_pos] ; w->pos
|
||||
ldr r4, [r0, #vp9_writer_pos] ; w->pos
|
||||
lsl r2, r2, r6 ; lowvalue <<= offset
|
||||
mov r6, r3 ; shift = count
|
||||
add r11, r4, #1 ; w->pos++
|
||||
bic r2, r2, #0xff000000 ; lowvalue &= 0xffffff
|
||||
str r11, [r0, #vp8_writer_pos]
|
||||
str r11, [r0, #vp9_writer_pos]
|
||||
sub r3, r3, #8 ; count -= 8
|
||||
strb r7, [r9, r4] ; w->buffer[w->pos++]
|
||||
|
||||
@ -277,9 +277,9 @@ token_count_lt_zero_ev
|
||||
subs r10, r10, #1
|
||||
bne encode_value_loop
|
||||
|
||||
str r2, [r0, #vp8_writer_lowvalue]
|
||||
str r5, [r0, #vp8_writer_range]
|
||||
str r3, [r0, #vp8_writer_count]
|
||||
str r2, [r0, #vp9_writer_lowvalue]
|
||||
str r5, [r0, #vp9_writer_range]
|
||||
str r3, [r0, #vp9_writer_count]
|
||||
pop {r4-r11, pc}
|
||||
ENDP
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
; r0 vp8_writer *w
|
||||
; r0 vp9_writer *w
|
||||
; r1 const TOKENEXTRA *p
|
||||
; r2 int xcount
|
||||
; r3 vp8_coef_encodings
|
||||
@ -34,9 +34,9 @@
|
||||
add r2, r1, r2, lsl #3 ; stop = p + xcount*sizeof(TOKENEXTRA)
|
||||
str r2, [sp, #0]
|
||||
str r3, [sp, #8] ; save vp8_coef_encodings
|
||||
ldr r2, [r0, #vp8_writer_lowvalue]
|
||||
ldr r5, [r0, #vp8_writer_range]
|
||||
ldr r3, [r0, #vp8_writer_count]
|
||||
ldr r2, [r0, #vp9_writer_lowvalue]
|
||||
ldr r5, [r0, #vp9_writer_range]
|
||||
ldr r3, [r0, #vp9_writer_count]
|
||||
b check_p_lt_stop
|
||||
|
||||
while_p_lt_stop
|
||||
@ -48,8 +48,8 @@ while_p_lt_stop
|
||||
|
||||
ldrb r7, [r1, #tokenextra_skip_eob_node]
|
||||
|
||||
ldr r6, [r4, #vp8_token_value] ; v
|
||||
ldr r8, [r4, #vp8_token_len] ; n
|
||||
ldr r6, [r4, #vp9_token_value] ; v
|
||||
ldr r8, [r4, #vp9_token_len] ; n
|
||||
|
||||
; vp8 specific skip_eob_node
|
||||
cmp r7, #0
|
||||
@ -99,7 +99,7 @@ token_loop
|
||||
lsls r4, r2, r4 ; if((lowvalue<<(offset-1)) & 0x80000000 )
|
||||
bpl token_high_bit_not_set
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos] ; x
|
||||
ldr r4, [r0, #vp9_writer_pos] ; x
|
||||
sub r4, r4, #1 ; x = w->pos-1
|
||||
b token_zero_while_start
|
||||
token_zero_while_loop
|
||||
@ -108,25 +108,25 @@ token_zero_while_loop
|
||||
sub r4, r4, #1 ; x--
|
||||
token_zero_while_start
|
||||
cmp r4, #0
|
||||
ldrge r7, [r0, #vp8_writer_buffer]
|
||||
ldrge r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r11, [r7, r4]
|
||||
cmpge r11, #0xff
|
||||
beq token_zero_while_loop
|
||||
|
||||
ldr r7, [r0, #vp8_writer_buffer]
|
||||
ldr r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r10, [r7, r4] ; w->buffer[x]
|
||||
add r10, r10, #1
|
||||
strb r10, [r7, r4] ; w->buffer[x] + 1
|
||||
token_high_bit_not_set
|
||||
rsb r4, r6, #24 ; 24-offset
|
||||
ldr r10, [r0, #vp8_writer_buffer]
|
||||
ldr r10, [r0, #vp9_writer_buffer]
|
||||
lsr r7, r2, r4 ; lowvalue >> (24-offset)
|
||||
ldr r4, [r0, #vp8_writer_pos] ; w->pos
|
||||
ldr r4, [r0, #vp9_writer_pos] ; w->pos
|
||||
lsl r2, r2, r6 ; lowvalue <<= offset
|
||||
mov r6, r3 ; shift = count
|
||||
add r11, r4, #1 ; w->pos++
|
||||
bic r2, r2, #0xff000000 ; lowvalue &= 0xffffff
|
||||
str r11, [r0, #vp8_writer_pos]
|
||||
str r11, [r0, #vp9_writer_pos]
|
||||
sub r3, r3, #8 ; count -= 8
|
||||
strb r7, [r10, r4] ; w->buffer[w->pos++]
|
||||
|
||||
@ -143,24 +143,24 @@ token_count_lt_zero
|
||||
|
||||
ldrb r6, [r1, #tokenextra_token] ; t
|
||||
ldr r7, [sp, #48] ; vp8_extra_bits
|
||||
; Add t * sizeof (vp8_extra_bit_struct) to get the desired
|
||||
; element. Here vp8_extra_bit_struct == 16
|
||||
; Add t * sizeof (vp9_extra_bit_struct) to get the desired
|
||||
; element. Here vp9_extra_bit_struct == 16
|
||||
add r12, r7, r6, lsl #4 ; b = vp8_extra_bits + t
|
||||
|
||||
ldr r4, [r12, #vp8_extra_bit_struct_base_val]
|
||||
ldr r4, [r12, #vp9_extra_bit_struct_base_val]
|
||||
cmp r4, #0
|
||||
beq skip_extra_bits
|
||||
|
||||
; if( b->base_val)
|
||||
ldr r8, [r12, #vp8_extra_bit_struct_len] ; L
|
||||
ldr r8, [r12, #vp9_extra_bit_struct_len] ; L
|
||||
ldrsh lr, [r1, #tokenextra_extra] ; e = p->Extra
|
||||
cmp r8, #0 ; if( L)
|
||||
beq no_extra_bits
|
||||
|
||||
ldr r9, [r12, #vp8_extra_bit_struct_prob]
|
||||
ldr r9, [r12, #vp9_extra_bit_struct_prob]
|
||||
asr r7, lr, #1 ; v=e>>1
|
||||
|
||||
ldr r10, [r12, #vp8_extra_bit_struct_tree]
|
||||
ldr r10, [r12, #vp9_extra_bit_struct_tree]
|
||||
str r10, [sp, #4] ; b->tree
|
||||
|
||||
rsb r4, r8, #32
|
||||
@ -194,7 +194,7 @@ extra_bits_loop
|
||||
lsls r4, r2, r4 ; if((lowvalue<<(offset-1)) & 0x80000000 )
|
||||
bpl extra_high_bit_not_set
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos] ; x
|
||||
ldr r4, [r0, #vp9_writer_pos] ; x
|
||||
sub r4, r4, #1 ; x = w->pos - 1
|
||||
b extra_zero_while_start
|
||||
extra_zero_while_loop
|
||||
@ -203,25 +203,25 @@ extra_zero_while_loop
|
||||
sub r4, r4, #1 ; x--
|
||||
extra_zero_while_start
|
||||
cmp r4, #0
|
||||
ldrge r7, [r0, #vp8_writer_buffer]
|
||||
ldrge r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r11, [r7, r4]
|
||||
cmpge r11, #0xff
|
||||
beq extra_zero_while_loop
|
||||
|
||||
ldr r7, [r0, #vp8_writer_buffer]
|
||||
ldr r7, [r0, #vp9_writer_buffer]
|
||||
ldrb r10, [r7, r4]
|
||||
add r10, r10, #1
|
||||
strb r10, [r7, r4]
|
||||
extra_high_bit_not_set
|
||||
rsb r4, r6, #24 ; 24-offset
|
||||
ldr r10, [r0, #vp8_writer_buffer]
|
||||
ldr r10, [r0, #vp9_writer_buffer]
|
||||
lsr r7, r2, r4 ; lowvalue >> (24-offset)
|
||||
ldr r4, [r0, #vp8_writer_pos]
|
||||
ldr r4, [r0, #vp9_writer_pos]
|
||||
lsl r2, r2, r6 ; lowvalue <<= offset
|
||||
mov r6, r3 ; shift = count
|
||||
add r11, r4, #1 ; w->pos++
|
||||
bic r2, r2, #0xff000000 ; lowvalue &= 0xffffff
|
||||
str r11, [r0, #vp8_writer_pos]
|
||||
str r11, [r0, #vp9_writer_pos]
|
||||
sub r3, r3, #8 ; count -= 8
|
||||
strb r7, [r10, r4] ; w->buffer[w->pos++]=(lowvalue >> (24-offset))
|
||||
ldr r10, [sp, #4] ; b->tree
|
||||
@ -242,7 +242,7 @@ no_extra_bits
|
||||
lsl r5, r4, #1 ; range <<= 1
|
||||
beq end_high_bit_not_set
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos]
|
||||
ldr r4, [r0, #vp9_writer_pos]
|
||||
mov r7, #0
|
||||
sub r4, r4, #1
|
||||
b end_zero_while_start
|
||||
@ -251,12 +251,12 @@ end_zero_while_loop
|
||||
sub r4, r4, #1 ; x--
|
||||
end_zero_while_start
|
||||
cmp r4, #0
|
||||
ldrge r6, [r0, #vp8_writer_buffer]
|
||||
ldrge r6, [r0, #vp9_writer_buffer]
|
||||
ldrb r12, [r6, r4]
|
||||
cmpge r12, #0xff
|
||||
beq end_zero_while_loop
|
||||
|
||||
ldr r6, [r0, #vp8_writer_buffer]
|
||||
ldr r6, [r0, #vp9_writer_buffer]
|
||||
ldrb r7, [r6, r4]
|
||||
add r7, r7, #1
|
||||
strb r7, [r6, r4]
|
||||
@ -265,9 +265,9 @@ end_high_bit_not_set
|
||||
lsl r2, r2, #1 ; lowvalue <<= 1
|
||||
bne end_count_zero
|
||||
|
||||
ldr r4, [r0, #vp8_writer_pos]
|
||||
ldr r4, [r0, #vp9_writer_pos]
|
||||
mvn r3, #7
|
||||
ldr r7, [r0, #vp8_writer_buffer]
|
||||
ldr r7, [r0, #vp9_writer_buffer]
|
||||
lsr r6, r2, #24 ; lowvalue >> 24
|
||||
add r12, r4, #1 ; w->pos++
|
||||
bic r2, r2, #0xff000000 ; lowvalue &= 0xffffff
|
||||
@ -281,9 +281,9 @@ check_p_lt_stop
|
||||
cmp r1, r4 ; while( p < stop)
|
||||
bcc while_p_lt_stop
|
||||
|
||||
str r2, [r0, #vp8_writer_lowvalue]
|
||||
str r5, [r0, #vp8_writer_range]
|
||||
str r3, [r0, #vp8_writer_count]
|
||||
str r2, [r0, #vp9_writer_lowvalue]
|
||||
str r5, [r0, #vp9_writer_range]
|
||||
str r3, [r0, #vp9_writer_count]
|
||||
add sp, sp, #12
|
||||
pop {r4-r11, pc}
|
||||
ENDP
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user