Browse Source

lavc: rename ff_find_start_code to avpriv_mpv_find_start_code

It's used in lavf.
tags/n0.9
Anton Khirnov 14 years ago
parent
commit
773375c3d0
8 changed files with 11 additions and 11 deletions
  1. +1
    -1
      libavcodec/cavsdec.c
  2. +1
    -1
      libavcodec/h264_parser.c
  3. +4
    -4
      libavcodec/mpeg12.c
  4. +1
    -1
      libavcodec/mpegvideo.c
  5. +1
    -1
      libavcodec/mpegvideo.h
  6. +1
    -1
      libavcodec/mpegvideo_parser.c
  7. +1
    -1
      libavformat/mpegtsenc.c
  8. +1
    -1
      libavformat/rtpenc_mpv.c

+ 1
- 1
libavcodec/cavsdec.c View 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;


+ 1
- 1
libavcodec/h264_parser.c View 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;


+ 4
- 4
libavcodec/mpeg12.c View 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)) {


+ 1
- 1
libavcodec/mpegvideo.c View 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);


+ 1
- 1
libavcodec/mpegvideo.h View 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);


+ 1
- 1
libavcodec/mpegvideo_parser.c View 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:


+ 1
- 1
libavformat/mpegtsenc.c View 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);


+ 1
- 1
libavformat/rtpenc_mpv.c View 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) {


Loading…
Cancel
Save