Commit ffdff4d7 authored by Ivan Kalvachev's avatar Ivan Kalvachev

mpeg2 chroma422/444 support, may be slower, may be faster for other codecs

Originally committed as revision 3215 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 364ec9dc
......@@ -2340,7 +2340,9 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
#endif
s->dsp.clear_blocks(s->block[0]);
if(!s->chroma_y_shift){
s->dsp.clear_blocks(s->block[6]);
}
ret = mpeg_decode_mb(s, s->block);
s->chroma_qscale= s->qscale;
......@@ -2379,8 +2381,8 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
}
s->dest[0] += 16;
s->dest[1] += 8;
s->dest[2] += 8;
s->dest[1] += 16 >> s->chroma_x_shift;
s->dest[2] += 16 >> s->chroma_x_shift;
MPV_decode_mb(s, s->block);
......
This diff is collapsed.
......@@ -670,6 +670,8 @@ typedef struct MpegEncContext {
#define CHROMA_420 1
#define CHROMA_422 2
#define CHROMA_444 3
int chroma_x_shift;//depend on pix_format, that depend on chroma_format
int chroma_y_shift;
int progressive_frame;
int full_pel[2];
......@@ -722,7 +724,7 @@ int DCT_common_init(MpegEncContext *s);
void MPV_decode_defaults(MpegEncContext *s);
int MPV_common_init(MpegEncContext *s);
void MPV_common_end(MpegEncContext *s);
void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]);
int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx);
void MPV_frame_end(MpegEncContext *s);
int MPV_encode_init(AVCodecContext *avctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment