diff options
author | James Almer <jamrial@gmail.com> | 2017-03-24 02:02:11 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-24 02:02:11 +0300 |
commit | dc39ccdc3b88e9ec3b4aa3581798c30660d94d07 (patch) | |
tree | ea6dd9bc79af60d63fe0edd905158b3440db23d4 /libavcodec/hevc_mvs.c | |
parent | 0f4abbd4ee1c5b34068cb48ceab3515641d6e0fb (diff) | |
parent | 0bfdcce4d42a6e654c00ea5f9237dc987626457f (diff) |
Merge commit '0bfdcce4d42a6e654c00ea5f9237dc987626457f'
* commit '0bfdcce4d42a6e654c00ea5f9237dc987626457f':
hevc: move the SliceType enum to hevc.h
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevc_mvs.c')
-rw-r--r-- | libavcodec/hevc_mvs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c index edad491406..a8f7876b59 100644 --- a/libavcodec/hevc_mvs.c +++ b/libavcodec/hevc_mvs.c @@ -21,6 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "hevc.h" #include "hevcdec.h" static const uint8_t l0_l1_cand_idx[12][2] = { @@ -315,7 +316,7 @@ static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0, const int xB2 = x0 - 1; const int yB2 = y0 - 1; - const int nb_refs = (s->sh.slice_type == P_SLICE) ? + const int nb_refs = (s->sh.slice_type == HEVC_SLICE_P) ? s->sh.nb_refs[0] : FFMIN(s->sh.nb_refs[0], s->sh.nb_refs[1]); int zero_idx = 0; @@ -411,7 +412,7 @@ static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0, Mv mv_l0_col = { 0 }, mv_l1_col = { 0 }; int available_l0 = temporal_luma_motion_vector(s, x0, y0, nPbW, nPbH, 0, &mv_l0_col, 0); - int available_l1 = (s->sh.slice_type == B_SLICE) ? + int available_l1 = (s->sh.slice_type == HEVC_SLICE_B) ? temporal_luma_motion_vector(s, x0, y0, nPbW, nPbH, 0, &mv_l1_col, 1) : 0; @@ -430,7 +431,7 @@ static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0, nb_orig_merge_cand = nb_merge_cand; // combined bi-predictive merge candidates (applies for B slices) - if (s->sh.slice_type == B_SLICE && nb_orig_merge_cand > 1 && + if (s->sh.slice_type == HEVC_SLICE_B && nb_orig_merge_cand > 1 && nb_orig_merge_cand < s->sh.max_num_merge_cand) { int comb_idx = 0; @@ -459,7 +460,7 @@ static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0, // append Zero motion vector candidates while (nb_merge_cand < s->sh.max_num_merge_cand) { - mergecandlist[nb_merge_cand].pred_flag = PF_L0 + ((s->sh.slice_type == B_SLICE) << 1); + mergecandlist[nb_merge_cand].pred_flag = PF_L0 + ((s->sh.slice_type == HEVC_SLICE_B) << 1); AV_ZERO32(mergecandlist[nb_merge_cand].mv + 0); AV_ZERO32(mergecandlist[nb_merge_cand].mv + 1); mergecandlist[nb_merge_cand].ref_idx[0] = zero_idx < nb_refs ? zero_idx : 0; |