[FFmpeg-cvslog] hevc: eliminate an unneeded intermediate variable

Anton Khirnov git at videolan.org
Mon Nov 17 12:17:53 CET 2014


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Nov 16 08:15:42 2014 +0100| [eac3ac1fe0774b65316852616b2672702dbc3f31] | committer: Anton Khirnov

hevc: eliminate an unneeded intermediate variable

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eac3ac1fe0774b65316852616b2672702dbc3f31
---

 libavcodec/hevc.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 61ba0f0..539112b 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1647,7 +1647,6 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
     int min_cb_width     = s->sps->min_cb_width;
     int x_cb             = x0 >> log2_min_cb_size;
     int y_cb             = y0 >> log2_min_cb_size;
-    int ref_idx[2];
     int x_pu, y_pu;
     int i, j;
 
@@ -1674,8 +1673,7 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
 
         if (inter_pred_idc != PRED_L1) {
             if (s->sh.nb_refs[L0]) {
-                ref_idx[0] = ff_hevc_ref_idx_lx_decode(s, s->sh.nb_refs[L0]);
-                current_mv.ref_idx[0] = ref_idx[0];
+                current_mv.ref_idx[0]= ff_hevc_ref_idx_lx_decode(s, s->sh.nb_refs[L0]);
             }
             current_mv.pred_flag[0] = 1;
             hls_mvd_coding(s, x0, y0, 0);
@@ -1689,8 +1687,7 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
 
         if (inter_pred_idc != PRED_L0) {
             if (s->sh.nb_refs[L1]) {
-                ref_idx[1] = ff_hevc_ref_idx_lx_decode(s, s->sh.nb_refs[L1]);
-                current_mv.ref_idx[1] = ref_idx[1];
+                current_mv.ref_idx[1]= ff_hevc_ref_idx_lx_decode(s, s->sh.nb_refs[L1]);
             }
 
             if (s->sh.mvd_l1_zero_flag == 1 && inter_pred_idc == PRED_BI) {



More information about the ffmpeg-cvslog mailing list