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
cdb4e730
Commit
cdb4e730
authored
Dec 04, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
Originally committed as revision 2562 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b40cd4e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
28 deletions
+23
-28
h263.c
libavcodec/h263.c
+22
-27
mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
No files found.
libavcodec/h263.c
View file @
cdb4e730
...
...
@@ -1236,7 +1236,7 @@ void h263_encode_mb(MpegEncContext * s,
}
#endif
int
ff_h263_loop_filter
(
MpegEncContext
*
s
){
void
ff_h263_loop_filter
(
MpegEncContext
*
s
){
int
qp_c
;
const
int
linesize
=
s
->
linesize
;
const
int
uvlinesize
=
s
->
uvlinesize
;
...
...
@@ -3572,7 +3572,11 @@ static void preview_obmc(MpegEncContext *s){
}
else
{
get_vlc2
(
&
s
->
gb
,
cbpy_vlc
.
table
,
CBPY_VLC_BITS
,
1
);
if
(
cbpc
&
8
)
{
skip_bits
(
&
s
->
gb
,
2
);
if
(
s
->
modified_quant
){
if
(
get_bits1
(
&
s
->
gb
))
skip_bits
(
&
s
->
gb
,
1
);
else
skip_bits
(
&
s
->
gb
,
5
);
}
else
skip_bits
(
&
s
->
gb
,
2
);
}
if
((
cbpc
&
16
)
==
0
)
{
...
...
@@ -3624,12 +3628,24 @@ end:
s
->
gb
=
gb
;
}
static
void
h263_decode_dquant
(
MpegEncContext
*
s
){
static
const
int8_t
quant_tab
[
4
]
=
{
-
1
,
-
2
,
1
,
2
};
if
(
s
->
modified_quant
){
if
(
get_bits1
(
&
s
->
gb
))
s
->
qscale
=
modified_quant_tab
[
get_bits1
(
&
s
->
gb
)][
s
->
qscale
];
else
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
}
else
s
->
qscale
+=
quant_tab
[
get_bits
(
&
s
->
gb
,
2
)];
ff_set_qscale
(
s
,
s
->
qscale
);
}
int
ff_h263_decode_mb
(
MpegEncContext
*
s
,
DCTELEM
block
[
6
][
64
])
{
int
cbpc
,
cbpy
,
i
,
cbp
,
pred_x
,
pred_y
,
mx
,
my
,
dquant
;
int16_t
*
mot_val
;
static
int8_t
quant_tab
[
4
]
=
{
-
1
,
-
2
,
1
,
2
};
const
int
xy
=
s
->
mb_x
+
s
->
mb_y
*
s
->
mb_stride
;
assert
(
!
s
->
h263_pred
);
...
...
@@ -3668,14 +3684,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
cbp
=
(
cbpc
&
3
)
|
(
cbpy
<<
2
);
if
(
dquant
)
{
if
(
s
->
modified_quant
){
if
(
get_bits1
(
&
s
->
gb
))
s
->
qscale
=
modified_quant_tab
[
get_bits1
(
&
s
->
gb
)][
s
->
qscale
];
else
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
}
else
s
->
qscale
+=
quant_tab
[
get_bits
(
&
s
->
gb
,
2
)];
ff_set_qscale
(
s
,
s
->
qscale
);
h263_decode_dquant
(
s
);
}
s
->
mv_dir
=
MV_DIR_FORWARD
;
...
...
@@ -3783,14 +3792,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
assert
(
!
s
->
mb_intra
);
if
(
IS_QUANT
(
mb_type
)){
if
(
s
->
modified_quant
){
//FIXME factorize
if
(
get_bits1
(
&
s
->
gb
))
s
->
qscale
=
modified_quant_tab
[
get_bits1
(
&
s
->
gb
)][
s
->
qscale
];
else
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
}
else
s
->
qscale
+=
quant_tab
[
get_bits
(
&
s
->
gb
,
2
)];
ff_set_qscale
(
s
,
s
->
qscale
);
h263_decode_dquant
(
s
);
}
if
(
IS_DIRECT
(
mb_type
)){
...
...
@@ -3857,14 +3859,7 @@ intra:
}
cbp
=
(
cbpc
&
3
)
|
(
cbpy
<<
2
);
if
(
dquant
)
{
if
(
s
->
modified_quant
){
if
(
get_bits1
(
&
s
->
gb
))
s
->
qscale
=
modified_quant_tab
[
get_bits1
(
&
s
->
gb
)][
s
->
qscale
];
else
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
}
else
s
->
qscale
+=
quant_tab
[
get_bits
(
&
s
->
gb
,
2
)];
ff_set_qscale
(
s
,
s
->
qscale
);
h263_decode_dquant
(
s
);
}
}
...
...
libavcodec/mpegvideo.h
View file @
cdb4e730
...
...
@@ -857,7 +857,7 @@ int h263_decode_picture_header(MpegEncContext *s);
int
ff_h263_decode_gob_header
(
MpegEncContext
*
s
);
int
ff_mpeg4_decode_picture_header
(
MpegEncContext
*
s
,
GetBitContext
*
gb
);
void
ff_h263_update_motion_val
(
MpegEncContext
*
s
);
int
ff_h263_loop_filter
(
MpegEncContext
*
s
);
void
ff_h263_loop_filter
(
MpegEncContext
*
s
);
void
ff_set_qscale
(
MpegEncContext
*
s
,
int
qscale
);
...
...
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