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
0c69164f
Commit
0c69164f
authored
Apr 28, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h263: Convert function to macro
parent
59dfc2b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
17 deletions
+5
-17
h263.c
libavcodec/h263.c
+0
-13
h263.h
libavcodec/h263.h
+2
-1
h263dec.c
libavcodec/h263dec.c
+1
-1
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+1
-1
vaapi_mpeg4.c
libavcodec/vaapi_mpeg4.c
+1
-1
No files found.
libavcodec/h263.c
View file @
0c69164f
...
...
@@ -367,16 +367,3 @@ int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir,
}
return
*
mot_val
;
}
/**
* Get the GOB height based on picture height.
*/
int
ff_h263_get_gob_height
(
MpegEncContext
*
s
){
if
(
s
->
height
<=
400
)
return
1
;
else
if
(
s
->
height
<=
800
)
return
2
;
else
return
4
;
}
libavcodec/h263.h
View file @
0c69164f
...
...
@@ -40,6 +40,8 @@
#define CBPY_VLC_BITS 6
#define TEX_VLC_BITS 9
#define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)
extern
const
AVRational
ff_h263_pixel_aspect
[
16
];
extern
const
uint8_t
ff_h263_cbpy_tab
[
16
][
2
];
...
...
@@ -122,7 +124,6 @@ int av_const h263_get_picture_format(int width, int height);
void
ff_clean_h263_qscales
(
MpegEncContext
*
s
);
int
ff_h263_resync
(
MpegEncContext
*
s
);
const
uint8_t
*
ff_h263_find_resync_marker
(
const
uint8_t
*
p
,
const
uint8_t
*
end
);
int
ff_h263_get_gob_height
(
MpegEncContext
*
s
);
void
ff_h263_encode_motion
(
MpegEncContext
*
s
,
int
val
,
int
f_code
);
...
...
libavcodec/h263dec.c
View file @
0c69164f
...
...
@@ -524,7 +524,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if
(
s
->
codec_id
==
AV_CODEC_ID_H263
||
s
->
codec_id
==
AV_CODEC_ID_H263P
||
s
->
codec_id
==
AV_CODEC_ID_H263I
)
s
->
gob_index
=
ff_h263_get_gob_height
(
s
);
s
->
gob_index
=
H263_GOB_HEIGHT
(
s
->
height
);
// for skipping the frame
s
->
current_picture
.
f
->
pict_type
=
s
->
pict_type
;
...
...
libavcodec/mpegvideo_enc.c
View file @
0c69164f
...
...
@@ -2577,7 +2577,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
case
AV_CODEC_ID_H263P
:
case
AV_CODEC_ID_FLV1
:
if
(
CONFIG_H263_ENCODER
)
s
->
gob_index
=
ff_h263_get_gob_height
(
s
);
s
->
gob_index
=
H263_GOB_HEIGHT
(
s
->
height
);
break
;
case
AV_CODEC_ID_MPEG4
:
if
(
CONFIG_MPEG4_ENCODER
&&
s
->
partitioned_frame
)
...
...
libavcodec/vaapi_mpeg4.c
View file @
0c69164f
...
...
@@ -90,7 +90,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_
pic_param
->
vop_fcode_forward
=
s
->
f_code
;
pic_param
->
vop_fcode_backward
=
s
->
b_code
;
pic_param
->
vop_time_increment_resolution
=
avctx
->
framerate
.
num
;
pic_param
->
num_macroblocks_in_gob
=
s
->
mb_width
*
ff_h263_get_gob_height
(
s
);
pic_param
->
num_macroblocks_in_gob
=
s
->
mb_width
*
H263_GOB_HEIGHT
(
s
->
height
);
pic_param
->
num_gobs_in_vop
=
(
s
->
mb_width
*
s
->
mb_height
)
/
pic_param
->
num_macroblocks_in_gob
;
pic_param
->
TRB
=
s
->
pb_time
;
pic_param
->
TRD
=
s
->
pp_time
;
...
...
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