summaryrefslogtreecommitdiff
path: root/libavcodec/mimic.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r--libavcodec/mimic.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 0fe83137bb..85c6a1a96b 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -2,20 +2,20 @@
* Copyright (C) 2005 Ole André Vadla Ravnås <oleavr@gmail.com>
* Copyright (C) 2008 Ramiro Polla
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -28,6 +28,7 @@
#include "get_bits.h"
#include "bytestream.h"
#include "dsputil.h"
+#include "hpeldsp.h"
#include "thread.h"
#define MIMIC_HEADER_SIZE 20
@@ -52,6 +53,7 @@ typedef struct {
GetBitContext gb;
ScanTable scantable;
DSPContext dsp;
+ HpelDSPContext hdsp;
VLC vlc;
/* Kept in the context so multithreading can have a constant to read from */
@@ -144,6 +146,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx)
return ret;
}
ff_dsputil_init(&ctx->dsp, avctx);
+ ff_hpeldsp_init(&ctx->hdsp, avctx->flags);
ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, col_zag);
for (i = 0; i < FF_ARRAY_ELEMS(ctx->frames); i++) {
@@ -248,7 +251,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale)
value = get_bits(&ctx->gb, num_bits);
- /* Libav's IDCT behaves somewhat different from the original code, so
+ /* FFmpeg's IDCT behaves somewhat different from the original code, so
* a factor of 4 was added to the input */
coeff = vlcdec_lookup[num_bits][value];
@@ -304,7 +307,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
cur_row, 0);
p += src -
ctx->flipped_ptrs[ctx->prev_index].data[plane];
- ctx->dsp.put_pixels_tab[1][0](dst, p, stride, 8);
+ ctx->hdsp.put_pixels_tab[1][0](dst, p, stride, 8);
} else {
av_log(ctx->avctx, AV_LOG_ERROR,
"No such backreference! Buggy sample.\n");
@@ -313,7 +316,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
} else {
ff_thread_await_progress(&ctx->frames[ctx->prev_index],
cur_row, 0);
- ctx->dsp.put_pixels_tab[1][0](dst, src, stride, 8);
+ ctx->hdsp.put_pixels_tab[1][0](dst, src, stride, 8);
}
src += 8;
dst += 8;
@@ -402,10 +405,8 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
ctx->frames[ctx->cur_index].f->pict_type = is_pframe ? AV_PICTURE_TYPE_P :
AV_PICTURE_TYPE_I;
if ((res = ff_thread_get_buffer(avctx, &ctx->frames[ctx->cur_index],
- AV_GET_BUFFER_FLAG_REF)) < 0) {
- av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
+ AV_GET_BUFFER_FLAG_REF)) < 0)
return res;
- }
ctx->next_prev_index = ctx->cur_index;
ctx->next_cur_index = (ctx->cur_index - 1) & 15;