History

avcodec/jpeg2000dec: Handle format that has planes matching YUVA420P structure but seems not to be that

Outputs something for p0_05.j2k

Michael Niedermayer committed 11 years ago

Commit ad072a11 parent 132bf0b1 file · +18 −0Browse files

Unified · Split

libavcodec/jpeg2000dec.c+18−0
@@ -352,6 +352,24 @@ static int get_siz(Jpeg2000DecoderContext *s) · 351 unmodified lines
352352 break;
353353 }
354354 }
355+
356+ if (i == possible_fmts_nb) {
357+ if (ncomponents == 4 &&
358+ s->cdy[0] == 1 && s->cdx[0] == 1 &&
359+ s->cdy[1] == 1 && s->cdx[1] == 1 &&
360+ s->cdy[2] == s->cdy[3] && s->cdx[2] == s->cdx[3]) {
361+ if (s->precision == 8 && s->cdy[2] == 2 && s->cdx[2] == 2 && !s->pal8) {
362+ s->avctx->pix_fmt = AV_PIX_FMT_YUVA420P;
363+ s->cdef[0] = 0;
364+ s->cdef[1] = 1;
365+ s->cdef[2] = 2;
366+ s->cdef[3] = 3;
367+ i = 0;
368+ }
369+ }
370+ }
371+
372+
355373 if (i == possible_fmts_nb) {
356374 av_log(s->avctx, AV_LOG_ERROR,
357375 "Unknown pix_fmt, profile: %d, colour_space: %d, "

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t