diff options
author | John Stebbins <[email protected]> | 2015-10-14 15:26:44 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-10-14 15:30:16 -0700 |
commit | 10e3deb6cf13ebbe2020a7736a231db68e6ab27a (patch) | |
tree | ac7339f7ad63238dc779e3b6899ceaf9c018d130 /libhb/encx264.c | |
parent | e918e48bfb3f0512dc3d246c0f233ca4bbe28918 (diff) |
grayscale: make it a real filter
It only worked properly with the x264 encoder. Now it works with all
encoders.
Diffstat (limited to 'libhb/encx264.c')
-rw-r--r-- | libhb/encx264.c | 18 |
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 ) { |