summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-10-16 16:46:17 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-11-16 16:50:30 +0100
commit8c0cff131a6cf4fd1f7ffbb6eed3de22035628d1 (patch)
tree6fecb525642125eb644f829621e7a176199b2080 /gst-libs/gst
parentde0ab46fd7b9fadf8d5d6a2067c549719e2c3b58 (diff)
h264: drop extra code covered by built-in codecparsers.
GstH264SliceHdr.n_emulation_prevention_bytes is bound to exist now that a newer version of codecparsers/ are used if the system provided one is now recent enough to have those required extensions.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index d0ff1ec8..9dfd38d5 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -1975,37 +1975,12 @@ decode_picture_end(GstVaapiDecoderH264 *decoder, GstVaapiPictureH264 *picture)
return TRUE;
}
-#ifndef HAVE_GST_H264_SLICE_HDR_EPB_COUNT
-static guint
-get_epb_count(const guint8 *buf, guint buf_size, guint header_size)
-{
- guint i, n = 0;
-
- if (buf_size > header_size)
- buf_size = header_size;
-
- for (i = 2; i < buf_size; i++) {
- if (!buf[i - 2] && !buf[i - 1] && buf[i] == 0x03)
- i += 2, n++;
- }
- return n;
-}
-#endif
-
static inline guint
get_slice_data_bit_offset(GstH264SliceHdr *slice_hdr, GstH264NalUnit *nalu)
{
guint epb_count;
-#ifdef HAVE_GST_H264_SLICE_HDR_EPB_COUNT
epb_count = slice_hdr->n_emulation_prevention_bytes;
-#else
- epb_count = get_epb_count(
- nalu->data + nalu->offset,
- nalu->size,
- slice_hdr->header_size / 8
- );
-#endif
return 8 /* nal_unit_type */ + slice_hdr->header_size - epb_count * 8;
}