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
57739332
Commit
57739332
authored
Feb 20, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
Helps in decoupling this code from mpegvideo.
parent
68127e1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
intrax8.c
libavcodec/intrax8.c
+3
-2
intrax8.h
libavcodec/intrax8.h
+5
-2
vc1_block.c
libavcodec/vc1_block.c
+2
-1
wmv2dec.c
libavcodec/wmv2dec.c
+2
-1
No files found.
libavcodec/intrax8.c
View file @
57739332
...
@@ -712,7 +712,7 @@ block_placed:
...
@@ -712,7 +712,7 @@ block_placed:
if
(
!
chroma
)
if
(
!
chroma
)
x8_update_predictions
(
w
,
w
->
orient
,
n
);
x8_update_predictions
(
w
,
w
->
orient
,
n
);
if
(
s
->
loop_
filter
)
{
if
(
w
->
loop
filter
)
{
uint8_t
*
ptr
=
w
->
dest
[
chroma
];
uint8_t
*
ptr
=
w
->
dest
[
chroma
];
int
linesize
=
s
->
current_picture
.
f
->
linesize
[
!!
chroma
];
int
linesize
=
s
->
current_picture
.
f
->
linesize
[
!!
chroma
];
...
@@ -776,7 +776,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
...
@@ -776,7 +776,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
}
}
int
ff_intrax8_decode_picture
(
IntraX8Context
*
const
w
,
int
dquant
,
int
ff_intrax8_decode_picture
(
IntraX8Context
*
const
w
,
int
dquant
,
int
quant_offset
)
int
quant_offset
,
int
loopfilter
)
{
{
MpegEncContext
*
const
s
=
w
->
s
;
MpegEncContext
*
const
s
=
w
->
s
;
int
mb_xy
;
int
mb_xy
;
...
@@ -786,6 +786,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
...
@@ -786,6 +786,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
w
->
dquant
=
dquant
;
w
->
dquant
=
dquant
;
w
->
quant
=
dquant
>>
1
;
w
->
quant
=
dquant
>>
1
;
w
->
qsum
=
quant_offset
;
w
->
qsum
=
quant_offset
;
w
->
loopfilter
=
loopfilter
;
w
->
divide_quant_dc_luma
=
((
1
<<
16
)
+
(
w
->
quant
>>
1
))
/
w
->
quant
;
w
->
divide_quant_dc_luma
=
((
1
<<
16
)
+
(
w
->
quant
>>
1
))
/
w
->
quant
;
if
(
w
->
quant
<
5
)
{
if
(
w
->
quant
<
5
)
{
...
...
libavcodec/intrax8.h
View file @
57739332
...
@@ -42,6 +42,7 @@ typedef struct IntraX8Context {
...
@@ -42,6 +42,7 @@ typedef struct IntraX8Context {
int
quant
;
int
quant
;
int
dquant
;
int
dquant
;
int
qsum
;
int
qsum
;
int
loopfilter
;
// calculated per frame
// calculated per frame
int
quant_dc_chroma
;
int
quant_dc_chroma
;
...
@@ -78,14 +79,16 @@ void ff_intrax8_common_end(IntraX8Context *w);
...
@@ -78,14 +79,16 @@ void ff_intrax8_common_end(IntraX8Context *w);
/**
/**
* Decode single IntraX8 frame.
* Decode single IntraX8 frame.
* The parent codec must fill s->
loopfilter and s->
gb (bitstream).
* The parent codec must fill s->gb (bitstream).
* The parent codec must call ff_mpv_frame_start() before calling this function.
* The parent codec must call ff_mpv_frame_start() before calling this function.
* The parent codec must call ff_mpv_frame_end() after calling this function.
* The parent codec must call ff_mpv_frame_end() after calling this function.
* This function does not use ff_mpv_decode_mb().
* This function does not use ff_mpv_decode_mb().
* @param w pointer to IntraX8Context
* @param w pointer to IntraX8Context
* @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
* @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
* @param quant_offset offset away from zero
* @param quant_offset offset away from zero
* @param loopfilter enable filter after decoding a block
*/
*/
int
ff_intrax8_decode_picture
(
IntraX8Context
*
w
,
int
quant
,
int
halfpq
);
int
ff_intrax8_decode_picture
(
IntraX8Context
*
w
,
int
quant
,
int
halfpq
,
int
loopfilter
);
#endif
/* AVCODEC_INTRAX8_H */
#endif
/* AVCODEC_INTRAX8_H */
libavcodec/vc1_block.c
View file @
57739332
...
@@ -3022,7 +3022,8 @@ void ff_vc1_decode_blocks(VC1Context *v)
...
@@ -3022,7 +3022,8 @@ void ff_vc1_decode_blocks(VC1Context *v)
v
->
s
.
esc3_level_length
=
0
;
v
->
s
.
esc3_level_length
=
0
;
if
(
v
->
x8_type
)
{
if
(
v
->
x8_type
)
{
ff_intrax8_decode_picture
(
&
v
->
x8
,
2
*
v
->
pq
+
v
->
halfpq
,
v
->
pq
*
!
v
->
pquantizer
);
ff_intrax8_decode_picture
(
&
v
->
x8
,
2
*
v
->
pq
+
v
->
halfpq
,
v
->
pq
*
!
v
->
pquantizer
,
v
->
s
.
loop_filter
);
ff_er_add_slice
(
&
v
->
s
.
er
,
0
,
0
,
ff_er_add_slice
(
&
v
->
s
.
er
,
0
,
0
,
(
v
->
s
.
mb_x
>>
1
)
-
1
,
(
v
->
s
.
mb_y
>>
1
)
-
1
,
(
v
->
s
.
mb_x
>>
1
)
-
1
,
(
v
->
s
.
mb_y
>>
1
)
-
1
,
...
...
libavcodec/wmv2dec.c
View file @
57739332
...
@@ -228,7 +228,8 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
...
@@ -228,7 +228,8 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
s
->
picture_number
++
;
// FIXME ?
s
->
picture_number
++
;
// FIXME ?
if
(
w
->
j_type
)
{
if
(
w
->
j_type
)
{
ff_intrax8_decode_picture
(
&
w
->
x8
,
2
*
s
->
qscale
,
(
s
->
qscale
-
1
)
|
1
);
ff_intrax8_decode_picture
(
&
w
->
x8
,
2
*
s
->
qscale
,
(
s
->
qscale
-
1
)
|
1
,
s
->
loop_filter
);
ff_er_add_slice
(
&
w
->
s
.
er
,
0
,
0
,
ff_er_add_slice
(
&
w
->
s
.
er
,
0
,
0
,
(
w
->
s
.
mb_x
>>
1
)
-
1
,
(
w
->
s
.
mb_y
>>
1
)
-
1
,
(
w
->
s
.
mb_x
>>
1
)
-
1
,
(
w
->
s
.
mb_y
>>
1
)
-
1
,
...
...
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