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
8ed6c13f
Commit
8ed6c13f
authored
Jun 09, 2013
by
Stephen Hutchinson
Committed by
Michael Niedermayer
Jun 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libutvideo: Add ULH0 and ULH2 decoding when using version 13.0.1
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0047da07
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
3 deletions
+31
-3
libutvideo.h
libavcodec/libutvideo.h
+10
-1
libutvideodec.cpp
libavcodec/libutvideodec.cpp
+16
-1
libutvideoenc.cpp
libavcodec/libutvideoenc.cpp
+2
-1
riff.c
libavformat/riff.c
+3
-0
No files found.
libavcodec/libutvideo.h
View file @
8ed6c13f
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
/**
/**
* @file
* @file
* Known FOURCCs:
* Known FOURCCs:
* 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA)
* 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA),
* 'ULH0' (YCbCr 4:2:0 BT.709), 'ULH2' (YCbCr 4:2:2 BT.709)
*/
*/
#ifndef AVCODEC_LIBUTVIDEO_H
#ifndef AVCODEC_LIBUTVIDEO_H
...
@@ -45,6 +46,14 @@
...
@@ -45,6 +46,14 @@
#define UTVF_NFCC_BGRA_BU UTVF_RGB32_WIN
#define UTVF_NFCC_BGRA_BU UTVF_RGB32_WIN
#endif
#endif
/*
* Ut Video version 13.0.1 introduced new BT.709 variants.
* Special-case these and only use them if v13 is detected.
*/
#if defined(UTVF_HDYC)
#define UTV_BT709
#endif
typedef
struct
{
typedef
struct
{
uint32_t
version
;
uint32_t
version
;
uint32_t
original_format
;
uint32_t
original_format
;
...
...
libavcodec/libutvideodec.cpp
View file @
8ed6c13f
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
/**
/**
* @file
* @file
* Known FOURCCs:
* Known FOURCCs:
* 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA)
* 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA),
* 'ULH0' (YCbCr 4:2:0 BT.709), 'ULH2' (YCbCr 4:2:2 BT.709)
*/
*/
extern
"C"
{
extern
"C"
{
...
@@ -51,6 +52,20 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
...
@@ -51,6 +52,20 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
/* Pick format based on FOURCC */
/* Pick format based on FOURCC */
switch
(
avctx
->
codec_tag
)
{
switch
(
avctx
->
codec_tag
)
{
#ifdef UTV_BT709
case
MKTAG
(
'U'
,
'L'
,
'H'
,
'0'
):
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
avctx
->
color_primaries
=
AVCOL_PRI_BT709
;
avctx
->
colorspace
=
AVCOL_SPC_BT709
;
format
=
UTVF_YV12
;
break
;
case
MKTAG
(
'U'
,
'L'
,
'H'
,
'2'
):
avctx
->
pix_fmt
=
AV_PIX_FMT_YUYV422
;
avctx
->
color_primaries
=
AVCOL_PRI_BT709
;
avctx
->
colorspace
=
AVCOL_SPC_BT709
;
format
=
UTVF_YUY2
;
break
;
#endif
case
MKTAG
(
'U'
,
'L'
,
'Y'
,
'0'
):
case
MKTAG
(
'U'
,
'L'
,
'Y'
,
'0'
):
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
format
=
UTVF_YV12
;
format
=
UTVF_YV12
;
...
...
libavcodec/libutvideoenc.cpp
View file @
8ed6c13f
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
/**
/**
* @file
* @file
* Known FOURCCs:
* Known FOURCCs:
* 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA)
* 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA),
* 'ULH0' (YCbCr 4:2:0 BT.709), 'ULH2' (YCbCr 4:2:2 BT.709)
*/
*/
extern
"C"
{
extern
"C"
{
...
...
libavformat/riff.c
View file @
8ed6c13f
...
@@ -330,6 +330,9 @@ const AVCodecTag ff_codec_bmp_tags[] = {
...
@@ -330,6 +330,9 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'R'
,
'G'
)
},
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'R'
,
'G'
)
},
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'Y'
,
'0'
)
},
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'Y'
,
'0'
)
},
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'Y'
,
'2'
)
},
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'Y'
,
'2'
)
},
/* Ut Video version 13.0.1 BT.709 codecs */
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'H'
,
'0'
)
},
{
AV_CODEC_ID_UTVIDEO
,
MKTAG
(
'U'
,
'L'
,
'H'
,
'2'
)
},
{
AV_CODEC_ID_VBLE
,
MKTAG
(
'V'
,
'B'
,
'L'
,
'E'
)
},
{
AV_CODEC_ID_VBLE
,
MKTAG
(
'V'
,
'B'
,
'L'
,
'E'
)
},
{
AV_CODEC_ID_ESCAPE130
,
MKTAG
(
'E'
,
'1'
,
'3'
,
'0'
)
},
{
AV_CODEC_ID_ESCAPE130
,
MKTAG
(
'E'
,
'1'
,
'3'
,
'0'
)
},
{
AV_CODEC_ID_DXTORY
,
MKTAG
(
'x'
,
't'
,
'o'
,
'r'
)
},
{
AV_CODEC_ID_DXTORY
,
MKTAG
(
'x'
,
't'
,
'o'
,
'r'
)
},
...
...
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