History

avcodec/mpegvideo_enc: Remove always-false checks

In case "!direct" we are not reusing the input buffers (due to e.g. insufficient alignment), but allocating new ones. These of course do not alias with the ones provided by the user, so these checks are always-false.

Andreas Rheinhardt committed 3 years ago

Commit 5aaaa7d1 parent b96ba621 file · +0 −6Browse files

Unified · Split

libavcodec/mpegvideo_enc.c+0−6
@@ -1172,11 +1172,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 1171 unmodified lines
11721172 return ret;
11731173
11741174 if (!direct) {
1175− if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] &&
1176− pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] &&
1177− pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) {
1178− // empty
1179− } else {
11801175 int h_chroma_shift, v_chroma_shift;
11811176 av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
11821177 &h_chroma_shift,
@@ -1221,7 +1216,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 38 unmodified lines
12211216 }
12221217 }
12231218 emms_c();
1224− }
12251219 }
12261220 ret = av_frame_copy_props(pic->f, pic_arg);
12271221 if (ret < 0) {

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