Commit 03aaf2b8 authored by andoma's avatar andoma

Simplify tests for field macroblocks

patch by Jeff Downs, heydowns a borg d com



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10721 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 04bd7ac2
...@@ -1703,7 +1703,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square, ...@@ -1703,7 +1703,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
const int full_mx= mx>>2; const int full_mx= mx>>2;
const int full_my= my>>2; const int full_my= my>>2;
const int pic_width = 16*s->mb_width; const int pic_width = 16*s->mb_width;
const int pic_height = 16*s->mb_height >> (MB_MBAFF || FIELD_PICTURE); const int pic_height = 16*s->mb_height >> MB_FIELD;
if(!pic->data[0]) //FIXME this is unacceptable, some senseable error concealment must be done for missing reference frames if(!pic->data[0]) //FIXME this is unacceptable, some senseable error concealment must be done for missing reference frames
return; return;
...@@ -1727,7 +1727,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square, ...@@ -1727,7 +1727,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return; if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
if(MB_MBAFF || FIELD_PICTURE){ if(MB_FIELD){
// chroma offset when predicting from a field of opposite parity // chroma offset when predicting from a field of opposite parity
my += 2 * ((s->mb_y & 1) - (h->ref_cache[list][scan8[n]] & 1)); my += 2 * ((s->mb_y & 1) - (h->ref_cache[list][scan8[n]] & 1));
emu |= (my>>3) < 0 || (my>>3) + 8 >= (pic_height>>1); emu |= (my>>3) < 0 || (my>>3) + 8 >= (pic_height>>1);
...@@ -1762,7 +1762,7 @@ static inline void mc_part_std(H264Context *h, int n, int square, int chroma_hei ...@@ -1762,7 +1762,7 @@ static inline void mc_part_std(H264Context *h, int n, int square, int chroma_hei
dest_cb += x_offset + y_offset*h->mb_uvlinesize; dest_cb += x_offset + y_offset*h->mb_uvlinesize;
dest_cr += x_offset + y_offset*h->mb_uvlinesize; dest_cr += x_offset + y_offset*h->mb_uvlinesize;
x_offset += 8*s->mb_x; x_offset += 8*s->mb_x;
y_offset += 8*(s->mb_y >> (MB_MBAFF || FIELD_PICTURE)); y_offset += 8*(s->mb_y >> MB_FIELD);
if(list0){ if(list0){
Picture *ref= &h->ref_list[0][ h->ref_cache[0][ scan8[n] ] ]; Picture *ref= &h->ref_list[0][ h->ref_cache[0][ scan8[n] ] ];
...@@ -1795,7 +1795,7 @@ static inline void mc_part_weighted(H264Context *h, int n, int square, int chrom ...@@ -1795,7 +1795,7 @@ static inline void mc_part_weighted(H264Context *h, int n, int square, int chrom
dest_cb += x_offset + y_offset*h->mb_uvlinesize; dest_cb += x_offset + y_offset*h->mb_uvlinesize;
dest_cr += x_offset + y_offset*h->mb_uvlinesize; dest_cr += x_offset + y_offset*h->mb_uvlinesize;
x_offset += 8*s->mb_x; x_offset += 8*s->mb_x;
y_offset += 8*(s->mb_y >> (MB_MBAFF || FIELD_PICTURE)); y_offset += 8*(s->mb_y >> MB_FIELD);
if(list0 && list1){ if(list0 && list1){
/* don't optimize for luma-only case, since B-frames usually /* don't optimize for luma-only case, since B-frames usually
......
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