mirror of https://git.ffmpeg.org/ffmpeg.git
diracdec: don't call ff_emulated_edge_mc_8 directly
Use the videodsp function pointer instead. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f00bb086cb
commit
b67a0e99ee
|
@ -38,7 +38,7 @@
|
||||||
#include "dirac_dwt.h"
|
#include "dirac_dwt.h"
|
||||||
#include "dirac.h"
|
#include "dirac.h"
|
||||||
#include "diracdsp.h"
|
#include "diracdsp.h"
|
||||||
#include "videodsp.h" // for ff_emulated_edge_mc_8
|
#include "videodsp.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The spec limits the number of wavelet decompositions to 4 for both
|
* The spec limits the number of wavelet decompositions to 4 for both
|
||||||
|
@ -73,8 +73,6 @@
|
||||||
*/
|
*/
|
||||||
#define DELAYED_PIC_REF 4
|
#define DELAYED_PIC_REF 4
|
||||||
|
|
||||||
#define ff_emulated_edge_mc ff_emulated_edge_mc_8 /* Fix: change the calls to this function regarding bit depth */
|
|
||||||
|
|
||||||
#define CALC_PADDING(size, depth) \
|
#define CALC_PADDING(size, depth) \
|
||||||
(((size + (1 << depth) - 1) >> depth) << depth)
|
(((size + (1 << depth) - 1) >> depth) << depth)
|
||||||
|
|
||||||
|
@ -138,6 +136,7 @@ typedef struct Plane {
|
||||||
typedef struct DiracContext {
|
typedef struct DiracContext {
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
MpegvideoEncDSPContext mpvencdsp;
|
MpegvideoEncDSPContext mpvencdsp;
|
||||||
|
VideoDSPContext vdsp;
|
||||||
DiracDSPContext diracdsp;
|
DiracDSPContext diracdsp;
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
dirac_source_params source;
|
dirac_source_params source;
|
||||||
|
@ -425,6 +424,7 @@ static av_cold int dirac_decode_init(AVCodecContext *avctx)
|
||||||
|
|
||||||
ff_diracdsp_init(&s->diracdsp);
|
ff_diracdsp_init(&s->diracdsp);
|
||||||
ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
|
ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
|
||||||
|
ff_videodsp_init(&s->vdsp, 8);
|
||||||
|
|
||||||
for (i = 0; i < MAX_FRAMES; i++) {
|
for (i = 0; i < MAX_FRAMES; i++) {
|
||||||
s->all_frames[i].avframe = av_frame_alloc();
|
s->all_frames[i].avframe = av_frame_alloc();
|
||||||
|
@ -1451,7 +1451,7 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
|
||||||
y + p->yblen > p->height+EDGE_WIDTH/2 ||
|
y + p->yblen > p->height+EDGE_WIDTH/2 ||
|
||||||
x < 0 || y < 0) {
|
x < 0 || y < 0) {
|
||||||
for (i = 0; i < nplanes; i++) {
|
for (i = 0; i < nplanes; i++) {
|
||||||
ff_emulated_edge_mc(s->edge_emu_buffer[i], src[i],
|
s->vdsp.emulated_edge_mc(s->edge_emu_buffer[i], src[i],
|
||||||
p->stride, p->stride,
|
p->stride, p->stride,
|
||||||
p->xblen, p->yblen, x, y,
|
p->xblen, p->yblen, x, y,
|
||||||
p->width+EDGE_WIDTH/2, p->height+EDGE_WIDTH/2);
|
p->width+EDGE_WIDTH/2, p->height+EDGE_WIDTH/2);
|
||||||
|
|
Loading…
Reference in New Issue