diff options
author | James Almer <jamrial@gmail.com> | 2017-01-07 19:04:39 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-01-12 22:53:04 -0300 |
commit | 5ac1dd8e231987c022a860c6b1961b038a84b613 (patch) | |
tree | 594a5e75a7b36a95985fef7779071900a763266a /libavcodec/utvideodec.c | |
parent | 3222786c5ad9f6ca94ca4cd80a4329a276d65aaa (diff) | |
download | ffmpeg-5ac1dd8e231987c022a860c6b1961b038a84b613.tar.gz |
lossless_videodsp: move shared functions from huffyuvdsp
Several codecs other than huffyuv use them.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/utvideodec.c')
-rw-r--r-- | libavcodec/utvideodec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 23b8202030..7d1d35b76a 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -396,7 +396,7 @@ static void restore_median_planar(UtvideoContext *c, uint8_t *src, int stride, // first line - left neighbour prediction bsrc[0] += 0x80; - c->hdspdec.add_hfyu_left_pred(bsrc, bsrc, width, 0); + c->llviddsp.add_left_pred(bsrc, bsrc, width, 0); bsrc += stride; if (slice_height <= 1) continue; @@ -413,7 +413,7 @@ static void restore_median_planar(UtvideoContext *c, uint8_t *src, int stride, bsrc += stride; // the rest of lines use continuous median prediction for (j = 2; j < slice_height; j++) { - c->hdspdec.add_hfyu_median_pred(bsrc, bsrc - stride, + c->llviddsp.add_median_pred(bsrc, bsrc - stride, bsrc, width, &A, &B); bsrc += stride; } @@ -446,8 +446,8 @@ static void restore_median_planar_il(UtvideoContext *c, uint8_t *src, int stride // first line - left neighbour prediction bsrc[0] += 0x80; - A = c->hdspdec.add_hfyu_left_pred(bsrc, bsrc, width, 0); - c->hdspdec.add_hfyu_left_pred(bsrc + stride, bsrc + stride, width, A); + A = c->llviddsp.add_left_pred(bsrc, bsrc, width, 0); + c->llviddsp.add_left_pred(bsrc + stride, bsrc + stride, width, A); bsrc += stride2; if (slice_height <= 1) continue; @@ -461,14 +461,14 @@ static void restore_median_planar_il(UtvideoContext *c, uint8_t *src, int stride C = B; A = bsrc[i]; } - c->hdspdec.add_hfyu_median_pred(bsrc + stride, bsrc - stride, + c->llviddsp.add_median_pred(bsrc + stride, bsrc - stride, bsrc + stride, width, &A, &B); bsrc += stride2; // the rest of lines use continuous median prediction for (j = 2; j < slice_height; j++) { - c->hdspdec.add_hfyu_median_pred(bsrc, bsrc - stride2, + c->llviddsp.add_median_pred(bsrc, bsrc - stride2, bsrc, width, &A, &B); - c->hdspdec.add_hfyu_median_pred(bsrc + stride, bsrc - stride, + c->llviddsp.add_median_pred(bsrc + stride, bsrc - stride, bsrc + stride, width, &A, &B); bsrc += stride2; } @@ -827,7 +827,7 @@ static av_cold int decode_init(AVCodecContext *avctx) c->avctx = avctx; ff_bswapdsp_init(&c->bdsp); - ff_huffyuvdsp_init(&c->hdspdec); + ff_llviddsp_init(&c->llviddsp, avctx); if (avctx->extradata_size >= 16) { av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d.%d.%d\n", |