summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_h264.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@via.ecp.fr>2010-01-09 16:20:41 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2010-01-09 16:20:41 +0000
commit75dd693840e64ce3d9db7e93bbe3a87b47c4c787 (patch)
tree5da82dbc4f34d6838f281e163e76b4de6b4030a5 /libavcodec/vaapi_h264.c
parentfc53b6afee7cdf1b9125d2c5a43f3fe879d85f24 (diff)
Export get_slice_type() as ff_h264_get_slice_type().
Patch by Laurent Aimar <fenrir at videolan dot org>. Originally committed as revision 21110 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vaapi_h264.c')
-rw-r--r--libavcodec/vaapi_h264.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 265cd3f1d2..9f440c0a05 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -28,19 +28,6 @@
* structures for H.264 decoding.
*/
-/** Reconstructs bitstream slice_type. */
-static int get_slice_type(H264Context *h)
-{
- switch (h->slice_type) {
- case FF_P_TYPE: return 0;
- case FF_B_TYPE: return 1;
- case FF_I_TYPE: return 2;
- case FF_SP_TYPE: return 3;
- case FF_SI_TYPE: return 4;
- default: return -1;
- }
-}
-
/**
* Initializes an empty VA API picture.
*
@@ -323,7 +310,7 @@ static int decode_slice(AVCodecContext *avctx,
return -1;
slice_param->slice_data_bit_offset = get_bits_count(&h->s.gb) + 8; /* bit buffer started beyond nal_unit_type */
slice_param->first_mb_in_slice = (s->mb_y >> FIELD_OR_MBAFF_PICTURE) * s->mb_width + s->mb_x;
- slice_param->slice_type = get_slice_type(h);
+ slice_param->slice_type = ff_h264_get_slice_type(h);
slice_param->direct_spatial_mv_pred_flag = h->slice_type == FF_B_TYPE ? h->direct_spatial_mv_pred : 0;
slice_param->num_ref_idx_l0_active_minus1 = h->list_count > 0 ? h->ref_count[0] - 1 : 0;
slice_param->num_ref_idx_l1_active_minus1 = h->list_count > 1 ? h->ref_count[1] - 1 : 0;