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
Xiph.Org
aom-rav1e
Commits
afae733e
Commit
afae733e
authored
Jan 14, 2015
by
Yaowu Xu
Committed by
Gerrit Code Review
Jan 14, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Enable decoder to pass through color space info"
parents
bd3dbc58
6b223fcb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
1 deletion
+20
-1
test/encode_test_driver.cc
test/encode_test_driver.cc
+1
-0
vp9/decoder/vp9_decodeframe.c
vp9/decoder/vp9_decodeframe.c
+2
-0
vp9/vp9_iface_common.h
vp9/vp9_iface_common.h
+2
-0
vpx/vpx_image.h
vpx/vpx_image.h
+14
-1
vpx_scale/yv12config.h
vpx_scale/yv12config.h
+1
-0
No files found.
test/encode_test_driver.cc
View file @
afae733e
...
...
@@ -114,6 +114,7 @@ void EncoderTest::SetMode(TestMode mode) {
static
bool
compare_img
(
const
vpx_image_t
*
img1
,
const
vpx_image_t
*
img2
)
{
bool
match
=
(
img1
->
fmt
==
img2
->
fmt
)
&&
(
img1
->
cs
==
img2
->
cs
)
&&
(
img1
->
d_w
==
img2
->
d_w
)
&&
(
img1
->
d_h
==
img2
->
d_h
);
...
...
vp9/decoder/vp9_decodeframe.c
View file @
afae733e
...
...
@@ -727,6 +727,8 @@ static void setup_frame_size(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) {
}
cm
->
frame_bufs
[
cm
->
new_fb_idx
].
buf
.
subsampling_x
=
cm
->
subsampling_x
;
cm
->
frame_bufs
[
cm
->
new_fb_idx
].
buf
.
subsampling_y
=
cm
->
subsampling_y
;
cm
->
frame_bufs
[
cm
->
new_fb_idx
].
buf
.
color_space
=
(
vpx_color_space_t
)
cm
->
color_space
;
cm
->
frame_bufs
[
cm
->
new_fb_idx
].
buf
.
bit_depth
=
(
unsigned
int
)
cm
->
bit_depth
;
}
...
...
vp9/vp9_iface_common.h
View file @
afae733e
...
...
@@ -34,6 +34,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
bps
=
12
;
}
}
img
->
cs
=
yv12
->
color_space
;
img
->
bit_depth
=
8
;
img
->
w
=
yv12
->
y_stride
;
img
->
h
=
ALIGN_POWER_OF_TWO
(
yv12
->
y_height
+
2
*
VP9_ENC_BORDER_IN_PIXELS
,
3
);
...
...
@@ -92,6 +93,7 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
yv12
->
y_stride
=
img
->
stride
[
VPX_PLANE_Y
];
yv12
->
uv_stride
=
img
->
stride
[
VPX_PLANE_U
];
yv12
->
color_space
=
img
->
cs
;
#if CONFIG_VP9_HIGHBITDEPTH
if
(
img
->
fmt
&
VPX_IMG_FMT_HIGHBITDEPTH
)
{
...
...
vpx/vpx_image.h
View file @
afae733e
...
...
@@ -28,7 +28,7 @@ extern "C" {
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
#define VPX_IMAGE_ABI_VERSION (
2
)
/**<\hideinitializer*/
#define VPX_IMAGE_ABI_VERSION (
3
)
/**<\hideinitializer*/
#define VPX_IMG_FMT_PLANAR 0x100
/**< Image is a planar format. */
...
...
@@ -66,9 +66,22 @@ extern "C" {
VPX_IMG_FMT_I44016
=
VPX_IMG_FMT_I440
|
VPX_IMG_FMT_HIGHBITDEPTH
}
vpx_img_fmt_t
;
/**< alias for enum vpx_img_fmt */
/*!\brief List of supported color spaces */
typedef
enum
vpx_color_space
{
VPX_CS_UNKNOWN
=
0
,
// Unknown
VPX_CS_BT_601
=
1
,
// BT.601
VPX_CS_BT_709
=
2
,
// BT.709
VPX_CS_SMPTE_170
=
3
,
// SMPTE.170
VPX_CS_SMPTE_240
=
4
,
// SMPTE.240
VPX_CS_BT_2020
=
5
,
// BT.2020
VPX_CS_RESERVED
=
6
,
// Reserved
VPX_CS_SRGB
=
7
// sRGB
}
vpx_color_space_t
;
/**< alias for enum vpx_color_space */
/**\brief Image Descriptor */
typedef
struct
vpx_image
{
vpx_img_fmt_t
fmt
;
/**< Image Format */
vpx_color_space_t
cs
;
/**< Color Space */
/* Image storage dimensions */
unsigned
int
w
;
/**< Stored image width */
...
...
vpx_scale/yv12config.h
View file @
afae733e
...
...
@@ -55,6 +55,7 @@ typedef struct yv12_buffer_config {
int
subsampling_x
;
int
subsampling_y
;
unsigned
int
bit_depth
;
vpx_color_space_t
color_space
;
int
corrupted
;
int
flags
;
...
...
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