Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 5a22639093d55d05ddfc5156a7a1069db875731b Mon Sep 17 00:00:00 2001
- From: David Conrad <lessen42@gmail.com>
- Date: Mon, 26 Jul 2010 17:05:14 -0400
- Subject: [PATCH 1/3] Generate quant tables progmaatically
- ---
- libavcodec/diracdec.c | 70 ++++++++++++++++++++++++++++---------------------
- 1 files changed, 40 insertions(+), 30 deletions(-)
- diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
- index 7c43eaf..4ea8574 100644
- --- a/libavcodec/diracdec.c
- +++ b/libavcodec/diracdec.c
- @@ -240,38 +240,47 @@ static const uint8_t default_qmat[][4][4] = {
- { { 3, 1, 1, 0}, { 0, 4, 4, 2}, { 0, 6, 6, 5}, { 0, 9, 9, 7} },
- };
- -static const int qscale_tab[MAX_QUANT+1] = {
- - 4, 5, 6, 7, 8, 10, 11, 13,
- - 16, 19, 23, 27, 32, 38, 45, 54,
- - 64, 76, 91, 108, 128, 152, 181, 215,
- - 256, 304, 362, 431, 512, 609, 724, 861,
- - 1024, 1218, 1448, 1722, 2048, 2435, 2896, 3444,
- - 4096, 4871, 5793, 6889, 8192, 9742, 11585, 13777,
- - 16384, 19484, 23170, 27554, 32768, 38968, 46341, 55109,
- - 65536, 77936
- -};
- +static int qscale_tab[MAX_QUANT+1];
- +static int qoffset_intra_tab[MAX_QUANT+1];
- +static int qoffset_inter_tab[MAX_QUANT+1];
- -static const int qoffset_intra_tab[MAX_QUANT+1] = {
- - 1, 2, 3, 4, 4, 5, 6, 7,
- - 8, 10, 12, 14, 16, 19, 23, 27,
- - 32, 38, 46, 54, 64, 76, 91, 108,
- - 128, 152, 181, 216, 256, 305, 362, 431,
- - 512, 609, 724, 861, 1024, 1218, 1448, 1722,
- - 2048, 2436, 2897, 3445, 4096, 4871, 5793, 6889,
- - 8192, 9742, 11585, 13777, 16384, 19484, 23171, 27555,
- - 32768, 38968
- -};
- +static int quant_factor(int quant)
- +{
- + uint64_t base = 1 << (quant >> 2);
- + switch(quant & 3) {
- + case 1:
- + return (503829 * base + 52958) / 105917;
- + case 2:
- + return (665857 * base + 58854) / 117708;
- + case 3:
- + return (440253 * base + 32722) / 65444;
- + }
- + return base << 2;
- +}
- -static const int qoffset_inter_tab[MAX_QUANT+1] = {
- - 1, 2, 2, 3, 3, 4, 4, 5,
- - 6, 7, 9, 10, 12, 14, 17, 20,
- - 24, 29, 34, 41, 48, 57, 68, 81,
- - 96, 114, 136, 162, 192, 228, 272, 323,
- - 384, 457, 543, 646, 768, 913, 1086, 1292,
- - 1536, 1827, 2172, 2583, 3072, 3653, 4344, 5166,
- - 6144, 7307, 8689, 10333, 12288, 14613, 17378, 20666,
- - 24576, 29226
- -};
- +static int quant_offset(int quant, int intra)
- +{
- + if (quant == 0)
- + return 1;
- +
- + if (intra) {
- + if (quant == 1)
- + return 2;
- + else
- + return (quant_factor(quant) + 1) >> 1;
- + } else
- + return (3 * quant_factor(quant) + 4) >> 3;
- +}
- +
- +static void init_quant_tables(void)
- +{
- + int i;
- + for (i = 0; i <= MAX_QUANT; i++) {
- + qscale_tab[i] = quant_factor(i);
- + qoffset_intra_tab[i] = quant_offset(i, 1);
- + qoffset_inter_tab[i] = quant_offset(i, 0);
- + }
- +}
- // magic number division by 3 from schroedinger
- static inline int divide3(int x)
- @@ -397,6 +406,7 @@ static av_cold int dirac_decode_init(AVCodecContext *avctx)
- dsputil_init(&s->dsp, avctx);
- ff_diracdsp_init(&s->diracdsp);
- + init_quant_tables();
- return 0;
- }
- --
- 1.7.2
- From 9d97bf0e5a97ab9e014cf5e6a4f72112378f449e Mon Sep 17 00:00:00 2001
- From: David Conrad <lessen42@gmail.com>
- Date: Tue, 27 Jul 2010 07:17:44 -0400
- Subject: [PATCH 2/3] Some work to fixing dirac's annoying hpel edge extension
- ---
- libavcodec/diracdec.c | 64 +++++++++++++++++++++++++++++++-----------------
- 1 files changed, 41 insertions(+), 23 deletions(-)
- diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
- index 4ea8574..80e6cae 100644
- --- a/libavcodec/diracdec.c
- +++ b/libavcodec/diracdec.c
- @@ -1263,7 +1263,7 @@ static const uint8_t epel_weights[4][4][4] = {
- * @return the index of the put_dirac_pixels_tab function to use
- * 0 for 1 plane (fpel,hpel), 1 for 2 planes (qpel), 2 for 4 planes (qpel), and 3 for epel
- */
- -static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
- +static int mc_subpel(DiracContext *s, DiracBlock *block, uint8_t *src[5],
- int x, int y, int ref, int plane)
- {
- Plane *p = &s->plane[plane];
- @@ -1317,7 +1317,7 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
- // [0]: F [1]: H
- // [2]: V [3]: C
- if (!epel) {
- - // check if we really only need 2 planes since either mx or my is
- + // check if we really only need 2 planes since one of mx or my is
- // a hpel position. (epel weights of 0 handle this there)
- if (!(mx&3)) {
- // mx == 0: average [0] and [2]
- @@ -1330,26 +1330,28 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
- nplanes = 2;
- }
- } else {
- - // adjust the ordering if needed so the weights work
- - if (mx > 4) {
- - FFSWAP(const uint8_t *, src[0], src[1]);
- - FFSWAP(const uint8_t *, src[2], src[3]);
- - }
- - if (my > 4) {
- - FFSWAP(const uint8_t *, src[0], src[2]);
- - FFSWAP(const uint8_t *, src[1], src[3]);
- - }
- - src[4] = epel_weights[my&3][mx&3];
- + // adjust mx, my to work for right/bottom halves
- + // FIXME: check if we can do this without the branch here and above
- + if (mx > 4)
- + mx = 8-mx;
- + if (my > 4)
- + my = 8-my;
- + src[4][0] = (4-mx)*(4-my);
- + src[4][1] = ( mx)*(4-my);
- + src[4][2] = (4-mx)*( my);
- + src[4][3] = ( mx)*( my);
- }
- }
- // fixme: v/h _edge_pos
- - if ((unsigned)x > p->width +EDGE_WIDTH/2 - p->xblen ||
- - (unsigned)y > p->height+EDGE_WIDTH/2 - p->yblen) {
- + // if ((unsigned)x > p->width +EDGE_WIDTH/2 - p->xblen ||
- + // (unsigned)y > p->height+EDGE_WIDTH/2 - p->yblen) {
- + if (x < 0 || x >= p->width - p->xblen ||
- + y < 0 || y >= p->height - p->yblen) {
- for (i = 0; i < nplanes; i++) {
- ff_emulated_edge_mc(s->edge_emu_buffer[i], src[i], p->stride,
- p->xblen, p->yblen, x, y,
- - p->width+EDGE_WIDTH/2, p->height+EDGE_WIDTH/2);
- + p->width, p->height);
- src[i] = s->edge_emu_buffer[i];
- }
- }
- @@ -1377,9 +1379,12 @@ static void block_mc(DiracContext *s, DiracBlock *block,
- int plane, int dstx, int dsty)
- {
- Plane *p = &s->plane[plane];
- - const uint8_t *src[5];
- + uint8_t *src[5];
- + uint8_t weights[4];
- int idx;
- + src[4] = weights;
- +
- switch (block->ref&3) {
- case 0: // DC
- add_dc(mctmp, block->u.dc[plane], p->stride, obmc_weight, p->xblen, p->yblen);
- @@ -1450,9 +1455,11 @@ static void interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, in
- // which for 4:2:2 means an h edge of 16 and v edge of 8
- // just use 8 for everything for the moment
- int i, edge = EDGE_WIDTH/2;
- + uint8_t **hpel = ref->hpel[plane];
- + int linesize = ref->linesize[plane];
- - ref->hpel[plane][0] = ref->data[plane];
- - s->dsp.draw_edges(ref->hpel[plane][0], ref->linesize[plane], width, height, edge);
- + hpel[0] = ref->data[plane];
- + s->dsp.draw_edges(hpel[0], linesize, width, height, edge);
- // no need for hpel if we only have fpel vectors
- if (!s->mv_precision)
- @@ -1460,18 +1467,29 @@ static void interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, in
- for (i = 1; i < 4; i++) {
- if (!ref->hpel_base[plane][i])
- - ref->hpel_base[plane][i] = av_malloc((height+2*edge) * ref->linesize[plane] + 32);
- + ref->hpel_base[plane][i] = av_malloc((height+2*edge) * linesize + 32);
- // we need to be 16-byte aligned even for chroma
- - ref->hpel[plane][i] = ref->hpel_base[plane][i] + edge*ref->linesize[plane] + 16;
- + hpel[i] = ref->hpel_base[plane][i] + edge*linesize + 16;
- }
- if (!ref->interpolated[plane]) {
- - s->diracdsp.dirac_hpel_filter(ref->hpel[plane][1], ref->hpel[plane][2],
- - ref->hpel[plane][3], ref->hpel[plane][0],
- - ref->linesize[plane], width, height);
- + s->diracdsp.dirac_hpel_filter(hpel[1], hpel[2], hpel[3], hpel[0],
- + linesize, width, height);
- +#if 0
- s->dsp.draw_edges(ref->hpel[plane][1], ref->linesize[plane], width, height, edge);
- s->dsp.draw_edges(ref->hpel[plane][2], ref->linesize[plane], width, height, edge);
- s->dsp.draw_edges(ref->hpel[plane][3], ref->linesize[plane], width, height, edge);
- +#else
- + for (i = 0; i < height; i++) {
- + hpel[1][i*linesize + width-1] = hpel[0][i*linesize + width-1];
- + hpel[3][i*linesize + width-1] = hpel[2][i*linesize + width-1];
- + }
- + for (i = 0; i < width; i++) {
- + hpel[2][(height-1)*linesize + i] = hpel[0][(height-1)*linesize + i];
- + hpel[3][(height-1)*linesize + i] = hpel[1][(height-1)*linesize + i];
- + }
- + hpel[3][(height-1)*linesize + width-1] = hpel[0][(height-1)*linesize + width-1];
- +#endif
- }
- ref->interpolated[plane] = 1;
- }
- --
- 1.7.2
- From d748794df9c9ee3af41ae9d10828ac9f7dbf63a6 Mon Sep 17 00:00:00 2001
- From: David Conrad <lessen42@gmail.com>
- Date: Thu, 29 Jul 2010 01:56:15 -0400
- Subject: [PATCH 3/3] WIP: new MC
- ---
- libavcodec/diracdec.c | 68 ++++++++++++++++++++++--------------------------
- libavcodec/diracdsp.c | 62 ++++++++++++++++++++++++++++++++++++++------
- libavcodec/diracdsp.h | 10 +++---
- libavcodec/dsputil.c | 45 --------------------------------
- 4 files changed, 89 insertions(+), 96 deletions(-)
- diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
- index 80e6cae..1cb70b2 100644
- --- a/libavcodec/diracdec.c
- +++ b/libavcodec/diracdec.c
- @@ -1260,10 +1260,14 @@ static const uint8_t epel_weights[4][4][4] = {
- * interpolation from and set src[] to the location in each hpel plane
- * to MC from.
- *
- + * The fpel and destination buffer may have a different stride than
- + * subpel planes, due to edge emulation or
- + *
- * @return the index of the put_dirac_pixels_tab function to use
- * 0 for 1 plane (fpel,hpel), 1 for 2 planes (qpel), 2 for 4 planes (qpel), and 3 for epel
- */
- -static int mc_subpel(DiracContext *s, DiracBlock *block, uint8_t *src[5],
- +static int mc_subpel(DiracContext *s, DiracBlock *block,
- + uint8_t *src[5], int stride[2],
- int x, int y, int ref, int plane)
- {
- Plane *p = &s->plane[plane];
- @@ -1271,6 +1275,7 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, uint8_t *src[5],
- int motion_x = block->u.mv[ref][0];
- int motion_y = block->u.mv[ref][1];
- int mx, my, i, epel, nplanes = 0;
- + int fpel_used;
- if (plane) {
- motion_x >>= s->chroma_x_shift;
- @@ -1292,55 +1297,44 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, uint8_t *src[5],
- // hpel position
- if (!((mx|my)&3)) {
- + plane = ((my>>1)+(mx>>2));
- nplanes = 1;
- - src[0] = ref_hpel[(my>>1)+(mx>>2)] + y*p->stride + x;
- + fpel_used = !plane;
- + src[0] = ref_hpel[plane] + y*stride[!fpel_used] + x;
- +
- +
- +
- + // if we're copying soley from the fpel plane, set the hpel stride appropriately
- + stride[1] = stride[!fpel_used];
- } else {
- // qpel or epel
- nplanes = 4;
- - for (i = 0; i < 4; i++)
- - src[i] = ref_hpel[i] + y*p->stride + x;
- + fpel_used = 1;
- + src[0] = ref_hpel[0] + y*stride[0] + x;
- + src[1] = ref_hpel[1] + y*stride[1] + x;
- + src[2] = ref_hpel[2] + y*stride[1] + x;
- + src[3] = ref_hpel[3] + y*stride[1] + x;
- // if we're interpolating in the right/bottom halves, adjust the planes as needed
- - // we increment x/y because the edge changes for half of the pixels
- + // we increment x/y because the edge changes for half of the pixels (is this right?)
- + // mx/my need to be adjusted so the correct bilinear weights are calculated
- if (mx > 4) {
- - src[0] += 1;
- - src[2] += 1;
- + src[0]++;
- + src[2]++;
- + mx = 8-mx;
- x++;
- }
- if (my > 4) {
- - src[0] += p->stride;
- - src[1] += p->stride;
- + src[0] += stride[0];
- + src[1] += stride[1];
- + my = 8-my;
- y++;
- }
- - // hpel planes are:
- - // [0]: F [1]: H
- - // [2]: V [3]: C
- - if (!epel) {
- - // check if we really only need 2 planes since one of mx or my is
- - // a hpel position. (epel weights of 0 handle this there)
- - if (!(mx&3)) {
- - // mx == 0: average [0] and [2]
- - // mx == 4: average [1] and [3]
- - src[!mx] = src[2 + !!mx];
- - nplanes = 2;
- - } else if (!(my&3)) {
- - src[0] = src[(my>>1) ];
- - src[1] = src[(my>>1)+1];
- - nplanes = 2;
- - }
- - } else {
- - // adjust mx, my to work for right/bottom halves
- - // FIXME: check if we can do this without the branch here and above
- - if (mx > 4)
- - mx = 8-mx;
- - if (my > 4)
- - my = 8-my;
- - src[4][0] = (4-mx)*(4-my);
- - src[4][1] = ( mx)*(4-my);
- - src[4][2] = (4-mx)*( my);
- - src[4][3] = ( mx)*( my);
- - }
- + src[4][0] = (4-mx)*(4-my);
- + src[4][1] = ( mx)*(4-my);
- + src[4][2] = (4-mx)*( my);
- + src[4][3] = ( mx)*( my);
- }
- // fixme: v/h _edge_pos
- diff --git a/libavcodec/diracdsp.c b/libavcodec/diracdsp.c
- index 27318b1..c2e9676 100644
- --- a/libavcodec/diracdsp.c
- +++ b/libavcodec/diracdsp.c
- @@ -50,15 +50,59 @@ static void dirac_hpel_filter(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8
- }
- }
- +#define DIRAC_MC(OPNAME)\
- +void ff_ ## OPNAME ## _dirac_pixels8_c(uint8_t *dst, uint8_t *src[5], int stride, int hpel_stride, int h)\
- +{\
- + OPNAME ## _pixels8_c(dst, src[0], stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels16_c(uint8_t *dst, const uint8_t *src[5], int stride, int hpel_stride, int h)\
- +{\
- + OPNAME ## _pixels16_c(dst, src[0], stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels32_c(uint8_t *dst, const uint8_t *src[5], int stride, int hpel_stride, int h)\
- +{\
- + OPNAME ## _pixels16_c(dst , src[0] , stride, h);\
- + OPNAME ## _pixels16_c(dst+16, src[0]+16, stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels8_l2_c(uint8_t *dst, const uint8_t *src[5], int stride, int hpel_stride, int h)\
- +{\
- + OPNAME ## _pixels8_l2(dst, src[0], src[1], stride, stride, stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels16_l2_c(uint8_t *dst, const uint8_t *src[5], int stride, int hpel_stride, int h)\
- +{\
- + OPNAME ## _pixels16_l2(dst, src[0], src[1], stride, stride, stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels32_l2_c(uint8_t *dst, const uint8_t *src[5], int stride, int hpel_stride, int h)\
- +{\
- + OPNAME ## _pixels16_l2(dst , src[0] , src[1] , stride, stride, stride, h);\
- + OPNAME ## _pixels16_l2(dst+16, src[0]+16, src[1]+16, stride, stride, stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels8_l4_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- +{\
- + OPNAME ## _pixels8_l4(dst, src[0], src[1], src[2], src[3], stride, stride, stride, stride, stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels16_l4_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- +{\
- + OPNAME ## _pixels16_l4(dst, src[0], src[1], src[2], src[3], stride, stride, stride, stride, stride, h);\
- +}\
- +void ff_ ## OPNAME ## _dirac_pixels32_l4_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- +{\
- + OPNAME ## _pixels16_l4(dst , src[0] , src[1] , src[2] , src[3] , stride, stride, stride, stride, stride, h);\
- + OPNAME ## _pixels16_l4(dst+16, src[0]+16, src[1]+16, src[2]+16, src[3]+16, stride, stride, stride, stride, stride, h);\
- +}
- +DIRAC_MC(put)
- +DIRAC_MC(avg)
- +
- +
- #define PIXOP_BILINEAR(PFX, OP, WIDTH) \
- -static void ff_ ## PFX ## _dirac_pixels ## WIDTH ## _bilinear_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- +static void ff_ ## PFX ## _dirac_pixels ## WIDTH ## _bilinear_c(uint8_t *dst, uint8_t *src[5], int stride, int h)\
- {\
- int x;\
- - const uint8_t *s0 = src[0];\
- - const uint8_t *s1 = src[1];\
- - const uint8_t *s2 = src[2];\
- - const uint8_t *s3 = src[3];\
- - const uint8_t *w = src[4];\
- + uint8_t *s0 = src[0];\
- + uint8_t *s1 = src[1];\
- + uint8_t *s2 = src[2];\
- + uint8_t *s3 = src[3];\
- + uint8_t *w = src[4];\
- \
- while (h--) {\
- for (x = 0; x < WIDTH; x++) {\
- @@ -67,9 +111,9 @@ static void ff_ ## PFX ## _dirac_pixels ## WIDTH ## _bilinear_c(uint8_t *dst, co
- \
- dst += stride;\
- s0 += stride;\
- - s1 += stride;\
- - s2 += stride;\
- - s3 += stride;\
- + s1 += hpel_stride;\
- + s2 += hpel_stride;\
- + s3 += hpel_stride;\
- }\
- }
- diff --git a/libavcodec/diracdsp.h b/libavcodec/diracdsp.h
- index 2135ee9..6ebe080 100644
- --- a/libavcodec/diracdsp.h
- +++ b/libavcodec/diracdsp.h
- @@ -36,8 +36,8 @@ typedef struct {
- * src[0-3] is each of the hpel planes
- * src[4] is the 1/8 pel weights if needed
- */
- - void (*put_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], int stride, int h);
- - void (*avg_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], int stride, int h);
- + void (*put_dirac_pixels_tab[3][4])(uint8_t *dst, uint8_t *src[5], int stride, int hpel_stride, int h);
- + void (*avg_dirac_pixels_tab[3][4])(uint8_t *dst, uint8_t *src[5], int stride, int hpel_stride, int h);
- void (*put_signed_rect_clamped)(uint8_t *dst/*align 16*/, int dst_stride, const int16_t *src/*align 16*/, int src_stride, int width, int height/*mod 2*/);
- void (*put_rect_clamped)(uint8_t *dst/*align 16*/, int dst_stride, const int16_t *src/*align 16*/, int src_stride, int width, int height/*mod 2*/);
- @@ -49,9 +49,9 @@ typedef struct {
- } DiracDSPContext;
- #define DECL_DIRAC_PIXOP(PFX, EXT) \
- - void ff_ ## PFX ## _dirac_pixels8_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \
- - void ff_ ## PFX ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \
- - void ff_ ## PFX ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h)
- + void ff_ ## PFX ## _dirac_pixels8_ ## EXT(uint8_t *dst, uint8_t *src[5], int stride, int hpel_stride, int h); \
- + void ff_ ## PFX ## _dirac_pixels16_ ## EXT(uint8_t *dst, uint8_t *src[5], int stride, int hpel_stride, int h); \
- + void ff_ ## PFX ## _dirac_pixels32_ ## EXT(uint8_t *dst, uint8_t *src[5], int stride, int hpel_stride, int h)
- DECL_DIRAC_PIXOP(put, c);
- DECL_DIRAC_PIXOP(avg, c);
- diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
- index 8fb1e3d..0346343 100644
- --- a/libavcodec/dsputil.c
- +++ b/libavcodec/dsputil.c
- @@ -2620,51 +2620,6 @@ static void avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
- }
- #endif /* CONFIG_RV40_DECODER */
- -#if CONFIG_DIRAC_DECODER
- -#define DIRAC_MC(OPNAME)\
- -void ff_ ## OPNAME ## _dirac_pixels8_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels8_c(dst, src[0], stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels16_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels16_c(dst, src[0], stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels32_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels16_c(dst , src[0] , stride, h);\
- - OPNAME ## _pixels16_c(dst+16, src[0]+16, stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels8_l2_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels8_l2(dst, src[0], src[1], stride, stride, stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels16_l2_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels16_l2(dst, src[0], src[1], stride, stride, stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels32_l2_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels16_l2(dst , src[0] , src[1] , stride, stride, stride, h);\
- - OPNAME ## _pixels16_l2(dst+16, src[0]+16, src[1]+16, stride, stride, stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels8_l4_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels8_l4(dst, src[0], src[1], src[2], src[3], stride, stride, stride, stride, stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels16_l4_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels16_l4(dst, src[0], src[1], src[2], src[3], stride, stride, stride, stride, stride, h);\
- -}\
- -void ff_ ## OPNAME ## _dirac_pixels32_l4_c(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
- -{\
- - OPNAME ## _pixels16_l4(dst , src[0] , src[1] , src[2] , src[3] , stride, stride, stride, stride, stride, h);\
- - OPNAME ## _pixels16_l4(dst+16, src[0]+16, src[1]+16, src[2]+16, src[3]+16, stride, stride, stride, stride, stride, h);\
- -}
- -DIRAC_MC(put)
- -DIRAC_MC(avg)
- -#endif
- -
- static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
- uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
- int i;
- --
- 1.7.2
Add Comment
Please, Sign In to add comment