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
59c1023e
Commit
59c1023e
authored
Apr 06, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consider aspect ratio when writing tiff dpi.
TIFFTAG_YRESOLUTION gets now adjusted to sample_aspect_ratio.
parent
b978391e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
tiffenc.c
libavcodec/tiffenc.c
+7
-0
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/tiffenc.c
View file @
59c1023e
...
@@ -436,6 +436,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -436,6 +436,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
add_entry1
(
s
,
TIFF_ROWSPERSTRIP
,
TIFF_LONG
,
s
->
rps
);
add_entry1
(
s
,
TIFF_ROWSPERSTRIP
,
TIFF_LONG
,
s
->
rps
);
add_entry
(
s
,
TIFF_STRIP_SIZE
,
TIFF_LONG
,
strips
,
s
->
strip_sizes
);
add_entry
(
s
,
TIFF_STRIP_SIZE
,
TIFF_LONG
,
strips
,
s
->
strip_sizes
);
add_entry
(
s
,
TIFF_XRES
,
TIFF_RATIONAL
,
1
,
res
);
add_entry
(
s
,
TIFF_XRES
,
TIFF_RATIONAL
,
1
,
res
);
if
(
avctx
->
sample_aspect_ratio
.
num
>
0
&&
avctx
->
sample_aspect_ratio
.
den
>
0
)
{
AVRational
y
=
av_mul_q
(
av_make_q
(
s
->
dpi
,
1
),
avctx
->
sample_aspect_ratio
);
res
[
0
]
=
y
.
num
;
res
[
1
]
=
y
.
den
;
}
add_entry
(
s
,
TIFF_YRES
,
TIFF_RATIONAL
,
1
,
res
);
add_entry
(
s
,
TIFF_YRES
,
TIFF_RATIONAL
,
1
,
res
);
add_entry1
(
s
,
TIFF_RES_UNIT
,
TIFF_SHORT
,
2
);
add_entry1
(
s
,
TIFF_RES_UNIT
,
TIFF_SHORT
,
2
);
...
...
libavcodec/version.h
View file @
59c1023e
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 57
#define LIBAVCODEC_VERSION_MINOR 57
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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