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

Showing the changes to libavcodec (1 of 1 file). Show all

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
1172 return ret;1172 return ret;
1173 1173
1174 if (!direct) {1174 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 {
1180 int h_chroma_shift, v_chroma_shift;1175 int h_chroma_shift, v_chroma_shift;
1181 av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,1176 av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
1182 &h_chroma_shift,1177 &h_chroma_shift,
@@ -1221,7 +1216,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 38 unmodified lines
1221 }1216 }
1222 }1217 }
1223 emms_c();1218 emms_c();
1224 }
1225 }1219 }
1226 ret = av_frame_copy_props(pic->f, pic_arg);1220 ret = av_frame_copy_props(pic->f, pic_arg);
1227 if (ret < 0) {1221 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