summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-30 08:57:54 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-30 08:57:54 +0000
commit84bd77e23ea69ec3abc0078e0dbca07a66da74fa (patch)
tree67225746f12eba3af6c3d4bd4998b01b49f73612
parent9d28b69d43fe86a28a832c598948dcf09c2b54cf (diff)
parent3cea45d69716d5afde1fa3e64eb8b7381eb38429 (diff)
downloadandroid_external_libhevc-84bd77e23ea69ec3abc0078e0dbca07a66da74fa.tar.gz
android_external_libhevc-84bd77e23ea69ec3abc0078e0dbca07a66da74fa.tar.bz2
android_external_libhevc-84bd77e23ea69ec3abc0078e0dbca07a66da74fa.zip
Snap for 4476081 from 3cea45d69716d5afde1fa3e64eb8b7381eb38429 to pi-release
Change-Id: I8625121f8add4697e047747c89d2434a77cdc651
-rw-r--r--decoder/ihevcd_parse_slice.c31
-rw-r--r--decoder/ihevcd_process_slice.c29
2 files changed, 44 insertions, 16 deletions
diff --git a/decoder/ihevcd_parse_slice.c b/decoder/ihevcd_parse_slice.c
index c1b067e..aedfbe7 100644
--- a/decoder/ihevcd_parse_slice.c
+++ b/decoder/ihevcd_parse_slice.c
@@ -3111,15 +3111,7 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
UWORD32 *pu4_nbr_pu_idx = ps_proc->pu4_pic_pu_idx_map;
WORD32 nbr_pu_idx_strd = MAX_CTB_SIZE / MIN_PU_SIZE + 2;
pu_t *ps_pu;
-
- for(row = 0; row < ctb_size / MIN_PU_SIZE; row++)
- {
- for(col = 0; col < ctb_size / MIN_PU_SIZE; col++)
- {
- pu1_pic_pu_map_ctb[row * ctb_size / MIN_PU_SIZE + col] = 0;
- }
- }
-
+ WORD32 ctb_size_in_min_pu = (ctb_size / MIN_PU_SIZE);
/* Neighbor PU idx update inside CTB */
/* 1byte per 4x4. Indicates the PU idx that 4x4 block belongs to */
@@ -3170,6 +3162,27 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
}
}
+
+ /* Updating the CTB level PU idx (Used for collocated MV pred)*/
+ {
+ WORD32 ctb_row, ctb_col, index_pic_map, index_nbr_map;
+ WORD32 first_pu_of_ctb;
+ first_pu_of_ctb = pu4_nbr_pu_idx[1 + nbr_pu_idx_strd];
+
+ index_pic_map = 0 * ctb_size_in_min_pu + 0;
+ index_nbr_map = (0 + 1) * nbr_pu_idx_strd + (0 + 1);
+
+ for(ctb_row = 0; ctb_row < ctb_size_in_min_pu; ctb_row++)
+ {
+ for(ctb_col = 0; ctb_col < ctb_size_in_min_pu; ctb_col++)
+ {
+ pu1_pic_pu_map_ctb[index_pic_map + ctb_col] = pu4_nbr_pu_idx[index_nbr_map + ctb_col]
+ - first_pu_of_ctb;
+ }
+ index_pic_map += ctb_size_in_min_pu;
+ index_nbr_map += nbr_pu_idx_strd;
+ }
+ }
}
/*************************************************/
diff --git a/decoder/ihevcd_process_slice.c b/decoder/ihevcd_process_slice.c
index f57cc31..72db2cc 100644
--- a/decoder/ihevcd_process_slice.c
+++ b/decoder/ihevcd_process_slice.c
@@ -704,14 +704,8 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
WORD32 row, col;
UWORD32 *pu4_nbr_pu_idx = ps_proc->pu4_pic_pu_idx_map;
WORD32 nbr_pu_idx_strd = MAX_CTB_SIZE / MIN_PU_SIZE + 2;
+ WORD32 ctb_size_in_min_pu = (ctb_size / MIN_PU_SIZE);
- for(row = 0; row < ctb_size / MIN_PU_SIZE; row++)
- {
- for(col = 0; col < ctb_size / MIN_PU_SIZE; col++)
- {
- pu1_pic_pu_map_ctb[row * ctb_size / MIN_PU_SIZE + col] = 0;
- }
- }
/* Neighbor PU idx update inside CTB */
/* 1byte per 4x4. Indicates the PU idx that 4x4 block belongs to */
@@ -760,6 +754,27 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
pu4_nbr_pu_idx[(ctb_size_left / MIN_PU_SIZE) * nbr_pu_idx_strd + i + 1];
}
+
+ /* Updating the CTB level PU idx (Used for collocated MV pred)*/
+ {
+ WORD32 ctb_row, ctb_col, index_pic_map, index_nbr_map;
+ WORD32 first_pu_of_ctb;
+ first_pu_of_ctb = pu4_nbr_pu_idx[1 + nbr_pu_idx_strd];
+
+ index_pic_map = 0 * ctb_size_in_min_pu + 0;
+ index_nbr_map = (0 + 1) * nbr_pu_idx_strd + (0 + 1);
+
+ for(ctb_row = 0; ctb_row < ctb_size_in_min_pu; ctb_row++)
+ {
+ for(ctb_col = 0; ctb_col < ctb_size_in_min_pu; ctb_col++)
+ {
+ pu1_pic_pu_map_ctb[index_pic_map + ctb_col] = pu4_nbr_pu_idx[index_nbr_map + ctb_col]
+ - first_pu_of_ctb;
+ }
+ index_pic_map += ctb_size_in_min_pu;
+ index_nbr_map += nbr_pu_idx_strd;
+ }
+ }
}
}
}