diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-20 18:00:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-20 18:00:42 +0200 |
commit | b0fdc76600a17a39b18deb7a1754246a973f3a98 (patch) | |
tree | 60bb91d079843904d38b5e7df8786a8cde37eeb0 /libavcodec/dv.c | |
parent | c2b1225c16f14a23a89c3eedbae51e6bc5667bc8 (diff) | |
parent | 650dee63c8b1e6693c6cf5983f4a5ed3f571379f (diff) | |
download | ffmpeg-b0fdc76600a17a39b18deb7a1754246a973f3a98.tar.gz |
Merge commit '650dee63c8b1e6693c6cf5983f4a5ed3f571379f'
* commit '650dee63c8b1e6693c6cf5983f4a5ed3f571379f':
dv: get rid of global non-const tables
Conflicts:
libavcodec/dv_profile.h
libavcodec/dvdec.c
libavcodec/dvenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r-- | libavcodec/dv.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index a9f64b4a8d..8c87d995c1 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -175,13 +175,12 @@ static const uint8_t dv100_qstep[16] = { static const uint8_t dv_quant_areas[4] = { 6, 21, 43, 64 }; -int ff_dv_init_dynamic_tables(const DVprofile *d) +int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const DVprofile *d) { int j,i,c,s,p; uint32_t *factor1, *factor2; const int *iweight1, *iweight2; - if (!d->work_chunks[dv_work_pool_size(d)-1].buf_offset) { p = i = 0; for (c=0; c<d->n_difchan; c++) { for (s=0; s<d->difseg_size; s++) { @@ -190,18 +189,16 @@ int ff_dv_init_dynamic_tables(const DVprofile *d) p += !(j%3); if (!(DV_PROFILE_IS_1080i50(d) && c != 0 && s == 11) && !(DV_PROFILE_IS_720p50(d) && s > 9)) { - dv_calc_mb_coordinates(d, c, s, j, &d->work_chunks[i].mb_coordinates[0]); - d->work_chunks[i++].buf_offset = p; + dv_calc_mb_coordinates(d, c, s, j, &ctx->work_chunks[i].mb_coordinates[0]); + ctx->work_chunks[i++].buf_offset = p; } p += 5; } } } - } - if (!d->idct_factor[DV_PROFILE_IS_HD(d)?8191:5631]) { - factor1 = &d->idct_factor[0]; - factor2 = &d->idct_factor[DV_PROFILE_IS_HD(d)?4096:2816]; + factor1 = &ctx->idct_factor[0]; + factor2 = &ctx->idct_factor[DV_PROFILE_IS_HD(d) ? 4096 : 2816]; if (d->height == 720) { iweight1 = &ff_dv_iweight_720_y[0]; iweight2 = &ff_dv_iweight_720_c[0]; @@ -231,7 +228,6 @@ int ff_dv_init_dynamic_tables(const DVprofile *d) } } } - } return 0; } |