summaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_mvs.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-10-18 21:14:18 +0200
committerAnton Khirnov <anton@khirnov.net>2016-10-21 10:11:20 +0200
commit0bfdcce4d42a6e654c00ea5f9237dc987626457f (patch)
tree9ffae08f0f686aa135571427d49709012652356d /libavcodec/hevc_mvs.c
parent096a8effa3f8f3455292c958c3ed07e798def7bd (diff)
downloadffmpeg-streaming-0bfdcce4d42a6e654c00ea5f9237dc987626457f.zip
ffmpeg-streaming-0bfdcce4d42a6e654c00ea5f9237dc987626457f.tar.gz
hevc: move the SliceType enum to hevc.h
Those values are decoder-independent and are also use by the VA-API encoder.
Diffstat (limited to 'libavcodec/hevc_mvs.c')
-rw-r--r--libavcodec/hevc_mvs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index 90aff97..be32e6c 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] = {
@@ -355,7 +356,7 @@ static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0,
const int xB2_pu = xB2 >> s->ps.sps->log2_min_pu_size;
const int yB2_pu = yB2 >> s->ps.sps->log2_min_pu_size;
- 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 check_MER = 1;
int check_MER_1 = 1;
@@ -473,7 +474,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;
@@ -494,7 +495,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;
@@ -526,7 +527,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[0] = 1;
- mergecandlist[nb_merge_cand].pred_flag[1] = s->sh.slice_type == B_SLICE;
+ mergecandlist[nb_merge_cand].pred_flag[1] = s->sh.slice_type == HEVC_SLICE_B;
AV_ZERO32(mergecandlist[nb_merge_cand].mv + 0);
AV_ZERO32(mergecandlist[nb_merge_cand].mv + 1);
mergecandlist[nb_merge_cand].is_intra = 0;
OpenPOWER on IntegriCloud