indeo3: Use hpeldsp instead of dsputil for half-pel functions
This makes the Indeo 3 decoder independent of dsputil. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
cb7ecb7563
commit
8f992dc8c7
2
configure
vendored
2
configure
vendored
@ -1578,7 +1578,7 @@ huffyuv_decoder_select="dsputil"
|
|||||||
huffyuv_encoder_select="dsputil huffman"
|
huffyuv_encoder_select="dsputil huffman"
|
||||||
iac_decoder_select="dsputil fft mdct sinewin"
|
iac_decoder_select="dsputil fft mdct sinewin"
|
||||||
imc_decoder_select="dsputil fft mdct sinewin"
|
imc_decoder_select="dsputil fft mdct sinewin"
|
||||||
indeo3_decoder_select="dsputil"
|
indeo3_decoder_select="hpeldsp"
|
||||||
interplay_video_decoder_select="dsputil"
|
interplay_video_decoder_select="dsputil"
|
||||||
jpegls_decoder_select="dsputil golomb"
|
jpegls_decoder_select="dsputil golomb"
|
||||||
jpegls_encoder_select="golomb"
|
jpegls_encoder_select="golomb"
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
#include "libavutil/imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
|
#include "hpeldsp.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
#include "indeo3data.h"
|
#include "indeo3data.h"
|
||||||
@ -81,7 +81,7 @@ typedef struct Cell {
|
|||||||
|
|
||||||
typedef struct Indeo3DecodeContext {
|
typedef struct Indeo3DecodeContext {
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
DSPContext dsp;
|
HpelDSPContext hdsp;
|
||||||
|
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
int need_resync;
|
int need_resync;
|
||||||
@ -251,19 +251,19 @@ static int copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)
|
|||||||
/* copy using 16xH blocks */
|
/* copy using 16xH blocks */
|
||||||
if (!((cell->xpos << 2) & 15) && w >= 4) {
|
if (!((cell->xpos << 2) & 15) && w >= 4) {
|
||||||
for (; w >= 4; src += 16, dst += 16, w -= 4)
|
for (; w >= 4; src += 16, dst += 16, w -= 4)
|
||||||
ctx->dsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);
|
ctx->hdsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy using 8xH blocks */
|
/* copy using 8xH blocks */
|
||||||
if (!((cell->xpos << 2) & 7) && w >= 2) {
|
if (!((cell->xpos << 2) & 7) && w >= 2) {
|
||||||
ctx->dsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h);
|
ctx->hdsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h);
|
||||||
w -= 2;
|
w -= 2;
|
||||||
src += 8;
|
src += 8;
|
||||||
dst += 8;
|
dst += 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w >= 1) {
|
if (w >= 1) {
|
||||||
ctx->dsp.put_no_rnd_pixels_tab[2][0](dst, src, plane->pitch, h);
|
ctx->hdsp.put_no_rnd_pixels_tab[2][0](dst, src, plane->pitch, h);
|
||||||
w--;
|
w--;
|
||||||
src += 4;
|
src += 4;
|
||||||
dst += 4;
|
dst += 4;
|
||||||
@ -335,7 +335,7 @@ if (*data_ptr >= last_ptr) \
|
|||||||
|
|
||||||
#define RLE_BLOCK_COPY \
|
#define RLE_BLOCK_COPY \
|
||||||
if (cell->mv_ptr || !skip_flag) \
|
if (cell->mv_ptr || !skip_flag) \
|
||||||
ctx->dsp.put_pixels_tab[2][0](dst, ref, row_offset, 4 << v_zoom)
|
ctx->hdsp.put_pixels_tab[2][0](dst, ref, row_offset, 4 << v_zoom)
|
||||||
|
|
||||||
#define RLE_BLOCK_COPY_8 \
|
#define RLE_BLOCK_COPY_8 \
|
||||||
pix64 = AV_RN64A(ref);\
|
pix64 = AV_RN64A(ref);\
|
||||||
@ -347,7 +347,7 @@ if (*data_ptr >= last_ptr) \
|
|||||||
fill_64(dst, pix64, 8, row_offset)
|
fill_64(dst, pix64, 8, row_offset)
|
||||||
|
|
||||||
#define RLE_LINES_COPY \
|
#define RLE_LINES_COPY \
|
||||||
ctx->dsp.put_pixels_tab[2][0](dst, ref, row_offset, num_lines << v_zoom)
|
ctx->hdsp.put_pixels_tab[2][0](dst, ref, row_offset, num_lines << v_zoom)
|
||||||
|
|
||||||
#define RLE_LINES_COPY_M10 \
|
#define RLE_LINES_COPY_M10 \
|
||||||
pix64 = AV_RN64A(ref);\
|
pix64 = AV_RN64A(ref);\
|
||||||
@ -1047,7 +1047,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
build_requant_tab();
|
build_requant_tab();
|
||||||
|
|
||||||
ff_dsputil_init(&ctx->dsp, avctx);
|
ff_hpeldsp_init(&ctx->hdsp, avctx->flags);
|
||||||
|
|
||||||
allocate_frame_buffers(ctx, avctx);
|
allocate_frame_buffers(ctx, avctx);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user