]> git.sesse.net Git - ffmpeg/commitdiff
lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
authorAnton Khirnov <anton@khirnov.net>
Mon, 17 Oct 2011 07:51:55 +0000 (09:51 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 20 Oct 2011 19:06:58 +0000 (21:06 +0200)
It's used in lavf.

libavcodec/cavsdec.c
libavcodec/h264_parser.c
libavcodec/mpeg12.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_parser.c
libavformat/mpegtsenc.c
libavformat/rtpenc_mpv.c

index 88034068ff90f0eaf509ea4037c316844847615a..ed3538c121f854cdf37eea4ca07edc85fbaf6b0d 100644 (file)
@@ -663,7 +663,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
     buf_ptr = buf;
     buf_end = buf + buf_size;
     for(;;) {
-        buf_ptr = ff_find_start_code(buf_ptr,buf_end, &stc);
+        buf_ptr = avpriv_mpv_find_start_code(buf_ptr,buf_end, &stc);
         if((stc & 0xFFFFFE00) || buf_ptr == buf_end)
             return FFMAX(0, buf_ptr - buf - s->parse_context.last_index);
         input_size = (buf_end - buf_ptr)*8;
index 56102691a8a8ca0561ac60cca571f39671917957..52ff88b3a4fa6e2b3dceb045a48e95438725d05e 100644 (file)
@@ -131,7 +131,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
 
     for(;;) {
         int src_length, dst_length, consumed;
-        buf = ff_find_start_code(buf, buf_end, &state);
+        buf = avpriv_mpv_find_start_code(buf, buf_end, &state);
         if(buf >= buf_end)
             break;
         --buf;
index 4e95e02a9b58be73267d273b13cbe85d4fb00f80..16e27e873abe73f1957ec992c7d2e99c351545ea 100644 (file)
@@ -1697,7 +1697,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
     if (avctx->hwaccel) {
         const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */
         int start_code = -1;
-        buf_end = ff_find_start_code(buf_start + 2, *buf + buf_size, &start_code);
+        buf_end = avpriv_mpv_find_start_code(buf_start + 2, *buf + buf_size, &start_code);
         if (buf_end < *buf + buf_size)
             buf_end -= 4;
         s->mb_y = mb_y;
@@ -1888,7 +1888,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
             return 0;
 
         start_code = -1;
-        buf = ff_find_start_code(buf, s->gb.buffer_end, &start_code);
+        buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code);
         mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic;
         if (s->picture_structure == PICT_BOTTOM_FIELD)
             mb_y++;
@@ -2168,7 +2168,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
             }
             state++;
         } else {
-            i = ff_find_start_code(buf + i, buf + buf_size, &state) - buf - 1;
+            i = avpriv_mpv_find_start_code(buf + i, buf + buf_size, &state) - buf - 1;
             if (pc->frame_start_found == 0 && state >= SLICE_MIN_START_CODE && state <= SLICE_MAX_START_CODE) {
                 i++;
                 pc->frame_start_found = 4;
@@ -2259,7 +2259,7 @@ static int decode_chunks(AVCodecContext *avctx,
     for (;;) {
         /* find next start code */
         uint32_t start_code = -1;
-        buf_ptr = ff_find_start_code(buf_ptr, buf_end, &start_code);
+        buf_ptr = avpriv_mpv_find_start_code(buf_ptr, buf_end, &start_code);
         if (start_code > 0x1ff) {
             if (s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT) {
                 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) {
index cbc7d9981854230fce734b5f35914551ab03cbea..7b0cac19e367cdd004b2edfa13d436406d244f79 100644 (file)
@@ -122,7 +122,7 @@ const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = {
     PIX_FMT_NONE
 };
 
-const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
+const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
     int i;
 
     assert(p<=end);
index 7de72172b1b97fd25584b3bf6cd693e6b32aaccf..f1627c463bc88dfcdb97c156005a55e93ff0308e 100644 (file)
@@ -719,7 +719,7 @@ void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src);
 int MPV_lowest_referenced_row(MpegEncContext *s, int dir);
 void MPV_report_decode_progress(MpegEncContext *s);
 int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src);
-const uint8_t *ff_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state);
+const uint8_t *avpriv_mpv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state);
 void ff_set_qscale(MpegEncContext * s, int qscale);
 
 void ff_er_frame_start(MpegEncContext *s);
index 9688e1862548c7394f54083ca050e254ee656253..93001f7b14225d96ed1afa5e60d36f1e7a427064 100644 (file)
@@ -40,7 +40,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
 
     while (buf < buf_end) {
         start_code= -1;
-        buf= ff_find_start_code(buf, buf_end, &start_code);
+        buf= avpriv_mpv_find_start_code(buf, buf_end, &start_code);
         bytes_left = buf_end - buf;
         switch(start_code) {
         case PICTURE_START_CODE:
index d600d18b628147d165290cf13f8330e236280e0f..9f45f132470f16fde31f8f3c73c1c83a2fcd06d4 100644 (file)
@@ -950,7 +950,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
         }
 
         do {
-            p = ff_find_start_code(p, buf_end, &state);
+            p = avpriv_mpv_find_start_code(p, buf_end, &state);
             //av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f);
         } while (p < buf_end && (state & 0x1f) != 9 &&
                  (state & 0x1f) != 5 && (state & 0x1f) != 1);
index f6a5d7726a2bde76bd4a12e917c63bbac46ff563..1c67f9593bb1a1bacaa2240e4a7165dfa221a24d 100644 (file)
@@ -56,7 +56,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
             r1 = buf1;
             while (1) {
                 start_code = -1;
-                r = ff_find_start_code(r1, end, &start_code);
+                r = avpriv_mpv_find_start_code(r1, end, &start_code);
                 if((start_code & 0xFFFFFF00) == 0x100) {
                     /* New start code found */
                     if (start_code == 0x100) {