Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Seungha Yang
gst-plugins-base
Commits
629cac4c
Commit
629cac4c
authored
Mar 23, 2011
by
David Schleef
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video: Fix height calculation for YUV9/YVU9
parent
cd425d37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
gst-libs/gst/video/video.c
gst-libs/gst/video/video.c
+2
-2
tests/check/libs/video.c
tests/check/libs/video.c
+0
-8
No files found.
gst-libs/gst/video/video.c
View file @
629cac4c
...
...
@@ -1926,9 +1926,9 @@ gst_video_format_get_component_offset (GstVideoFormat format,
if
(
component
==
0
)
return
0
;
if
(
component
==
1
)
return
GST_ROUND_UP_4
(
width
)
*
GST_ROUND_UP_2
(
height
)
;
return
GST_ROUND_UP_4
(
width
)
*
height
;
if
(
component
==
2
)
{
return
GST_ROUND_UP_4
(
width
)
*
GST_ROUND_UP_2
(
height
)
+
return
GST_ROUND_UP_4
(
width
)
*
height
+
GST_ROUND_UP_4
(
GST_ROUND_UP_4
(
width
)
/
4
)
*
(
GST_ROUND_UP_4
(
height
)
/
4
);
}
...
...
tests/check/libs/video.c
View file @
629cac4c
...
...
@@ -424,14 +424,6 @@ GST_START_TEST (test_video_formats)
off1
=
gst_video_format_get_component_offset
(
fmt
,
1
,
w
,
h
);
off2
=
gst_video_format_get_component_offset
(
fmt
,
2
,
w
,
h
);
/* FIXME: for YUV9/YVU9 old videotestsrc code disagrees with new code
* - figure out which is right */
if
(
fmt
==
GST_VIDEO_FORMAT_YUV9
||
fmt
==
GST_VIDEO_FORMAT_YVU9
)
{
if
(
w
==
1
&&
h
==
1
)
GST_ERROR
(
"FIXME: fix GST_VIDEO_FORMAT_YUV9/YVU9 size checks"
);
goto
skip_check
;
}
fail_unless_equals_int
(
size
,
(
unsigned
long
)
paintinfo
.
endptr
);
fail_unless_equals_int
(
off0
,
(
unsigned
long
)
paintinfo
.
yp
);
fail_unless_equals_int
(
off1
,
(
unsigned
long
)
paintinfo
.
up
);
...
...
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