Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
merge_av
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
2018-12-17 19:16:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f3a5553a12798d8f5fba44e634198e7079075e82
f3a5553a
1 parent
92c9ef1c
fix the last pixel of each line out of range when rotating 180
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
6 行删除
pip/AVTranscoder.cpp
pip/AVTranscoder.cpp
查看文件 @
f3a5553
...
...
@@ -463,7 +463,7 @@ int CAVTranscoder::open_output_file(const char *filename)
}
}
else
if
(
pSrcFrame
->
pkt_dts
==
180
)
{
unsigned
char
*
startSrcY
=
pSrcFrame
->
data
[
0
]
+
pSrcFrame
->
width
+
(
pSrcFrame
->
height
-
1
)
*
pSrcFrame
->
linesize
[
0
];
unsigned
char
*
startSrcY
=
pSrcFrame
->
data
[
0
]
+
pSrcFrame
->
width
+
(
pSrcFrame
->
height
-
1
)
*
pSrcFrame
->
linesize
[
0
]
-
1
;
for
(
int
i
=
0
;
i
<
pSrcFrame
->
height
;
i
++
)
{
unsigned
char
*
psrc
=
startSrcY
-
i
*
pSrcFrame
->
linesize
[
0
];
unsigned
char
*
pdst
=
pDstFrame
->
data
[
0
]
+
(
y
+
i
)
*
pDstFrame
->
linesize
[
0
]
+
x
;
...
...
@@ -472,8 +472,8 @@ int CAVTranscoder::open_output_file(const char *filename)
*
pdst
=
*
psrc
;
}
}
unsigned
char
*
startSrcU
=
pSrcFrame
->
data
[
1
]
+
pSrcFrame
->
width
/
2
+
(
pSrcFrame
->
height
/
2
-
1
)
*
pSrcFrame
->
linesize
[
1
];
unsigned
char
*
startSrcV
=
pSrcFrame
->
data
[
2
]
+
pSrcFrame
->
width
/
2
+
(
pSrcFrame
->
height
/
2
-
1
)
*
pSrcFrame
->
linesize
[
2
];
unsigned
char
*
startSrcU
=
pSrcFrame
->
data
[
1
]
+
pSrcFrame
->
width
/
2
+
(
pSrcFrame
->
height
/
2
-
1
)
*
pSrcFrame
->
linesize
[
1
]
-
1
;
unsigned
char
*
startSrcV
=
pSrcFrame
->
data
[
2
]
+
pSrcFrame
->
width
/
2
+
(
pSrcFrame
->
height
/
2
-
1
)
*
pSrcFrame
->
linesize
[
2
]
-
1
;
for
(
int
i
=
0
;
i
<
pSrcFrame
->
height
/
2
;
i
++
){
unsigned
char
*
psrc
=
startSrcU
-
i
*
pSrcFrame
->
linesize
[
1
];
unsigned
char
*
pdst
=
pDstFrame
->
data
[
1
]
+
(
y
/
2
+
i
)
*
pDstFrame
->
linesize
[
1
]
+
x
/
2
;
...
...
@@ -530,7 +530,7 @@ int CAVTranscoder::open_output_file(const char *filename)
}
}
else
if
(
pSrcFrame
->
pkt_dts
==
180
)
{
unsigned
char
*
startSrcY
=
pSrcFrame
->
data
[
0
]
+
pSrcFrame
->
width
+
(
pSrcFrame
->
height
-
srcy
-
1
)
*
pSrcFrame
->
linesize
[
0
]
-
srcx
;
unsigned
char
*
startSrcY
=
pSrcFrame
->
data
[
0
]
+
pSrcFrame
->
width
+
(
pSrcFrame
->
height
-
srcy
-
1
)
*
pSrcFrame
->
linesize
[
0
]
-
srcx
-
1
;
for
(
int
i
=
0
;
i
<
h
;
i
++
)
{
unsigned
char
*
psrc
=
startSrcY
-
i
*
pSrcFrame
->
linesize
[
0
];
unsigned
char
*
pdst
=
pDstFrame
->
data
[
0
]
+
(
y
+
i
)
*
pDstFrame
->
linesize
[
0
]
+
x
;
...
...
@@ -539,8 +539,8 @@ int CAVTranscoder::open_output_file(const char *filename)
*
pdst
=
*
psrc
;
}
}
unsigned
char
*
startSrcU
=
pSrcFrame
->
data
[
1
]
+
pSrcFrame
->
width
/
2
+
((
pSrcFrame
->
height
-
srcy
-
1
)
/
2
)
*
pSrcFrame
->
linesize
[
1
]
-
srcx
/
2
;
unsigned
char
*
startSrcV
=
pSrcFrame
->
data
[
2
]
+
pSrcFrame
->
width
/
2
+
((
pSrcFrame
->
height
-
srcy
-
1
)
/
2
)
*
pSrcFrame
->
linesize
[
2
]
-
srcx
/
2
;
unsigned
char
*
startSrcU
=
pSrcFrame
->
data
[
1
]
+
pSrcFrame
->
width
/
2
+
((
pSrcFrame
->
height
-
srcy
-
1
)
/
2
)
*
pSrcFrame
->
linesize
[
1
]
-
srcx
/
2
-
1
;
unsigned
char
*
startSrcV
=
pSrcFrame
->
data
[
2
]
+
pSrcFrame
->
width
/
2
+
((
pSrcFrame
->
height
-
srcy
-
1
)
/
2
)
*
pSrcFrame
->
linesize
[
2
]
-
srcx
/
2
-
1
;
for
(
int
i
=
0
;
i
<
h
/
2
;
i
++
){
unsigned
char
*
psrc
=
startSrcU
-
i
*
pSrcFrame
->
linesize
[
1
];
unsigned
char
*
pdst
=
pDstFrame
->
data
[
1
]
+
(
y
/
2
+
i
)
*
pDstFrame
->
linesize
[
1
]
+
x
/
2
;
...
...
请
注册
或
登录
后发表评论