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
41d7642a
Commit
41d7642a
authored
Jul 17, 2016
by
Mark Reid
Committed by
Michael Niedermayer
Jul 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavcodec/dnxhd: add dnxhr profiles
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
a06acfff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
0 deletions
+43
-0
avcodec.h
libavcodec/avcodec.h
+7
-0
codec_desc.c
libavcodec/codec_desc.c
+1
-0
dnxhddec.c
libavcodec/dnxhddec.c
+22
-0
dnxhdenc.c
libavcodec/dnxhdenc.c
+2
-0
profiles.c
libavcodec/profiles.c
+10
-0
profiles.h
libavcodec/profiles.h
+1
-0
No files found.
libavcodec/avcodec.h
View file @
41d7642a
...
...
@@ -3173,6 +3173,13 @@ typedef struct AVCodecContext {
#define FF_PROFILE_MPEG2_AAC_LOW 128
#define FF_PROFILE_MPEG2_AAC_HE 131
#define FF_PROFILE_DNXHD 0
#define FF_PROFILE_DNXHR_LB 1
#define FF_PROFILE_DNXHR_SQ 2
#define FF_PROFILE_DNXHR_HQ 3
#define FF_PROFILE_DNXHR_HQX 4
#define FF_PROFILE_DNXHR_444 5
#define FF_PROFILE_DTS 20
#define FF_PROFILE_DTS_ES 30
#define FF_PROFILE_DTS_96_24 40
...
...
libavcodec/codec_desc.c
View file @
41d7642a
...
...
@@ -665,6 +665,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
.
name
=
"dnxhd"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"VC3/DNxHD"
),
.
props
=
AV_CODEC_PROP_INTRA_ONLY
|
AV_CODEC_PROP_LOSSY
,
.
profiles
=
NULL_IF_CONFIG_SMALL
(
ff_dnxhd_profiles
),
},
{
.
id
=
AV_CODEC_ID_THP
,
...
...
libavcodec/dnxhddec.c
View file @
41d7642a
...
...
@@ -33,6 +33,7 @@
#include "dnxhddata.h"
#include "idctdsp.h"
#include "internal.h"
#include "profiles.h"
#include "thread.h"
typedef
struct
RowContext
{
...
...
@@ -159,6 +160,23 @@ static av_cold int dnxhd_decode_init_thread_copy(AVCodecContext *avctx)
return
0
;
}
static
int
dnxhd_get_profile
(
int
cid
)
{
switch
(
cid
)
{
case
1270
:
return
FF_PROFILE_DNXHR_444
;
case
1271
:
return
FF_PROFILE_DNXHR_HQX
;
case
1272
:
return
FF_PROFILE_DNXHR_HQ
;
case
1273
:
return
FF_PROFILE_DNXHR_SQ
;
case
1274
:
return
FF_PROFILE_DNXHR_LB
;
}
return
FF_PROFILE_DNXHD
;
}
static
int
dnxhd_decode_header
(
DNXHDContext
*
ctx
,
AVFrame
*
frame
,
const
uint8_t
*
buf
,
int
buf_size
,
int
first_field
)
...
...
@@ -204,6 +222,9 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
}
cid
=
AV_RB32
(
buf
+
0x28
);
ctx
->
avctx
->
profile
=
dnxhd_get_profile
(
cid
);
if
((
ret
=
dnxhd_init_vlc
(
ctx
,
cid
,
bitdepth
))
<
0
)
return
ret
;
if
(
ctx
->
mbaff
&&
ctx
->
cid_table
->
cid
!=
1260
)
...
...
@@ -692,4 +713,5 @@ AVCodec ff_dnxhd_decoder = {
.
capabilities
=
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_FRAME_THREADS
|
AV_CODEC_CAP_SLICE_THREADS
,
.
init_thread_copy
=
ONLY_IF_THREADS_ENABLED
(
dnxhd_decode_init_thread_copy
),
.
profiles
=
NULL_IF_CONFIG_SMALL
(
ff_dnxhd_profiles
),
};
libavcodec/dnxhdenc.c
View file @
41d7642a
...
...
@@ -34,6 +34,7 @@
#include "internal.h"
#include "mpegvideo.h"
#include "pixblockdsp.h"
#include "profiles.h"
#include "dnxhdenc.h"
// The largest value that will not lead to overflow for 10-bit samples.
...
...
@@ -1170,4 +1171,5 @@ AVCodec ff_dnxhd_encoder = {
},
.
priv_class
=
&
dnxhd_class
,
.
defaults
=
dnxhd_defaults
,
.
profiles
=
NULL_IF_CONFIG_SMALL
(
ff_dnxhd_profiles
),
};
libavcodec/profiles.c
View file @
41d7642a
...
...
@@ -46,6 +46,16 @@ const AVProfile ff_dca_profiles[] = {
{
FF_PROFILE_UNKNOWN
},
};
const
AVProfile
ff_dnxhd_profiles
[]
=
{
{
FF_PROFILE_DNXHD
,
"DNXHD"
},
{
FF_PROFILE_DNXHR_LB
,
"DNXHR LB"
},
{
FF_PROFILE_DNXHR_SQ
,
"DNXHR SQ"
},
{
FF_PROFILE_DNXHR_HQ
,
"DNXHR HQ"
},
{
FF_PROFILE_DNXHR_HQX
,
"DNXHR HQX"
},
{
FF_PROFILE_DNXHR_444
,
"DNXHR 444"
},
{
FF_PROFILE_UNKNOWN
},
};
const
AVProfile
ff_h264_profiles
[]
=
{
{
FF_PROFILE_H264_BASELINE
,
"Baseline"
},
{
FF_PROFILE_H264_CONSTRAINED_BASELINE
,
"Constrained Baseline"
},
...
...
libavcodec/profiles.h
View file @
41d7642a
...
...
@@ -23,6 +23,7 @@
extern
const
AVProfile
ff_aac_profiles
[];
extern
const
AVProfile
ff_dca_profiles
[];
extern
const
AVProfile
ff_dnxhd_profiles
[];
extern
const
AVProfile
ff_h264_profiles
[];
extern
const
AVProfile
ff_hevc_profiles
[];
extern
const
AVProfile
ff_jpeg2000_profiles
[];
...
...
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