ref: 2df2aab9a70eb3f8e0605c875102084397c92fc0
parent: 5cfbafea18ff703bffc6612063ce6500ae638fa0
author: David Michael Barr <b@rr-dav.id.au>
date: Tue Oct 16 21:34:11 EDT 2018
Move chroma-from-luma alpha to last parameter This will help when writing x86_64 assembly.
--- a/src/ipred.c
+++ b/src/ipred.c
@@ -71,7 +71,7 @@
static NOINLINE void
cfl_pred(pixel *dst, const ptrdiff_t stride,
const int width, const int height, const unsigned dc,
- const int8_t alpha, const int16_t *ac)
+ const int16_t *ac, const int alpha)
{
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
@@ -101,9 +101,9 @@
static void ipred_cfl_top_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
- const int8_t alpha, const int16_t *ac)
+ const int16_t *ac, const int alpha)
{
- cfl_pred(dst, stride, width, height, dc_gen_top(topleft, width), alpha, ac);
+ cfl_pred(dst, stride, width, height, dc_gen_top(topleft, width), ac, alpha);
}
static unsigned dc_gen_left(const pixel *const topleft, const int height)
@@ -124,10 +124,10 @@
static void ipred_cfl_left_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
- const int8_t alpha, const int16_t *ac)
+ const int16_t *ac, const int alpha)
{
unsigned dc = dc_gen_left(topleft, height);
- cfl_pred(dst, stride, width, height, dc, alpha, ac);
+ cfl_pred(dst, stride, width, height, dc, ac, alpha);
}
#if BITDEPTH == 8
@@ -168,10 +168,10 @@
static void ipred_cfl_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
- const int8_t alpha, const int16_t *ac)
+ const int16_t *ac, const int alpha)
{
unsigned dc = dc_gen(topleft, width, height);
- cfl_pred(dst, stride, width, height, dc, alpha, ac);
+ cfl_pred(dst, stride, width, height, dc, ac, alpha);
}
#undef MULTIPLIER_1x2
@@ -188,9 +188,9 @@
static void ipred_cfl_128_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
- const int8_t alpha, const int16_t *ac)
+ const int16_t *ac, const int alpha)
{
- cfl_pred(dst, stride, width, height, 1 << (BITDEPTH - 1), alpha, ac);
+ cfl_pred(dst, stride, width, height, 1 << (BITDEPTH - 1), ac, alpha);
}
static void ipred_v_c(pixel *dst, const ptrdiff_t stride,
--- a/src/ipred.h
+++ b/src/ipred.h
@@ -61,8 +61,7 @@
*/
#define decl_cfl_pred_fn(name) \
void (name)(pixel *dst, ptrdiff_t stride, const pixel *topleft, \
- int width, int height, const int8_t alpha, \
- const int16_t *ac)
+ int width, int height, const int16_t *ac, int alpha)
typedef decl_cfl_pred_fn(*cfl_pred_fn);
/*
--- a/src/recon.c
+++ b/src/recon.c
@@ -879,7 +879,7 @@
dsp->ipred.cfl_pred[m](uv_dst[pl], stride, edge,
uv_t_dim->w * 4,
uv_t_dim->h * 4,
- b->cfl_alpha[pl], ac);
+ ac, b->cfl_alpha[pl]);
}
if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
ac_dump(ac, 4*cbw4, 4*cbh4, "ac");