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
cbcfd7da
Commit
cbcfd7da
authored
Feb 10, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: support setting the chroma intra matrix
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3d202601
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
avcodec.h
libavcodec/avcodec.h
+11
-0
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+2
-0
utils.c
libavcodec/utils.c
+1
-0
No files found.
libavcodec/avcodec.h
View file @
cbcfd7da
...
...
@@ -2988,6 +2988,14 @@ typedef struct AVCodecContext {
#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
#endif
/**
* custom intra quantization matrix
* Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix()
* - encoding: Set by user, can be NULL.
* - decoding: unused.
*/
uint16_t
*
chroma_intra_matrix
;
}
AVCodecContext
;
AVRational
av_codec_get_pkt_timebase
(
const
AVCodecContext
*
avctx
);
...
...
@@ -3002,6 +3010,9 @@ void av_codec_set_lowres(AVCodecContext *avctx, int val);
int
av_codec_get_seek_preroll
(
const
AVCodecContext
*
avctx
);
void
av_codec_set_seek_preroll
(
AVCodecContext
*
avctx
,
int
val
);
uint16_t
*
av_codec_get_chroma_intra_matrix
(
const
AVCodecContext
*
avctx
);
void
av_codec_set_chroma_intra_matrix
(
AVCodecContext
*
avctx
,
uint16_t
*
val
);
/**
* AVProfile.
*/
...
...
libavcodec/mpegvideo_enc.c
View file @
cbcfd7da
...
...
@@ -3511,6 +3511,8 @@ static int encode_picture(MpegEncContext *s, int picture_number)
chroma_matrix
=
luma_matrix
=
s
->
avctx
->
intra_matrix
;
}
if
(
s
->
avctx
->
chroma_intra_matrix
)
chroma_matrix
=
s
->
avctx
->
chroma_intra_matrix
;
/* for mjpeg, we do include qscale in the matrix */
for
(
i
=
1
;
i
<
64
;
i
++
){
...
...
libavcodec/utils.c
View file @
cbcfd7da
...
...
@@ -1116,6 +1116,7 @@ MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
const
AVCodecDescriptor
*
,
codec_descriptor
)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
int
,
lowres
)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
int
,
seek_preroll
)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
uint16_t
*
,
chroma_intra_matrix
)
int
av_codec_get_max_lowres
(
const
AVCodec
*
codec
)
{
...
...
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