History

avcodec/mpeg12dec: Don't pretend MPEG-1/2 to support alpha

(FF_PTR_ADD has to be kept although MPEG-1/2 only supports YUV pixel formats because our decoder also supports decoding to AV_PIX_FMT_GRAY8 depending upon CONFIG_GRAY.)

Andreas Rheinhardt committed 2 years ago

Commit 518f79f1 parent 1a545261 file · +2 −4Browse files

Unified · Split

libavcodec/mpeg12dec.c+2−4
@@ -1303,7 +1303,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 1302 unmodified lines
1303 s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST *1303 s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST *
1304 (s->picture_structure == PICT_TOP_FIELD);1304 (s->picture_structure == PICT_TOP_FIELD);
1305 1305
1306 for (int i = 0; i < 4; i++) {1306 for (int i = 0; i < 3; i++) {
1307 if (s->picture_structure == PICT_BOTTOM_FIELD) {1307 if (s->picture_structure == PICT_BOTTOM_FIELD) {
1308 s->current_picture.f->data[i] = FF_PTR_ADD(s->current_picture.f->data[i],1308 s->current_picture.f->data[i] = FF_PTR_ADD(s->current_picture.f->data[i],
1309 s->current_picture.f->linesize[i]);1309 s->current_picture.f->linesize[i]);
@@ -1368,8 +1368,6 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 58 unmodified lines
1368 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME))1368 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME))
1369 ff_thread_finish_setup(avctx);1369 ff_thread_finish_setup(avctx);
1370 } else { // second field1370 } else { // second field
1371 int i;
1372
1373 if (!s->current_picture_ptr) {1371 if (!s->current_picture_ptr) {
1374 av_log(s->avctx, AV_LOG_ERROR, "first field missing\n");1372 av_log(s->avctx, AV_LOG_ERROR, "first field missing\n");
1375 return AVERROR_INVALIDDATA;1373 return AVERROR_INVALIDDATA;
@@ -1383,7 +1381,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 7 unmodified lines
1383 }1381 }
1384 }1382 }
1385 1383
1386 for (i = 0; i < 4; i++) {1384 for (int i = 0; i < 3; i++) {
1387 s->current_picture.f->data[i] = s->current_picture_ptr->f->data[i];1385 s->current_picture.f->data[i] = s->current_picture_ptr->f->data[i];
1388 if (s->picture_structure == PICT_BOTTOM_FIELD)1386 if (s->picture_structure == PICT_BOTTOM_FIELD)
1389 s->current_picture.f->data[i] +=1387 s->current_picture.f->data[i] +=

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