mirror of https://git.ffmpeg.org/ffmpeg.git
lavc/dv: do not pass DVVideoContext to dv_calculate_mb_xy()
Pass the two variables needed from it directly. This is done in preparation to splitting DVVideoContext.
This commit is contained in:
parent
91c51dac6d
commit
69bad628ec
|
@ -107,7 +107,8 @@ static inline int dv_work_pool_size(const AVDVProfile *d)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dv_calculate_mb_xy(const DVVideoContext *s,
|
static inline void dv_calculate_mb_xy(const AVDVProfile *sys,
|
||||||
|
const uint8_t *buf,
|
||||||
const DVwork_chunk *work_chunk,
|
const DVwork_chunk *work_chunk,
|
||||||
int m, int *mb_x, int *mb_y)
|
int m, int *mb_x, int *mb_y)
|
||||||
{
|
{
|
||||||
|
@ -116,7 +117,7 @@ static inline void dv_calculate_mb_xy(const DVVideoContext *s,
|
||||||
|
|
||||||
/* We work with 720p frames split in half.
|
/* We work with 720p frames split in half.
|
||||||
* The odd half-frame (chan == 2,3) is displaced :-( */
|
* The odd half-frame (chan == 2,3) is displaced :-( */
|
||||||
if (s->sys->height == 720 && !(s->buf[1] & 0x0C))
|
if (sys->height == 720 && !(buf[1] & 0x0C))
|
||||||
/* shifting the Y coordinate down by 72/2 macro blocks */
|
/* shifting the Y coordinate down by 72/2 macro blocks */
|
||||||
*mb_y -= (*mb_y > 17) ? 18 : -72;
|
*mb_y -= (*mb_y > 17) ? 18 : -72;
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,7 +533,7 @@ retry:
|
||||||
block = &sblock[0][0];
|
block = &sblock[0][0];
|
||||||
mb = mb_data;
|
mb = mb_data;
|
||||||
for (mb_index = 0; mb_index < 5; mb_index++) {
|
for (mb_index = 0; mb_index < 5; mb_index++) {
|
||||||
dv_calculate_mb_xy(s, work_chunk, mb_index, &mb_x, &mb_y);
|
dv_calculate_mb_xy(s->sys, s->buf, work_chunk, mb_index, &mb_x, &mb_y);
|
||||||
|
|
||||||
/* idct_put'ting luminance */
|
/* idct_put'ting luminance */
|
||||||
if ((s->sys->pix_fmt == AV_PIX_FMT_YUV420P) ||
|
if ((s->sys->pix_fmt == AV_PIX_FMT_YUV420P) ||
|
||||||
|
|
|
@ -873,7 +873,7 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg)
|
||||||
p = dif = &s->buf[work_chunk->buf_offset * 80];
|
p = dif = &s->buf[work_chunk->buf_offset * 80];
|
||||||
enc_blk = &enc_blks[0];
|
enc_blk = &enc_blks[0];
|
||||||
for (mb_index = 0; mb_index < 5; mb_index++) {
|
for (mb_index = 0; mb_index < 5; mb_index++) {
|
||||||
dv_calculate_mb_xy(s, work_chunk, mb_index, &mb_x, &mb_y);
|
dv_calculate_mb_xy(s->sys, s->buf, work_chunk, mb_index, &mb_x, &mb_y);
|
||||||
|
|
||||||
qnos[mb_index] = DV_PROFILE_IS_HD(s->sys) ? 1 : 15;
|
qnos[mb_index] = DV_PROFILE_IS_HD(s->sys) ? 1 : 15;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue