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
1c1fbc70
Commit
1c1fbc70
authored
Mar 12, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mjpeg: set color_range
parent
6612a03d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
mjpegdec.c
libavcodec/mjpegdec.c
+6
-1
No files found.
libavcodec/mjpegdec.c
View file @
1c1fbc70
...
...
@@ -338,8 +338,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
case
0x11111100
:
if
(
s
->
rgb
)
s
->
avctx
->
pix_fmt
=
AV_PIX_FMT_BGRA
;
else
else
{
s
->
avctx
->
pix_fmt
=
s
->
cs_itu601
?
AV_PIX_FMT_YUV444P
:
AV_PIX_FMT_YUVJ444P
;
s
->
avctx
->
color_range
=
s
->
cs_itu601
?
AVCOL_RANGE_MPEG
:
AVCOL_RANGE_JPEG
;
}
assert
(
s
->
nb_components
==
3
);
break
;
case
0x11000000
:
...
...
@@ -347,12 +349,15 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
break
;
case
0x12111100
:
s
->
avctx
->
pix_fmt
=
s
->
cs_itu601
?
AV_PIX_FMT_YUV440P
:
AV_PIX_FMT_YUVJ440P
;
s
->
avctx
->
color_range
=
s
->
cs_itu601
?
AVCOL_RANGE_MPEG
:
AVCOL_RANGE_JPEG
;
break
;
case
0x21111100
:
s
->
avctx
->
pix_fmt
=
s
->
cs_itu601
?
AV_PIX_FMT_YUV422P
:
AV_PIX_FMT_YUVJ422P
;
s
->
avctx
->
color_range
=
s
->
cs_itu601
?
AVCOL_RANGE_MPEG
:
AVCOL_RANGE_JPEG
;
break
;
case
0x22111100
:
s
->
avctx
->
pix_fmt
=
s
->
cs_itu601
?
AV_PIX_FMT_YUV420P
:
AV_PIX_FMT_YUVJ420P
;
s
->
avctx
->
color_range
=
s
->
cs_itu601
?
AVCOL_RANGE_MPEG
:
AVCOL_RANGE_JPEG
;
break
;
default:
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Unhandled pixel format 0x%x
\n
"
,
pix_fmt_id
);
...
...
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