Commit 5d18eaad authored by Loren Merritt's avatar Loren Merritt

h264: MBAFF interlaced decoding

Originally committed as revision 5419 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 67a82086
This diff is collapsed.
...@@ -345,6 +345,44 @@ static const uint8_t zigzag_scan8x8_cavlc[64]={ ...@@ -345,6 +345,44 @@ static const uint8_t zigzag_scan8x8_cavlc[64]={
5+5*8, 6+5*8, 6+6*8, 7+7*8, 5+5*8, 6+5*8, 6+6*8, 7+7*8,
}; };
static const uint8_t field_scan8x8[64]={
0+0*8, 0+1*8, 0+2*8, 1+0*8,
1+1*8, 0+3*8, 0+4*8, 1+2*8,
2+0*8, 1+3*8, 0+5*8, 0+6*8,
0+7*8, 1+4*8, 2+1*8, 3+0*8,
2+2*8, 1+5*8, 1+6*8, 1+7*8,
2+3*8, 3+1*8, 4+0*8, 3+2*8,
2+4*8, 2+5*8, 2+6*8, 2+7*8,
3+3*8, 4+1*8, 5+0*8, 4+2*8,
3+4*8, 3+5*8, 3+6*8, 3+7*8,
4+3*8, 5+1*8, 6+0*8, 5+2*8,
4+4*8, 4+5*8, 4+6*8, 4+7*8,
5+3*8, 6+1*8, 6+2*8, 5+4*8,
5+5*8, 5+6*8, 5+7*8, 6+3*8,
7+0*8, 7+1*8, 6+4*8, 6+5*8,
6+6*8, 6+7*8, 7+2*8, 7+3*8,
7+4*8, 7+5*8, 7+6*8, 7+7*8,
};
static const uint8_t field_scan8x8_cavlc[64]={
0+0*8, 1+1*8, 2+0*8, 0+7*8,
2+2*8, 2+3*8, 2+4*8, 3+3*8,
3+4*8, 4+3*8, 4+4*8, 5+3*8,
5+5*8, 7+0*8, 6+6*8, 7+4*8,
0+1*8, 0+3*8, 1+3*8, 1+4*8,
1+5*8, 3+1*8, 2+5*8, 4+1*8,
3+5*8, 5+1*8, 4+5*8, 6+1*8,
5+6*8, 7+1*8, 6+7*8, 7+5*8,
0+2*8, 0+4*8, 0+5*8, 2+1*8,
1+6*8, 4+0*8, 2+6*8, 5+0*8,
3+6*8, 6+0*8, 4+6*8, 6+2*8,
5+7*8, 6+4*8, 7+2*8, 7+6*8,
1+0*8, 1+2*8, 0+6*8, 3+0*8,
1+7*8, 3+2*8, 2+7*8, 4+2*8,
3+7*8, 5+2*8, 4+7*8, 5+4*8,
6+3*8, 6+5*8, 7+3*8, 7+7*8,
};
#define MB_TYPE_REF0 MB_TYPE_ACPRED //dirty but it fits in 16bit #define MB_TYPE_REF0 MB_TYPE_ACPRED //dirty but it fits in 16bit
#define MB_TYPE_8x8DCT 0x01000000 #define MB_TYPE_8x8DCT 0x01000000
#define IS_REF0(a) ((a)&MB_TYPE_REF0) #define IS_REF0(a) ((a)&MB_TYPE_REF0)
......
...@@ -487,8 +487,8 @@ static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){ ...@@ -487,8 +487,8 @@ static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){
int i; int i;
// edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264) // edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264)
CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*17*2); //(width + edge + align)*interlaced*MBsize*tolerance CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*21*2); //(width + edge + align)*interlaced*MBsize*tolerance
s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*17; s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*21;
//FIXME should be linesize instead of s->width*2 but that isnt known before get_buffer() //FIXME should be linesize instead of s->width*2 but that isnt known before get_buffer()
CHECKED_ALLOCZ(s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t)) CHECKED_ALLOCZ(s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t))
......
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