summaryrefslogtreecommitdiff
path: root/libavcodec/lagarith.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-27 23:07:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-27 23:16:06 +0200
commite2abc0d5cacc22aa900de8ac26160ea1b786a7b5 (patch)
tree536e4539c573752b2b446d2c8ef17d9d62927815 /libavcodec/lagarith.c
parent43c57dbe14545d13dbfd8aae341b45514e8bcfbb (diff)
parent0d439fbede03854eac8a978cccf21a3425a3c82d (diff)
Merge commit '0d439fbede03854eac8a978cccf21a3425a3c82d'
* commit '0d439fbede03854eac8a978cccf21a3425a3c82d': dsputil: Split off HuffYUV decoding bits into their own context Conflicts: configure libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/huffyuv.h libavcodec/huffyuvdec.c libavcodec/lagarith.c libavcodec/vble.c libavcodec/x86/Makefile libavcodec/x86/dsputil.asm libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lagarith.c')
-rw-r--r--libavcodec/lagarith.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 6571baf2e7..a08d7fde1b 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -30,7 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "mathops.h"
-#include "dsputil.h"
+#include "huffyuvdsp.h"
#include "lagarithrac.h"
#include "thread.h"
@@ -50,7 +50,7 @@ enum LagarithFrameType {
typedef struct LagarithContext {
AVCodecContext *avctx;
- DSPContext dsp;
+ HuffYUVDSPContext hdsp;
int zeros; /**< number of consecutive zero bytes encountered */
int zeros_rem; /**< number of zero bytes remaining to output */
uint8_t *rgb_planes;
@@ -233,7 +233,7 @@ static void add_lag_median_prediction(uint8_t *dst, uint8_t *src1,
uint8_t *diff, int w, int *left,
int *left_top)
{
- /* This is almost identical to add_hfyu_median_prediction in dsputil.h.
+ /* This is almost identical to add_hfyu_median_pred in huffyuvdsp.h.
* However the &0xFF on the gradient predictor yealds incorrect output
* for lagarith.
*/
@@ -260,8 +260,7 @@ static void lag_pred_line(LagarithContext *l, uint8_t *buf,
if (!line) {
/* Left prediction only for first line */
- L = l->dsp.add_hfyu_left_prediction(buf, buf,
- width, 0);
+ L = l->hdsp.add_hfyu_left_pred(buf, buf, width, 0);
} else {
/* Left pixel is actually prev_row[width] */
L = buf[width - stride - 1];
@@ -290,7 +289,7 @@ static void lag_pred_line_yuy2(LagarithContext *l, uint8_t *buf,
L= buf[0];
if (is_luma)
buf[0] = 0;
- l->dsp.add_hfyu_left_prediction(buf, buf, width, 0);
+ l->hdsp.add_hfyu_left_pred(buf, buf, width, 0);
if (is_luma)
buf[0] = L;
return;
@@ -313,8 +312,7 @@ static void lag_pred_line_yuy2(LagarithContext *l, uint8_t *buf,
} else {
TL = buf[width - (2 * stride) - 1];
L = buf[width - stride - 1];
- l->dsp.add_hfyu_median_prediction(buf, buf - stride, buf, width,
- &L, &TL);
+ l->hdsp.add_hfyu_median_pred(buf, buf - stride, buf, width, &L, &TL);
}
}
@@ -727,7 +725,7 @@ static av_cold int lag_decode_init(AVCodecContext *avctx)
LagarithContext *l = avctx->priv_data;
l->avctx = avctx;
- ff_dsputil_init(&l->dsp, avctx);
+ ff_huffyuvdsp_init(&l->hdsp);
return 0;
}