Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
11 deletions
+11
-11
cavsdec.c
libavcodec/cavsdec.c
+1
-1
h264_parser.c
libavcodec/h264_parser.c
+1
-1
mpeg12.c
libavcodec/mpeg12.c
+4
-4
mpegvideo.c
libavcodec/mpegvideo.c
+1
-1
mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
mpegvideo_parser.c
libavcodec/mpegvideo_parser.c
+1
-1
mpegtsenc.c
libavformat/mpegtsenc.c
+1
-1
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,
...
@@ -663,7 +663,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
buf_ptr
=
buf
;
buf_ptr
=
buf
;
buf_end
=
buf
+
buf_size
;
buf_end
=
buf
+
buf_size
;
for
(;;)
{
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
)
if
((
stc
&
0xFFFFFE00
)
||
buf_ptr
==
buf_end
)
return
FFMAX
(
0
,
buf_ptr
-
buf
-
s
->
parse_context
.
last_index
);
return
FFMAX
(
0
,
buf_ptr
-
buf
-
s
->
parse_context
.
last_index
);
input_size
=
(
buf_end
-
buf_ptr
)
*
8
;
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,
...
@@ -131,7 +131,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
for
(;;)
{
for
(;;)
{
int
src_length
,
dst_length
,
consumed
;
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
)
if
(
buf
>=
buf_end
)
break
;
break
;
--
buf
;
--
buf
;
...
...
libavcodec/mpeg12.c
View file @
773375c3
...
@@ -1697,7 +1697,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
...
@@ -1697,7 +1697,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
if
(
avctx
->
hwaccel
)
{
if
(
avctx
->
hwaccel
)
{
const
uint8_t
*
buf_end
,
*
buf_start
=
*
buf
-
4
;
/* include start_code */
const
uint8_t
*
buf_end
,
*
buf_start
=
*
buf
-
4
;
/* include start_code */
int
start_code
=
-
1
;
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
)
if
(
buf_end
<
*
buf
+
buf_size
)
buf_end
-=
4
;
buf_end
-=
4
;
s
->
mb_y
=
mb_y
;
s
->
mb_y
=
mb_y
;
...
@@ -1888,7 +1888,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
...
@@ -1888,7 +1888,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
return
0
;
return
0
;
start_code
=
-
1
;
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
;
mb_y
=
(
start_code
-
SLICE_MIN_START_CODE
)
<<
field_pic
;
if
(
s
->
picture_structure
==
PICT_BOTTOM_FIELD
)
if
(
s
->
picture_structure
==
PICT_BOTTOM_FIELD
)
mb_y
++
;
mb_y
++
;
...
@@ -2168,7 +2168,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
...
@@ -2168,7 +2168,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
}
}
state
++
;
state
++
;
}
else
{
}
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
)
{
if
(
pc
->
frame_start_found
==
0
&&
state
>=
SLICE_MIN_START_CODE
&&
state
<=
SLICE_MAX_START_CODE
)
{
i
++
;
i
++
;
pc
->
frame_start_found
=
4
;
pc
->
frame_start_found
=
4
;
...
@@ -2259,7 +2259,7 @@ static int decode_chunks(AVCodecContext *avctx,
...
@@ -2259,7 +2259,7 @@ static int decode_chunks(AVCodecContext *avctx,
for
(;;)
{
for
(;;)
{
/* find next start code */
/* find next start code */
uint32_t
start_code
=
-
1
;
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
(
start_code
>
0x1ff
)
{
if
(
s2
->
pict_type
!=
AV_PICTURE_TYPE_B
||
avctx
->
skip_frame
<=
AVDISCARD_DEFAULT
)
{
if
(
s2
->
pict_type
!=
AV_PICTURE_TYPE_B
||
avctx
->
skip_frame
<=
AVDISCARD_DEFAULT
)
{
if
(
HAVE_THREADS
&&
(
avctx
->
active_thread_type
&
FF_THREAD_SLICE
))
{
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[] = {
...
@@ -122,7 +122,7 @@ const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = {
PIX_FMT_NONE
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
;
int
i
;
assert
(
p
<=
end
);
assert
(
p
<=
end
);
...
...
libavcodec/mpegvideo.h
View file @
773375c3
...
@@ -719,7 +719,7 @@ void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src);
...
@@ -719,7 +719,7 @@ void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src);
int
MPV_lowest_referenced_row
(
MpegEncContext
*
s
,
int
dir
);
int
MPV_lowest_referenced_row
(
MpegEncContext
*
s
,
int
dir
);
void
MPV_report_decode_progress
(
MpegEncContext
*
s
);
void
MPV_report_decode_progress
(
MpegEncContext
*
s
);
int
ff_mpeg_update_thread_context
(
AVCodecContext
*
dst
,
const
AVCodecContext
*
src
);
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_set_qscale
(
MpegEncContext
*
s
,
int
qscale
);
void
ff_er_frame_start
(
MpegEncContext
*
s
);
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,
...
@@ -40,7 +40,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
while
(
buf
<
buf_end
)
{
while
(
buf
<
buf_end
)
{
start_code
=
-
1
;
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
;
bytes_left
=
buf_end
-
buf
;
switch
(
start_code
)
{
switch
(
start_code
)
{
case
PICTURE_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)
...
@@ -950,7 +950,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
do
{
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);
//av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f);
}
while
(
p
<
buf_end
&&
(
state
&
0x1f
)
!=
9
&&
}
while
(
p
<
buf_end
&&
(
state
&
0x1f
)
!=
9
&&
(
state
&
0x1f
)
!=
5
&&
(
state
&
0x1f
)
!=
1
);
(
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)
...
@@ -56,7 +56,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
r1
=
buf1
;
r1
=
buf1
;
while
(
1
)
{
while
(
1
)
{
start_code
=
-
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
)
{
if
((
start_code
&
0xFFFFFF00
)
==
0x100
)
{
/* New start code found */
/* New start code found */
if
(
start_code
==
0x100
)
{
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