Commit c009df3f authored by Michael Niedermayer's avatar Michael Niedermayer

make ff_emulated_edge_mc() independant of MpegEncContext

Originally committed as revision 1971 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent cebe4432
......@@ -1895,7 +1895,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
|| full_my < 0-extra_height
|| full_mx + 16/*FIXME*/ > s->width + extra_width
|| full_my + 16/*FIXME*/ > s->height + extra_height){
ff_emulated_edge_mc(s, src_y - 2 - 2*s->linesize, s->linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, s->width, s->height);
ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*s->linesize, s->linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, s->width, s->height);
src_y= s->edge_emu_buffer + 2 + 2*s->linesize;
emu=1;
}
......@@ -1908,13 +1908,13 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
if(s->flags&CODEC_FLAG_GRAY) return;
if(emu){
ff_emulated_edge_mc(s, src_cb, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
ff_emulated_edge_mc(s->edge_emu_buffer, src_cb, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
src_cb= s->edge_emu_buffer;
}
chroma_op(dest_cb, src_cb, s->uvlinesize, chroma_height, mx&7, my&7);
if(emu){
ff_emulated_edge_mc(s, src_cr, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
ff_emulated_edge_mc(s->edge_emu_buffer, src_cr, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
src_cr= s->edge_emu_buffer;
}
chroma_op(dest_cr, src_cr, s->uvlinesize, chroma_height, mx&7, my&7);
......
This diff is collapsed.
......@@ -708,7 +708,7 @@ void ff_copy_bits(PutBitContext *pb, uint8_t *src, int length);
void ff_clean_intra_table_entries(MpegEncContext *s);
void ff_init_scantable(uint8_t *, ScanTable *st, const uint8_t *src_scantable);
void ff_draw_horiz_band(MpegEncContext *s, int y, int h);
void ff_emulated_edge_mc(MpegEncContext *s, uint8_t *src, int linesize, int block_w, int block_h,
void ff_emulated_edge_mc(uint8_t *buf, uint8_t *src, int linesize, int block_w, int block_h,
int src_x, int src_y, int w, int h);
#define END_NOT_FOUND -100
int ff_combine_frame( MpegEncContext *s, int next, uint8_t **buf, int *buf_size);
......@@ -877,7 +877,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
DCTELEM block[6][64],
int motion_x, int motion_y);
/* mjpegenc.c */
/* mjpeg.c */
int mjpeg_init(MpegEncContext *s);
void mjpeg_close(MpegEncContext *s);
void mjpeg_encode_mb(MpegEncContext *s,
......
......@@ -287,7 +287,7 @@ static inline void svq3_mc_dir_part (MpegEncContext *s, int x, int y,
src = s->last_picture.data[0] + mx + my*s->linesize;
if (emu) {
ff_emulated_edge_mc (s, src, s->linesize, (width + 1), (height + 1),
ff_emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, (width + 1), (height + 1),
mx, my, s->h_edge_pos, s->v_edge_pos);
src = s->edge_emu_buffer;
}
......@@ -308,7 +308,7 @@ static inline void svq3_mc_dir_part (MpegEncContext *s, int x, int y,
src = s->last_picture.data[i] + mx + my*s->uvlinesize;
if (emu) {
ff_emulated_edge_mc (s, src, s->uvlinesize, (width + 1), (height + 1),
ff_emulated_edge_mc(s->edge_emu_buffer, src, s->uvlinesize, (width + 1), (height + 1),
mx, my, (s->h_edge_pos >> 1), (s->v_edge_pos >> 1));
src = s->edge_emu_buffer;
}
......
......@@ -650,7 +650,7 @@ void ff_mspel_motion(MpegEncContext *s,
if(s->flags&CODEC_FLAG_EMU_EDGE){
if(src_x<1 || src_y<1 || src_x + 17 >= s->h_edge_pos
|| src_y + h+1 >= v_edge_pos){
ff_emulated_edge_mc(s, ptr - 1 - s->linesize, s->linesize, 19, 19,
ff_emulated_edge_mc(s->emu_edge_buffer, ptr - 1 - s->linesize, s->linesize, 19, 19,
src_x-1, src_y-1, s->h_edge_pos, s->v_edge_pos);
ptr= s->edge_emu_buffer + 1 + s->linesize;
emu=1;
......@@ -691,7 +691,7 @@ void ff_mspel_motion(MpegEncContext *s,
offset = (src_y * uvlinesize) + src_x;
ptr = ref_picture[1] + offset;
if(emu){
ff_emulated_edge_mc(s, ptr, s->uvlinesize, 9, 9,
ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
ptr= s->edge_emu_buffer;
}
......@@ -699,7 +699,7 @@ void ff_mspel_motion(MpegEncContext *s,
ptr = ref_picture[2] + offset;
if(emu){
ff_emulated_edge_mc(s, ptr, s->uvlinesize, 9, 9,
ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
ptr= s->edge_emu_buffer;
}
......
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