Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
eaeba6f2
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eaeba6f2
编写于
2月 19, 2016
作者:
V
Vittorio Giovara
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
intrax8: Pass the output frame to the decoding function
Helps in decoupling this code from mpegvideo.
上级
57739332
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
21 addition
and
15 deletion
+21
-15
libavcodec/intrax8.c
libavcodec/intrax8.c
+11
-10
libavcodec/intrax8.h
libavcodec/intrax8.h
+5
-2
libavcodec/vc1_block.c
libavcodec/vc1_block.c
+3
-2
libavcodec/wmv2dec.c
libavcodec/wmv2dec.c
+2
-1
未找到文件。
libavcodec/intrax8.c
浏览文件 @
eaeba6f2
...
...
@@ -336,7 +336,7 @@ static int x8_setup_spatial_predictor(IntraX8Context *const w, const int chroma)
int
quant
;
w
->
dsp
.
setup_spatial_compensation
(
w
->
dest
[
chroma
],
s
->
sc
.
edge_emu_buffer
,
s
->
current_picture
.
f
->
linesize
[
chroma
>
0
],
w
->
frame
->
linesize
[
chroma
>
0
],
&
range
,
&
sum
,
w
->
edges
);
if
(
chroma
)
{
w
->
orient
=
w
->
chroma_orient
;
...
...
@@ -672,7 +672,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma)
dsp_x8_put_solidcolor
(
av_clip_uint8
((
dc_level
*
dc_quant
+
4
)
>>
3
),
w
->
dest
[
chroma
],
s
->
current_picture
.
f
->
linesize
[
!!
chroma
]);
w
->
frame
->
linesize
[
!!
chroma
]);
goto
block_placed
;
}
...
...
@@ -697,15 +697,15 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma)
if
(
w
->
flat_dc
)
{
dsp_x8_put_solidcolor
(
w
->
predicted_dc
,
w
->
dest
[
chroma
],
s
->
current_picture
.
f
->
linesize
[
!!
chroma
]);
w
->
frame
->
linesize
[
!!
chroma
]);
}
else
{
w
->
dsp
.
spatial_compensation
[
w
->
orient
](
s
->
sc
.
edge_emu_buffer
,
w
->
dest
[
chroma
],
s
->
current_picture
.
f
->
linesize
[
!!
chroma
]);
w
->
frame
->
linesize
[
!!
chroma
]);
}
if
(
!
zeros_only
)
w
->
idsp
.
idct_add
(
w
->
dest
[
chroma
],
s
->
current_picture
.
f
->
linesize
[
!!
chroma
],
w
->
frame
->
linesize
[
!!
chroma
],
s
->
block
[
0
]);
block_placed:
...
...
@@ -714,7 +714,7 @@ block_placed:
if
(
w
->
loopfilter
)
{
uint8_t
*
ptr
=
w
->
dest
[
chroma
];
int
linesize
=
s
->
current_picture
.
f
->
linesize
[
!!
chroma
];
int
linesize
=
w
->
frame
->
linesize
[
!!
chroma
];
if
(
!
((
w
->
edges
&
2
)
||
(
zeros_only
&&
(
w
->
orient
|
4
)
==
4
)))
w
->
dsp
.
h_loop_filter
(
ptr
,
linesize
,
w
->
quant
);
...
...
@@ -775,8 +775,8 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
av_freep
(
&
w
->
prediction_table
);
}
int
ff_intrax8_decode_picture
(
IntraX8Context
*
const
w
,
int
dquan
t
,
int
quant_offset
,
int
loopfilter
)
int
ff_intrax8_decode_picture
(
IntraX8Context
*
const
w
,
Picture
*
pic
t
,
int
dquant
,
int
quant_offset
,
int
loopfilter
)
{
MpegEncContext
*
const
s
=
w
->
s
;
int
mb_xy
;
...
...
@@ -786,6 +786,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
w
->
dquant
=
dquant
;
w
->
quant
=
dquant
>>
1
;
w
->
qsum
=
quant_offset
;
w
->
frame
=
pict
->
f
;
w
->
loopfilter
=
loopfilter
;
w
->
divide_quant_dc_luma
=
((
1
<<
16
)
+
(
w
->
quant
>>
1
))
/
w
->
quant
;
...
...
@@ -799,7 +800,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
x8_reset_vlc_tables
(
w
);
for
(
s
->
mb_y
=
0
;
s
->
mb_y
<
s
->
mb_height
*
2
;
s
->
mb_y
++
)
{
x8_init_block_index
(
w
,
s
->
current_picture
.
f
,
s
->
mb_y
);
x8_init_block_index
(
w
,
w
->
frame
,
s
->
mb_y
);
mb_xy
=
(
s
->
mb_y
>>
1
)
*
s
->
mb_stride
;
for
(
s
->
mb_x
=
0
;
s
->
mb_x
<
s
->
mb_width
*
2
;
s
->
mb_x
++
)
{
...
...
@@ -828,7 +829,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
/* emulate MB info in the relevant tables */
s
->
mbskip_table
[
mb_xy
]
=
0
;
s
->
mbintra_table
[
mb_xy
]
=
1
;
s
->
current_picture
.
qscale_table
[
mb_xy
]
=
w
->
quant
;
pict
->
qscale_table
[
mb_xy
]
=
w
->
quant
;
mb_xy
++
;
}
w
->
dest
[
0
]
+=
8
;
...
...
libavcodec/intrax8.h
浏览文件 @
eaeba6f2
...
...
@@ -23,6 +23,7 @@
#include "mpegvideo.h"
#include "idctdsp.h"
#include "intrax8dsp.h"
#include "mpegpicture.h"
typedef
struct
IntraX8Context
{
VLC
*
j_ac_vlc
[
4
];
// they point to the static j_mb_vlc
...
...
@@ -43,6 +44,7 @@ typedef struct IntraX8Context {
int
dquant
;
int
qsum
;
int
loopfilter
;
AVFrame
*
frame
;
// calculated per frame
int
quant_dc_chroma
;
...
...
@@ -84,11 +86,12 @@ void ff_intrax8_common_end(IntraX8Context *w);
* The parent codec must call ff_mpv_frame_end() after calling this function.
* This function does not use ff_mpv_decode_mb().
* @param w pointer to IntraX8Context
* @param pict the output Picture containing an AVFrame
* @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
* @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
loopfilter
);
int
ff_intrax8_decode_picture
(
IntraX8Context
*
w
,
Picture
*
pict
,
int
quant
,
int
halfpq
,
int
loopfilter
);
#endif
/* AVCODEC_INTRAX8_H */
libavcodec/vc1_block.c
浏览文件 @
eaeba6f2
...
...
@@ -3022,8 +3022,9 @@ void ff_vc1_decode_blocks(VC1Context *v)
v
->
s
.
esc3_level_length
=
0
;
if
(
v
->
x8_type
)
{
ff_intrax8_decode_picture
(
&
v
->
x8
,
2
*
v
->
pq
+
v
->
halfpq
,
v
->
pq
*
!
v
->
pquantizer
,
v
->
s
.
loop_filter
);
ff_intrax8_decode_picture
(
&
v
->
x8
,
&
v
->
s
.
current_picture
,
2
*
v
->
pq
+
v
->
halfpq
,
v
->
pq
*
!
v
->
pquantizer
,
v
->
s
.
loop_filter
);
ff_er_add_slice
(
&
v
->
s
.
er
,
0
,
0
,
(
v
->
s
.
mb_x
>>
1
)
-
1
,
(
v
->
s
.
mb_y
>>
1
)
-
1
,
...
...
libavcodec/wmv2dec.c
浏览文件 @
eaeba6f2
...
...
@@ -228,7 +228,8 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
s
->
picture_number
++
;
// FIXME ?
if
(
w
->
j_type
)
{
ff_intrax8_decode_picture
(
&
w
->
x8
,
2
*
s
->
qscale
,
(
s
->
qscale
-
1
)
|
1
,
ff_intrax8_decode_picture
(
&
w
->
x8
,
&
s
->
current_picture
,
2
*
s
->
qscale
,
(
s
->
qscale
-
1
)
|
1
,
s
->
loop_filter
);
ff_er_add_slice
(
&
w
->
s
.
er
,
0
,
0
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录