Commit b5764728 authored by michael's avatar michael

edge bugfix

1-1.3% lower bitrate and +0.01 PSNR (foremen@352x288 qscale=1,8)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3414 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2b124f5e
...@@ -2642,10 +2642,18 @@ static int encode_init(AVCodecContext *avctx) ...@@ -2642,10 +2642,18 @@ static int encode_init(AVCodecContext *avctx)
static int frame_start(SnowContext *s){ static int frame_start(SnowContext *s){
AVFrame tmp; AVFrame tmp;
int w= s->avctx->width; //FIXME round up to x16 ?
int h= s->avctx->height;
if(s->keyframe) if(s->keyframe)
reset_contexts(s); reset_contexts(s);
if(s->current_picture.data[0]){
draw_edges(s->current_picture.data[0], s->current_picture.linesize[0], w , h , EDGE_WIDTH );
draw_edges(s->current_picture.data[1], s->current_picture.linesize[1], w>>1, h>>1, EDGE_WIDTH/2);
draw_edges(s->current_picture.data[2], s->current_picture.linesize[2], w>>1, h>>1, EDGE_WIDTH/2);
}
tmp= s->last_picture; tmp= s->last_picture;
s->last_picture= s->current_picture; s->last_picture= s->current_picture;
s->current_picture= tmp; s->current_picture= tmp;
......
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