summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-24 23:45:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-24 23:45:44 +0200
commitf0a7b67a356def037d26f9460b22c86d82be2b89 (patch)
tree81f96865b5112c9299efc48cc0842cda4f21df42 /libavcodec/mpeg12.c
parentf44c816566be23e5b6c09efb1200755fd0cef214 (diff)
parentc8477df019f02a436c69e8ca54370dd5cf8eee97 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: adpcm: use sign_extend() mpeg12: fix mpeg_decode_slice context parameter type Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context" Conflicts: libavcodec/mpeg12.c libavcodec/mpeg12.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 08d46d4ef9..3bc857dc5f 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -735,9 +735,8 @@ static void exchange_uv(MpegEncContext *s)
#define MT_16X8 2
#define MT_DMV 3
-static int mpeg_decode_mb(Mpeg1Context *s1, DCTELEM block[12][64])
+static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
{
- MpegEncContext *s = &s1->mpeg_enc_ctx;
int i, j, k, cbp, val, mb_type, motion_type;
const int mb_block_count = 4 + (1 << s->chroma_format);
@@ -1658,10 +1657,9 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
* @return DECODE_SLICE_ERROR if the slice is damaged<br>
* DECODE_SLICE_OK if this slice is ok<br>
*/
-static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
+static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
const uint8_t **buf, int buf_size)
{
- MpegEncContext *s = &s1->mpeg_enc_ctx;
AVCodecContext *avctx = s->avctx;
const int lowres = s->avctx->lowres;
const int field_pic = s->picture_structure != PICT_FRAME;
@@ -1750,7 +1748,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1)
ff_xvmc_init_block(s); // set s->block
- if (mpeg_decode_mb(s1, s->block) < 0)
+ if (mpeg_decode_mb(s, s->block) < 0)
return -1;
if (s->current_picture.f.motion_val[0] && !s->encoding) { // note motion_val is normally NULL unless we want to extract the MVs
@@ -1893,7 +1891,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
uint32_t start_code;
int ret;
- ret = mpeg_decode_slice((Mpeg1Context*)s, mb_y, &buf, s->gb.buffer_end - buf);
+ ret = mpeg_decode_slice(s, mb_y, &buf, s->gb.buffer_end - buf);
emms_c();
//av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n",
//ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, s->start_mb_y, s->end_mb_y, s->error_count);
@@ -2308,7 +2306,7 @@ static int decode_chunks(AVCodecContext *avctx,
}
if (CONFIG_VDPAU && uses_vdpau(avctx))
- ff_vdpau_mpeg_picture_complete(s, buf, buf_size, s->slice_count);
+ ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count);
if (slice_end(avctx, picture)) {
@@ -2500,7 +2498,7 @@ static int decode_chunks(AVCodecContext *avctx,
}
buf_ptr += 2; // FIXME add minimum number of bytes per slice
} else {
- ret = mpeg_decode_slice(s, mb_y, &buf_ptr, input_size);
+ ret = mpeg_decode_slice(s2, mb_y, &buf_ptr, input_size);
emms_c();
if (ret < 0) {