Commit f15a53a2 authored by michael's avatar michael

dont force the halfpel filter coeffs to be retransmitted on every frame

if always_reset is set


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10460 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 11522442
...@@ -56,9 +56,8 @@ header: ...@@ -56,9 +56,8 @@ header:
qlogs qlogs
} }
if(!keyframe){ if(!keyframe){
if(!always_reset) update_mc b header_state
update_mc b header_state if(update_mc){
if(always_reset || update_mc){
for(plane=0; plane<2; plane++){ for(plane=0; plane<2; plane++){
diag_mc b header_state diag_mc b header_state
htaps/2-1 u header_state htaps/2-1 u header_state
......
...@@ -3574,8 +3574,7 @@ static void encode_header(SnowContext *s){ ...@@ -3574,8 +3574,7 @@ static void encode_header(SnowContext *s){
update_mc |= p->last_diag_mc != p->diag_mc; update_mc |= p->last_diag_mc != p->diag_mc;
update_mc |= !!memcmp(p->last_hcoeff, p->hcoeff, sizeof(p->hcoeff)); update_mc |= !!memcmp(p->last_hcoeff, p->hcoeff, sizeof(p->hcoeff));
} }
if(!s->always_reset) put_rac(&s->c, s->header_state, update_mc);
put_rac(&s->c, s->header_state, update_mc);
if(update_mc){ if(update_mc){
for(plane_index=0; plane_index<2; plane_index++){ for(plane_index=0; plane_index<2; plane_index++){
Plane *p= &s->plane[plane_index]; Plane *p= &s->plane[plane_index];
...@@ -3661,7 +3660,7 @@ static int decode_header(SnowContext *s){ ...@@ -3661,7 +3660,7 @@ static int decode_header(SnowContext *s){
} }
if(!s->keyframe){ if(!s->keyframe){
if(s->always_reset || get_rac(&s->c, s->header_state)){ if(get_rac(&s->c, s->header_state)){
for(plane_index=0; plane_index<2; plane_index++){ for(plane_index=0; plane_index<2; plane_index++){
int htaps, i, sum=0, absum=0; int htaps, i, sum=0, absum=0;
Plane *p= &s->plane[plane_index]; Plane *p= &s->plane[plane_index];
......
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