Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
98c4268e
Commit
98c4268e
authored
12 years ago
by
Stephen Hutchinson
Committed by
Derek Buitenhuis
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
libutvideo: Prioritize compatibility with new versions
Signed-off-by:
Derek Buitenhuis
<
derek.buitenhuis@gmail.com
>
parent
309d6f50
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libavcodec/libutvideo.h
+10
-6
10 additions, 6 deletions
libavcodec/libutvideo.h
libavcodec/libutvideodec.cpp
+2
-2
2 additions, 2 deletions
libavcodec/libutvideodec.cpp
libavcodec/libutvideoenc.cpp
+2
-2
2 additions, 2 deletions
libavcodec/libutvideoenc.cpp
with
14 additions
and
10 deletions
libavcodec/libutvideo.h
+
10
−
6
View file @
98c4268e
...
@@ -31,14 +31,18 @@
...
@@ -31,14 +31,18 @@
#include
<utvideo/utvideo.h>
#include
<utvideo/utvideo.h>
#include
<utvideo/Codec.h>
#include
<utvideo/Codec.h>
/* Ut Video version 12.0.0 removed the _WIN names, so if those are
/*
* absent, redefine them to maintain compatibility with pre-v12 versions.*/
* Ut Video version 12.0.0 changed the RGB format names and removed
#if !defined(UTVF_RGB24_WIN)
* the _WIN names, so if the new names are absent, define them
#define UTVF_RGB24_WIN UTVF_NFCC_BGR_BU
* against the old names so compatibility with pre-v12 versions
* is maintained.
*/
#if !defined(UTVF_NFCC_BGR_BU)
#define UTVF_NFCC_BGR_BU UTVF_RGB24_WIN
#endif
#endif
#if !defined(UTVF_
RGB32_WIN
)
#if !defined(UTVF_
NFCC_BGRA_BU
)
#define UTVF_
RGB32_WIN UTVF_NFCC_BGRA_BU
#define UTVF_
NFCC_BGRA_BU UTVF_RGB32_WIN
#endif
#endif
typedef
struct
{
typedef
struct
{
...
...
This diff is collapsed.
Click to expand it.
libavcodec/libutvideodec.cpp
+
2
−
2
View file @
98c4268e
...
@@ -61,11 +61,11 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
...
@@ -61,11 +61,11 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
break
;
break
;
case
MKTAG
(
'U'
,
'L'
,
'R'
,
'G'
):
case
MKTAG
(
'U'
,
'L'
,
'R'
,
'G'
):
avctx
->
pix_fmt
=
AV_PIX_FMT_BGR24
;
avctx
->
pix_fmt
=
AV_PIX_FMT_BGR24
;
format
=
UTVF_
RGB24_WIN
;
format
=
UTVF_
NFCC_BGR_BU
;
break
;
break
;
case
MKTAG
(
'U'
,
'L'
,
'R'
,
'A'
):
case
MKTAG
(
'U'
,
'L'
,
'R'
,
'A'
):
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB32
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB32
;
format
=
UTVF_
RGB32_WIN
;
format
=
UTVF_
NFCC_BGRA_BU
;
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
...
...
This diff is collapsed.
Click to expand it.
libavcodec/libutvideoenc.cpp
+
2
−
2
View file @
98c4268e
...
@@ -51,12 +51,12 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
...
@@ -51,12 +51,12 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
avctx
->
codec_tag
=
MKTAG
(
'U'
,
'L'
,
'Y'
,
'2'
);
avctx
->
codec_tag
=
MKTAG
(
'U'
,
'L'
,
'Y'
,
'2'
);
break
;
break
;
case
AV_PIX_FMT_BGR24
:
case
AV_PIX_FMT_BGR24
:
in_format
=
UTVF_
RGB24_WIN
;
in_format
=
UTVF_
NFCC_BGR_BU
;
avctx
->
bits_per_coded_sample
=
24
;
avctx
->
bits_per_coded_sample
=
24
;
avctx
->
codec_tag
=
MKTAG
(
'U'
,
'L'
,
'R'
,
'G'
);
avctx
->
codec_tag
=
MKTAG
(
'U'
,
'L'
,
'R'
,
'G'
);
break
;
break
;
case
AV_PIX_FMT_RGB32
:
case
AV_PIX_FMT_RGB32
:
in_format
=
UTVF_
RGB32_WIN
;
in_format
=
UTVF_
NFCC_BGRA_BU
;
avctx
->
bits_per_coded_sample
=
32
;
avctx
->
bits_per_coded_sample
=
32
;
avctx
->
codec_tag
=
MKTAG
(
'U'
,
'L'
,
'R'
,
'A'
);
avctx
->
codec_tag
=
MKTAG
(
'U'
,
'L'
,
'R'
,
'A'
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment