Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d6cfbcd6
Commit
d6cfbcd6
authored
Oct 09, 2015
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/mjpegenc: Add an option to force outputting chroma matrix.
RFC 2435 suggests that mjpeg over rtp uses both two tables.
parent
1e81fd37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
mjpegenc_common.c
libavcodec/mjpegenc_common.c
+3
-0
mpegvideo.h
libavcodec/mpegvideo.h
+2
-0
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/mjpegenc_common.c
View file @
d6cfbcd6
...
...
@@ -64,11 +64,14 @@ static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p,
{
int
i
,
j
,
size
;
uint8_t
*
ptr
;
MpegEncContext
*
s
=
avctx
->
priv_data
;
if
(
avctx
->
codec_id
!=
AV_CODEC_ID_LJPEG
)
{
int
matrix_count
=
1
+
!!
memcmp
(
luma_intra_matrix
,
chroma_intra_matrix
,
sizeof
(
luma_intra_matrix
[
0
])
*
64
);
if
(
s
->
force_duplicated_matrix
)
matrix_count
=
2
;
/* quant matrixes */
put_marker
(
p
,
DQT
);
put_bits
(
p
,
16
,
2
+
matrix_count
*
(
1
+
64
));
...
...
libavcodec/mpegvideo.h
View file @
d6cfbcd6
...
...
@@ -299,6 +299,7 @@ typedef struct MpegEncContext {
uint16_t
chroma_intra_matrix
[
64
];
uint16_t
inter_matrix
[
64
];
uint16_t
chroma_inter_matrix
[
64
];
int
force_duplicated_matrix
;
///< Force duplication of mjpeg matrices, useful for rtp streaming
int
intra_quant_bias
;
///< bias for the quantizer
int
inter_quant_bias
;
///< bias for the quantizer
...
...
@@ -596,6 +597,7 @@ typedef struct MpegEncContext {
{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "xone", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_XONE }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "force_duplicated_matrix", "Always write luma and chroma matrix for mjpeg, useful for rtp streaming.", FF_MPV_OFFSET(force_duplicated_matrix), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS }, \
extern
const
AVOption
ff_mpv_generic_options
[];
...
...
libavcodec/version.h
View file @
d6cfbcd6
...
...
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 4
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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