]> granicus.if.org Git - libvpx/commitdiff
Remove unnecessary backup token stream pointer
authorJingning Han <jingning@google.com>
Thu, 16 Apr 2015 23:40:34 +0000 (16:40 -0700)
committerJingning Han <jingning@google.com>
Thu, 16 Apr 2015 23:44:44 +0000 (16:44 -0700)
When the tokenization is not taking effect, the tokenization
pointer remains unchanged. No need to re-assign the backup pointer
value.

Change-Id: I58fe1f6285aa3b4a88ceb864c11d5de8ac6235dd

vp9/encoder/vp9_tokenize.c

index 799109b51af7c6f0e98b7cbb61e171377348ae67..9d2595b13b9e1ead18fb4c368a7e42c5e3d1c448 100644 (file)
@@ -613,7 +613,6 @@ void vp9_tokenize_sb(VP9_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
   MACROBLOCK *const x = &td->mb;
   MACROBLOCKD *const xd = &x->e_mbd;
   MB_MODE_INFO *const mbmi = &xd->mi[0].src_mi->mbmi;
-  TOKENEXTRA *t_backup = *t;
   const int ctx = vp9_get_skip_context(xd);
   const int skip_inc = !vp9_segfeature_active(&cm->seg, mbmi->segment_id,
                                               SEG_LVL_SKIP);
@@ -622,8 +621,6 @@ void vp9_tokenize_sb(VP9_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
     if (!dry_run)
       td->counts->skip[ctx][1] += skip_inc;
     reset_skip_context(xd, bsize);
-    if (dry_run)
-      *t = t_backup;
     return;
   }
 
@@ -632,6 +629,5 @@ void vp9_tokenize_sb(VP9_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
     vp9_foreach_transformed_block(xd, bsize, tokenize_b, &arg);
   } else {
     vp9_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg);
-    *t = t_backup;
   }
 }