buf_ptr = buf;
buf_end = buf + buf_size;
for(;;) {
- buf_ptr = avpriv_mpv_find_start_code(buf_ptr, buf_end, &stc);
+ buf_ptr = avpriv_find_start_code(buf_ptr, buf_end, &stc);
if ((stc & 0xFFFFFE00) || buf_ptr == buf_end)
return FFMAX(0, buf_ptr - buf);
input_size = (buf_end - buf_ptr) * 8;
#include "parser.h"
#include "h264data.h"
#include "golomb.h"
+#include "internal.h"
#include <assert.h>
for(;;) {
int src_length, dst_length, consumed;
- buf = avpriv_mpv_find_start_code(buf, buf_end, &state);
+ buf = avpriv_find_start_code(buf, buf_end, &state);
if(buf >= buf_end)
break;
--buf;
#include "libavutil/mathematics.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
+#include "config.h"
#define FF_SANE_NB_CHANNELS 63U
*/
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame);
+const uint8_t *avpriv_find_start_code(const uint8_t *restrict p,
+ const uint8_t *end,
+ uint32_t *restrict state);
+
#endif /* AVCODEC_INTERNAL_H */
if (avctx->hwaccel) {
const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */
int start_code = -1;
- buf_end = avpriv_mpv_find_start_code(buf_start + 2, *buf + buf_size, &start_code);
+ buf_end = avpriv_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;
return 0;
start_code = -1;
- buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code);
+ buf = avpriv_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++;
}
state++;
} else {
- i = avpriv_mpv_find_start_code(buf + i, buf + buf_size, &state) - buf - 1;
+ i = avpriv_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;
for (;;) {
/* find next start code */
uint32_t start_code = -1;
- buf_ptr = avpriv_mpv_find_start_code(buf_ptr, buf_end, &start_code);
+ buf_ptr = avpriv_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)) {
int ff_MPV_lowest_referenced_row(MpegEncContext *s, int dir);
void ff_MPV_report_decode_progress(MpegEncContext *s);
int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src);
-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_mpeg_er_frame_start(MpegEncContext *s);
#include "parser.h"
#include "mpegvideo.h"
+#include "internal.h"
struct MpvParseContext {
ParseContext pc;
while (buf < buf_end) {
start_code= -1;
- buf= avpriv_mpv_find_start_code(buf, buf_end, &start_code);
+ buf= avpriv_find_start_code(buf, buf_end, &start_code);
bytes_left = buf_end - buf;
switch(start_code) {
case PICTURE_START_CODE:
#include "avcodec.h"
#include "dsputil.h"
#include "libavutil/opt.h"
-#include "mpegvideo.h"
#include "thread.h"
#include "internal.h"
#include "bytestream.h"
return !!s->internal;
}
-const uint8_t *avpriv_mpv_find_start_code(const uint8_t *restrict p,
- const uint8_t *end,
- uint32_t * restrict state)
+const uint8_t *avpriv_find_start_code(const uint8_t *restrict p,
+ const uint8_t *end,
+ uint32_t * restrict state)
{
int i;
#include "libavutil/bswap.h"
#include "libavutil/crc.h"
#include "libavutil/dict.h"
+#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
-#include "libavcodec/mpegvideo.h"
+#include "libavcodec/internal.h"
#include "avformat.h"
#include "internal.h"
#include "mpegts.h"
}
do {
- p = avpriv_mpv_find_start_code(p, buf_end, &state);
+ p = avpriv_find_start_code(p, buf_end, &state);
av_dlog(s, "nal %d\n", state & 0x1f);
} while (p < buf_end && (state & 0x1f) != 9 &&
(state & 0x1f) != 5 && (state & 0x1f) != 1);
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavcodec/mpegvideo.h"
+#include "libavcodec/internal.h"
#include "avformat.h"
#include "rtpenc.h"
r1 = buf1;
while (1) {
start_code = -1;
- r = avpriv_mpv_find_start_code(r1, end, &start_code);
+ r = avpriv_find_start_code(r1, end, &start_code);
if((start_code & 0xFFFFFF00) == 0x100) {
/* New start code found */
if (start_code == 0x100) {