summaryrefslogtreecommitdiffstats
path: root/libhb/encx264.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-19 13:14:04 -0700
committerJohn Stebbins <[email protected]>2015-10-19 13:14:04 -0700
commitba3d0e46199db21c1e4e899cc1d852ed0738d951 (patch)
tree51f18e3a0476f3256a27b5839e62c45b210c60cb /libhb/encx264.c
parent8a01c54c5cfd7107a00ab8417af07e161ff97b56 (diff)
parent2e432bdd792739bb498313c36fce824f1debe278 (diff)
Merge pull request #21 from jstebbins/grayscale
grayscale: make it a real filter
Diffstat (limited to 'libhb/encx264.c')
-rw-r--r--libhb/encx264.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c
index 2580f2ee9..552e713ad 100644
--- a/libhb/encx264.c
+++ b/libhb/encx264.c
@@ -51,7 +51,6 @@ struct hb_work_private_s
hb_job_t * job;
x264_t * x264;
x264_picture_t pic_in;
- uint8_t * grey_data;
int64_t last_stop; // Debugging - stop time of previous input frame
@@ -374,15 +373,6 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job )
pv->pic_in.img.i_csp = X264_CSP_I420;
pv->pic_in.img.i_plane = 3;
- if( job->grayscale )
- {
- int uvsize = hb_image_stride(AV_PIX_FMT_YUV420P, job->width, 1) *
- hb_image_height(AV_PIX_FMT_YUV420P, job->height, 1);
- pv->grey_data = malloc(uvsize);
- memset(pv->grey_data, 0x80, uvsize);
- pv->pic_in.img.plane[1] = pv->pic_in.img.plane[2] = pv->grey_data;
- }
-
return 0;
}
@@ -401,7 +391,6 @@ void encx264Close( hb_work_object_t * w )
hb_list_close(&pv->delayed_chapters);
}
- free( pv->grey_data );
x264_encoder_close( pv->x264 );
free( pv );
w->private_data = NULL;
@@ -580,11 +569,8 @@ static hb_buffer_t *x264_encode( hb_work_object_t *w, hb_buffer_t *in )
pv->pic_in.img.i_stride[1] = in->plane[1].stride;
pv->pic_in.img.i_stride[2] = in->plane[2].stride;
pv->pic_in.img.plane[0] = in->plane[0].data;
- if( !job->grayscale )
- {
- pv->pic_in.img.plane[1] = in->plane[1].data;
- pv->pic_in.img.plane[2] = in->plane[2].data;
- }
+ pv->pic_in.img.plane[1] = in->plane[1].data;
+ pv->pic_in.img.plane[2] = in->plane[2].data;
if( in->s.new_chap && job->chapter_markers )
{