Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[utils] changed OMX_ -> BS_ in BitstreamConverter

  • Loading branch information...
commit 4df639b9866be27d1f6d8fed62454dbff9e5c88b 1 parent 6645afb
@huceke huceke authored
View
6 xbmc/utils/BitstreamConverter.cpp
@@ -350,7 +350,7 @@ const int CBitstreamConverter::isom_write_avcc(AVIOContext *pb, const uint8_t *d
if (len > 6)
{
/* check for h264 start code */
- if (OMX_RB32(data) == 0x00000001 || OMX_RB24(data) == 0x000001)
+ if (BS_RB32(data) == 0x00000001 || BS_RB24(data) == 0x000001)
{
uint8_t *buf=NULL, *end, *start;
uint32_t sps_size=0, pps_size=0;
@@ -367,7 +367,7 @@ const int CBitstreamConverter::isom_write_avcc(AVIOContext *pb, const uint8_t *d
{
uint32_t size;
uint8_t nal_type;
- size = FFMIN(OMX_RB32(buf), end - buf - 4);
+ size = FFMIN(BS_RB32(buf), end - buf - 4);
buf += 4;
nal_type = buf[0] & 0x1f;
if (nal_type == 7) /* SPS */
@@ -662,7 +662,7 @@ bool CBitstreamConverter::Convert(uint8_t *pData, int iSize)
uint8_t *nal_start = pData;
while (nal_start < end)
{
- nal_size = OMX_RB24(nal_start);
+ nal_size = BS_RB24(nal_start);
m_dllAvFormat->avio_wb16(pb, nal_size);
nal_start += 3;
m_dllAvFormat->avio_write(pb, nal_start, nal_size);
View
8 xbmc/utils/BitstreamConverter.h
@@ -40,22 +40,22 @@ typedef struct {
// This is part of FFmpeg
// * License as published by the Free Software Foundation; either
// * version 2.1 of the License, or (at your option) any later version.
-#define OMX_RB16(x) \
+#define BS_RB16(x) \
((((const uint8_t*)(x))[0] << 8) | \
((const uint8_t*)(x)) [1])
-#define OMX_RB24(x) \
+#define BS_RB24(x) \
((((const uint8_t*)(x))[0] << 16) | \
(((const uint8_t*)(x))[1] << 8) | \
((const uint8_t*)(x))[2])
-#define OMX_RB32(x) \
+#define BS_RB32(x) \
((((const uint8_t*)(x))[0] << 24) | \
(((const uint8_t*)(x))[1] << 16) | \
(((const uint8_t*)(x))[2] << 8) | \
((const uint8_t*)(x))[3])
-#define OMX_WB32(p, d) { \
+#define BS_WB32(p, d) { \
((uint8_t*)(p))[3] = (d); \
((uint8_t*)(p))[2] = (d) >> 8; \
((uint8_t*)(p))[1] = (d) >> 16; \
Please sign in to comment.
Something went wrong with that request. Please try again.