Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9138a130
Commit
9138a130
authored
Oct 17, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: use avpriv_ prefix for ff_frame_rate_tab.
It's used in lavf.
parent
773375c3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
17 deletions
+17
-17
cavsdec.c
libavcodec/cavsdec.c
+2
-2
dirac.c
libavcodec/dirac.c
+1
-1
mpeg12.c
libavcodec/mpeg12.c
+4
-4
mpeg12data.c
libavcodec/mpeg12data.c
+1
-1
mpeg12data.h
libavcodec/mpeg12data.h
+1
-1
mpeg12enc.c
libavcodec/mpeg12enc.c
+4
-4
mpegvideo_parser.c
libavcodec/mpegvideo_parser.c
+2
-2
gxf.c
libavformat/gxf.c
+2
-2
No files found.
libavcodec/cavsdec.c
View file @
9138a130
...
...
@@ -624,8 +624,8 @@ static int decode_seq_header(AVSContext *h) {
s
->
low_delay
=
get_bits1
(
&
s
->
gb
);
h
->
mb_width
=
(
s
->
width
+
15
)
>>
4
;
h
->
mb_height
=
(
s
->
height
+
15
)
>>
4
;
h
->
s
.
avctx
->
time_base
.
den
=
ff
_frame_rate_tab
[
frame_rate_code
].
num
;
h
->
s
.
avctx
->
time_base
.
num
=
ff
_frame_rate_tab
[
frame_rate_code
].
den
;
h
->
s
.
avctx
->
time_base
.
den
=
avpriv
_frame_rate_tab
[
frame_rate_code
].
num
;
h
->
s
.
avctx
->
time_base
.
num
=
avpriv
_frame_rate_tab
[
frame_rate_code
].
den
;
h
->
s
.
avctx
->
width
=
s
->
width
;
h
->
s
.
avctx
->
height
=
s
->
height
;
if
(
!
h
->
top_qp
)
...
...
libavcodec/dirac.c
View file @
9138a130
...
...
@@ -145,7 +145,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
}
if
(
source
->
frame_rate_index
>
0
)
{
if
(
source
->
frame_rate_index
<=
8
)
frame_rate
=
ff
_frame_rate_tab
[
source
->
frame_rate_index
];
frame_rate
=
avpriv
_frame_rate_tab
[
source
->
frame_rate_index
];
else
frame_rate
=
dirac_frame_rate
[
source
->
frame_rate_index
-
9
];
}
...
...
libavcodec/mpeg12.c
View file @
9138a130
...
...
@@ -1253,8 +1253,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
assert
((
avctx
->
sub_id
==
1
)
==
(
avctx
->
codec_id
==
CODEC_ID_MPEG1VIDEO
));
if
(
avctx
->
codec_id
==
CODEC_ID_MPEG1VIDEO
)
{
//MPEG-1 fps
avctx
->
time_base
.
den
=
ff
_frame_rate_tab
[
s
->
frame_rate_index
].
num
;
avctx
->
time_base
.
num
=
ff
_frame_rate_tab
[
s
->
frame_rate_index
].
den
;
avctx
->
time_base
.
den
=
avpriv
_frame_rate_tab
[
s
->
frame_rate_index
].
num
;
avctx
->
time_base
.
num
=
avpriv
_frame_rate_tab
[
s
->
frame_rate_index
].
den
;
//MPEG-1 aspect
avctx
->
sample_aspect_ratio
=
av_d2q
(
1
.
0
/
ff_mpeg1_aspect
[
s
->
aspect_ratio_info
],
255
);
avctx
->
ticks_per_frame
=
1
;
...
...
@@ -1262,8 +1262,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
//MPEG-2 fps
av_reduce
(
&
s
->
avctx
->
time_base
.
den
,
&
s
->
avctx
->
time_base
.
num
,
ff
_frame_rate_tab
[
s
->
frame_rate_index
].
num
*
s1
->
frame_rate_ext
.
num
*
2
,
ff
_frame_rate_tab
[
s
->
frame_rate_index
].
den
*
s1
->
frame_rate_ext
.
den
,
avpriv
_frame_rate_tab
[
s
->
frame_rate_index
].
num
*
s1
->
frame_rate_ext
.
num
*
2
,
avpriv
_frame_rate_tab
[
s
->
frame_rate_index
].
den
*
s1
->
frame_rate_ext
.
den
,
1
<<
30
);
avctx
->
ticks_per_frame
=
2
;
//MPEG-2 aspect
...
...
libavcodec/mpeg12data.c
View file @
9138a130
...
...
@@ -305,7 +305,7 @@ const uint8_t ff_mpeg12_mbMotionVectorTable[17][2] = {
{
0xc
,
10
},
};
const
AVRational
ff
_frame_rate_tab
[]
=
{
const
AVRational
avpriv
_frame_rate_tab
[]
=
{
{
0
,
0
},
{
24000
,
1001
},
{
24
,
1
},
...
...
libavcodec/mpeg12data.h
View file @
9138a130
...
...
@@ -48,7 +48,7 @@ extern const uint8_t ff_mpeg12_mbPatTable[64][2];
extern
const
uint8_t
ff_mpeg12_mbMotionVectorTable
[
17
][
2
];
extern
const
AVRational
ff
_frame_rate_tab
[];
extern
const
AVRational
avpriv
_frame_rate_tab
[];
extern
const
float
ff_mpeg1_aspect
[
16
];
extern
const
AVRational
ff_mpeg2_aspect
[
16
];
...
...
libavcodec/mpeg12enc.c
View file @
9138a130
...
...
@@ -120,7 +120,7 @@ static int find_frame_rate_index(MpegEncContext *s){
int64_t
d
;
for
(
i
=
1
;
i
<
14
;
i
++
)
{
int64_t
n0
=
1001LL
/
ff_frame_rate_tab
[
i
].
den
*
ff
_frame_rate_tab
[
i
].
num
*
s
->
avctx
->
time_base
.
num
;
int64_t
n0
=
1001LL
/
avpriv_frame_rate_tab
[
i
].
den
*
avpriv
_frame_rate_tab
[
i
].
num
*
s
->
avctx
->
time_base
.
num
;
int64_t
n1
=
1001LL
*
s
->
avctx
->
time_base
.
den
;
if
(
s
->
avctx
->
strict_std_compliance
>
FF_COMPLIANCE_UNOFFICIAL
&&
i
>=
9
)
break
;
...
...
@@ -211,7 +211,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
if
(
aspect_ratio
==
0
.
0
)
aspect_ratio
=
1
.
0
;
//pixel aspect 1:1 (VGA)
if
(
s
->
current_picture
.
f
.
key_frame
)
{
AVRational
framerate
=
ff
_frame_rate_tab
[
s
->
frame_rate_index
];
AVRational
framerate
=
avpriv
_frame_rate_tab
[
s
->
frame_rate_index
];
/* mpeg1 header repeated every gop */
put_header
(
s
,
SEQ_START_CODE
);
...
...
@@ -972,7 +972,7 @@ AVCodec ff_mpeg1video_encoder = {
.
init
=
encode_init
,
.
encode
=
MPV_encode_picture
,
.
close
=
MPV_encode_end
,
.
supported_framerates
=
ff
_frame_rate_tab
+
1
,
.
supported_framerates
=
avpriv
_frame_rate_tab
+
1
,
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_NONE
},
.
capabilities
=
CODEC_CAP_DELAY
|
CODEC_CAP_SLICE_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"MPEG-1 video"
),
...
...
@@ -987,7 +987,7 @@ AVCodec ff_mpeg2video_encoder = {
.
init
=
encode_init
,
.
encode
=
MPV_encode_picture
,
.
close
=
MPV_encode_end
,
.
supported_framerates
=
ff
_frame_rate_tab
+
1
,
.
supported_framerates
=
avpriv
_frame_rate_tab
+
1
,
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_YUV422P
,
PIX_FMT_NONE
},
.
capabilities
=
CODEC_CAP_DELAY
|
CODEC_CAP_SLICE_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"MPEG-2 video"
),
...
...
libavcodec/mpegvideo_parser.c
View file @
9138a130
...
...
@@ -57,8 +57,8 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
did_set_size
=
1
;
}
frame_rate_index
=
buf
[
3
]
&
0xf
;
pc
->
frame_rate
.
den
=
avctx
->
time_base
.
den
=
ff
_frame_rate_tab
[
frame_rate_index
].
num
;
pc
->
frame_rate
.
num
=
avctx
->
time_base
.
num
=
ff
_frame_rate_tab
[
frame_rate_index
].
den
;
pc
->
frame_rate
.
den
=
avctx
->
time_base
.
den
=
avpriv
_frame_rate_tab
[
frame_rate_index
].
num
;
pc
->
frame_rate
.
num
=
avctx
->
time_base
.
num
=
avpriv
_frame_rate_tab
[
frame_rate_index
].
den
;
avctx
->
bit_rate
=
((
buf
[
4
]
<<
10
)
|
(
buf
[
5
]
<<
2
)
|
(
buf
[
6
]
>>
6
))
*
400
;
avctx
->
codec_id
=
CODEC_ID_MPEG1VIDEO
;
avctx
->
sub_id
=
1
;
...
...
libavformat/gxf.c
View file @
9138a130
...
...
@@ -185,9 +185,9 @@ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info
* @return fps as AVRational, or 0 / 0 if unknown
*/
static
AVRational
fps_tag2avr
(
int32_t
fps
)
{
extern
const
AVRational
ff
_frame_rate_tab
[];
extern
const
AVRational
avpriv
_frame_rate_tab
[];
if
(
fps
<
1
||
fps
>
9
)
fps
=
9
;
return
ff
_frame_rate_tab
[
9
-
fps
];
// values have opposite order
return
avpriv
_frame_rate_tab
[
9
-
fps
];
// values have opposite order
}
/**
...
...
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