mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 13:35:13 +00:00
Merge commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a'
* commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a': intrax8: Keep a reference to the context idctdsp Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
commit
83e0b1b1d7
1
configure
vendored
1
configure
vendored
@ -2261,6 +2261,7 @@ faandct_deps="faan fdctdsp"
|
||||
faanidct_deps="faan idctdsp"
|
||||
h264dsp_select="startcode"
|
||||
frame_thread_encoder_deps="encoders threads"
|
||||
intrax8_select="idctdsp"
|
||||
mdct_select="fft"
|
||||
me_cmp_select="fdctdsp idctdsp pixblockdsp"
|
||||
mpeg_er_select="error_resilience"
|
||||
|
@ -739,12 +739,14 @@ static void x8_init_block_index(IntraX8Context *w, AVFrame *frame, int mb_y)
|
||||
w->dest[2] += (mb_y & (~1)) * uvlinesize << 2;
|
||||
}
|
||||
|
||||
av_cold int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
|
||||
av_cold int ff_intrax8_common_init(IntraX8Context *w, IDCTDSPContext *idsp,
|
||||
MpegEncContext *const s)
|
||||
{
|
||||
int ret = x8_vlc_init();
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
w->idsp = *idsp;
|
||||
w->s = s;
|
||||
|
||||
//two rows, 2 blocks per cannon mb
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "get_bits.h"
|
||||
#include "mpegvideo.h"
|
||||
#include "idctdsp.h"
|
||||
#include "intrax8dsp.h"
|
||||
#include "wmv2dsp.h"
|
||||
|
||||
@ -40,6 +41,7 @@ typedef struct IntraX8Context {
|
||||
//set by the caller codec
|
||||
MpegEncContext * s;
|
||||
IntraX8DSPContext dsp;
|
||||
IDCTDSPContext idsp;
|
||||
int quant;
|
||||
int dquant;
|
||||
int qsum;
|
||||
@ -64,10 +66,12 @@ typedef struct IntraX8Context {
|
||||
* Initialize IntraX8 frame decoder.
|
||||
* Requires valid MpegEncContext with valid s->mb_width before calling.
|
||||
* @param w pointer to IntraX8Context
|
||||
* @param idsp pointer to IDCTDSPContext
|
||||
* @param s pointer to MpegEncContext of the parent codec
|
||||
* @return 0 on success, a negative AVERROR value on error
|
||||
*/
|
||||
int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s);
|
||||
int ff_intrax8_common_init(IntraX8Context *w, IDCTDSPContext *idsp,
|
||||
MpegEncContext *const s);
|
||||
|
||||
/**
|
||||
* Destroy IntraX8 frame structure.
|
||||
|
@ -387,7 +387,7 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
ret = ff_intrax8_common_init(&v->x8, s);
|
||||
ret = ff_intrax8_common_init(&v->x8, &s->idsp, s);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
|
@ -466,7 +466,7 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
|
||||
|
||||
ff_wmv2_common_init(w);
|
||||
|
||||
return ff_intrax8_common_init(&w->x8, &w->s);
|
||||
return ff_intrax8_common_init(&w->x8, &w->s.idsp, &w->s);
|
||||
}
|
||||
|
||||
static av_cold int wmv2_decode_end(AVCodecContext *avctx)
|
||||
|
Loading…
Reference in New Issue
Block a user