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
87f87ccf
Commit
87f87ccf
authored
Mar 29, 2015
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mjpeg: Use a more precise type for put_marker()
parent
e6e3dcba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
mjpeg.h
libavcodec/mjpeg.h
+2
-2
mjpegenc.h
libavcodec/mjpegenc.h
+2
-1
No files found.
libavcodec/mjpeg.h
View file @
87f87ccf
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include "avcodec.h"
#include "avcodec.h"
/* JPEG marker codes */
/* JPEG marker codes */
typedef
enum
{
enum
JpegMarker
{
/* start of frame */
/* start of frame */
SOF0
=
0xc0
,
/* baseline */
SOF0
=
0xc0
,
/* baseline */
SOF1
=
0xc1
,
/* extended sequential, huffman */
SOF1
=
0xc1
,
/* extended sequential, huffman */
...
@@ -117,7 +117,7 @@ typedef enum {
...
@@ -117,7 +117,7 @@ typedef enum {
TEM
=
0x01
,
/* temporary private use for arithmetic coding */
TEM
=
0x01
,
/* temporary private use for arithmetic coding */
/* 0x02 -> 0xbf reserved */
/* 0x02 -> 0xbf reserved */
}
JPEG_MARKER
;
};
#define PREDICT(ret, topleft, top, left, predictor)\
#define PREDICT(ret, topleft, top, left, predictor)\
switch(predictor){\
switch(predictor){\
...
...
libavcodec/mjpegenc.h
View file @
87f87ccf
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include <stdint.h>
#include <stdint.h>
#include "mjpeg.h"
#include "mpegvideo.h"
#include "mpegvideo.h"
#include "put_bits.h"
#include "put_bits.h"
...
@@ -50,7 +51,7 @@ typedef struct MJpegContext {
...
@@ -50,7 +51,7 @@ typedef struct MJpegContext {
uint16_t
huff_code_ac_chrominance
[
256
];
uint16_t
huff_code_ac_chrominance
[
256
];
}
MJpegContext
;
}
MJpegContext
;
static
inline
void
put_marker
(
PutBitContext
*
p
,
int
code
)
static
inline
void
put_marker
(
PutBitContext
*
p
,
enum
JpegMarker
code
)
{
{
put_bits
(
p
,
8
,
0xff
);
put_bits
(
p
,
8
,
0xff
);
put_bits
(
p
,
8
,
code
);
put_bits
(
p
,
8
,
code
);
...
...
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