Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
ffmpeg
Commits
773375c3
Commit
773375c3
authored
Oct 17, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
It's used in lavf.
parent
357db4c2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
11 deletions
+11
-11
libavcodec/cavsdec.c
libavcodec/cavsdec.c
+1
-1
libavcodec/h264_parser.c
libavcodec/h264_parser.c
+1
-1
libavcodec/mpeg12.c
libavcodec/mpeg12.c
+4
-4
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+1
-1
libavcodec/mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
libavcodec/mpegvideo_parser.c
libavcodec/mpegvideo_parser.c
+1
-1
libavformat/mpegtsenc.c
libavformat/mpegtsenc.c
+1
-1
libavformat/rtpenc_mpv.c
libavformat/rtpenc_mpv.c
+1
-1
No files found.
libavcodec/cavsdec.c
View file @
773375c3
...
...
@@ -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
;
...
...
libavcodec/h264_parser.c
View file @
773375c3
...
...
@@ -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
;
...
...
libavcodec/mpeg12.c
View file @
773375c3
...
...
@@ -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
))
{
...
...
libavcodec/mpegvideo.c
View file @
773375c3
...
...
@@ -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
);
...
...
libavcodec/mpegvideo.h
View file @
773375c3
...
...
@@ -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
);
...
...
libavcodec/mpegvideo_parser.c
View file @
773375c3
...
...
@@ -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
:
...
...
libavformat/mpegtsenc.c
View file @
773375c3
...
...
@@ -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
);
...
...
libavformat/rtpenc_mpv.c
View file @
773375c3
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment