| ... | ... |
@@ -663,7 +663,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, |
| 663 | 663 |
buf_ptr = buf; |
| 664 | 664 |
buf_end = buf + buf_size; |
| 665 | 665 |
for(;;) {
|
| 666 |
- buf_ptr = ff_find_start_code(buf_ptr,buf_end, &stc); |
|
| 666 |
+ buf_ptr = avpriv_mpv_find_start_code(buf_ptr,buf_end, &stc); |
|
| 667 | 667 |
if((stc & 0xFFFFFE00) || buf_ptr == buf_end) |
| 668 | 668 |
return FFMAX(0, buf_ptr - buf - s->parse_context.last_index); |
| 669 | 669 |
input_size = (buf_end - buf_ptr)*8; |
| ... | ... |
@@ -131,7 +131,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, |
| 131 | 131 |
|
| 132 | 132 |
for(;;) {
|
| 133 | 133 |
int src_length, dst_length, consumed; |
| 134 |
- buf = ff_find_start_code(buf, buf_end, &state); |
|
| 134 |
+ buf = avpriv_mpv_find_start_code(buf, buf_end, &state); |
|
| 135 | 135 |
if(buf >= buf_end) |
| 136 | 136 |
break; |
| 137 | 137 |
--buf; |
| ... | ... |
@@ -1697,7 +1697,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, |
| 1697 | 1697 |
if (avctx->hwaccel) {
|
| 1698 | 1698 |
const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */ |
| 1699 | 1699 |
int start_code = -1; |
| 1700 |
- buf_end = ff_find_start_code(buf_start + 2, *buf + buf_size, &start_code); |
|
| 1700 |
+ buf_end = avpriv_mpv_find_start_code(buf_start + 2, *buf + buf_size, &start_code); |
|
| 1701 | 1701 |
if (buf_end < *buf + buf_size) |
| 1702 | 1702 |
buf_end -= 4; |
| 1703 | 1703 |
s->mb_y = mb_y; |
| ... | ... |
@@ -1888,7 +1888,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg) |
| 1888 | 1888 |
return 0; |
| 1889 | 1889 |
|
| 1890 | 1890 |
start_code = -1; |
| 1891 |
- buf = ff_find_start_code(buf, s->gb.buffer_end, &start_code); |
|
| 1891 |
+ buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code); |
|
| 1892 | 1892 |
mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic; |
| 1893 | 1893 |
if (s->picture_structure == PICT_BOTTOM_FIELD) |
| 1894 | 1894 |
mb_y++; |
| ... | ... |
@@ -2168,7 +2168,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, |
| 2168 | 2168 |
} |
| 2169 | 2169 |
state++; |
| 2170 | 2170 |
} else {
|
| 2171 |
- i = ff_find_start_code(buf + i, buf + buf_size, &state) - buf - 1; |
|
| 2171 |
+ i = avpriv_mpv_find_start_code(buf + i, buf + buf_size, &state) - buf - 1; |
|
| 2172 | 2172 |
if (pc->frame_start_found == 0 && state >= SLICE_MIN_START_CODE && state <= SLICE_MAX_START_CODE) {
|
| 2173 | 2173 |
i++; |
| 2174 | 2174 |
pc->frame_start_found = 4; |
| ... | ... |
@@ -2259,7 +2259,7 @@ static int decode_chunks(AVCodecContext *avctx, |
| 2259 | 2259 |
for (;;) {
|
| 2260 | 2260 |
/* find next start code */ |
| 2261 | 2261 |
uint32_t start_code = -1; |
| 2262 |
- buf_ptr = ff_find_start_code(buf_ptr, buf_end, &start_code); |
|
| 2262 |
+ buf_ptr = avpriv_mpv_find_start_code(buf_ptr, buf_end, &start_code); |
|
| 2263 | 2263 |
if (start_code > 0x1ff) {
|
| 2264 | 2264 |
if (s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT) {
|
| 2265 | 2265 |
if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) {
|
| ... | ... |
@@ -122,7 +122,7 @@ const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = {
|
| 122 | 122 |
PIX_FMT_NONE |
| 123 | 123 |
}; |
| 124 | 124 |
|
| 125 |
-const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
|
|
| 125 |
+const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
|
|
| 126 | 126 |
int i; |
| 127 | 127 |
|
| 128 | 128 |
assert(p<=end); |
| ... | ... |
@@ -719,7 +719,7 @@ void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src); |
| 719 | 719 |
int MPV_lowest_referenced_row(MpegEncContext *s, int dir); |
| 720 | 720 |
void MPV_report_decode_progress(MpegEncContext *s); |
| 721 | 721 |
int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); |
| 722 |
-const uint8_t *ff_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state); |
|
| 722 |
+const uint8_t *avpriv_mpv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state); |
|
| 723 | 723 |
void ff_set_qscale(MpegEncContext * s, int qscale); |
| 724 | 724 |
|
| 725 | 725 |
void ff_er_frame_start(MpegEncContext *s); |
| ... | ... |
@@ -40,7 +40,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, |
| 40 | 40 |
|
| 41 | 41 |
while (buf < buf_end) {
|
| 42 | 42 |
start_code= -1; |
| 43 |
- buf= ff_find_start_code(buf, buf_end, &start_code); |
|
| 43 |
+ buf= avpriv_mpv_find_start_code(buf, buf_end, &start_code); |
|
| 44 | 44 |
bytes_left = buf_end - buf; |
| 45 | 45 |
switch(start_code) {
|
| 46 | 46 |
case PICTURE_START_CODE: |
| ... | ... |
@@ -950,7 +950,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 950 | 950 |
} |
| 951 | 951 |
|
| 952 | 952 |
do {
|
| 953 |
- p = ff_find_start_code(p, buf_end, &state); |
|
| 953 |
+ p = avpriv_mpv_find_start_code(p, buf_end, &state); |
|
| 954 | 954 |
//av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f); |
| 955 | 955 |
} while (p < buf_end && (state & 0x1f) != 9 && |
| 956 | 956 |
(state & 0x1f) != 5 && (state & 0x1f) != 1); |
| ... | ... |
@@ -56,7 +56,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size) |
| 56 | 56 |
r1 = buf1; |
| 57 | 57 |
while (1) {
|
| 58 | 58 |
start_code = -1; |
| 59 |
- r = ff_find_start_code(r1, end, &start_code); |
|
| 59 |
+ r = avpriv_mpv_find_start_code(r1, end, &start_code); |
|
| 60 | 60 |
if((start_code & 0xFFFFFF00) == 0x100) {
|
| 61 | 61 |
/* New start code found */ |
| 62 | 62 |
if (start_code == 0x100) {
|