Search
j0ke.net Open Build Service
>
Projects
>
multimedia
:
SL11
>
mjpegtools19
> mjpegtools-vector_alignment.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File mjpegtools-vector_alignment.patch of Package mjpegtools19
--- mpeg2enc/imageplanes.cc | 11 +++++++---- mpeg2enc/imageplanes.hh | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) --- a/mpeg2enc/imageplanes.cc +++ b/mpeg2enc/imageplanes.cc @@ -19,19 +19,22 @@ ImagePlanes::ImagePlanes( EncoderParams switch( c ) { case 0 : // Y plane - planes[c] = new uint8_t[encparams.lum_buffer_size]; + raw_planes[c] = new uint8_t[encparams.lum_buffer_size + 0x10]; + planes[c] = (uint8_t *)((((unsigned long)raw_planes[c]) + 0x10) & ~0xf); BorderMark( planes[c] , encparams.enc_width,encparams.enc_height, encparams.phy_width,encparams.phy_height); break; case 1 : // U plane case 2 : // V plane - planes[c] = new uint8_t[encparams.chrom_buffer_size]; + raw_planes[c] = new uint8_t[encparams.chrom_buffer_size + 0x10]; + planes[c] = (uint8_t *)((((unsigned long)raw_planes[c]) + 0x10) & ~0xf); BorderMark( planes[c], encparams.enc_chrom_width, encparams.enc_chrom_height, encparams.phy_chrom_width,encparams.phy_chrom_height); break; default : // TODO: shift Y subsampled data from appended in Y buffer to seperate planes + raw_planes[c] = 0; planes[c] = 0; break; } @@ -43,8 +46,8 @@ ImagePlanes::ImagePlanes( EncoderParams { for( int c = 0; c < NUM_PLANES; ++c ) { - if( planes[c] != 0 ) - delete [] planes[c]; + if( raw_planes[c] != 0 ) + delete [] raw_planes[c]; } } --- a/mpeg2enc/imageplanes.hh +++ b/mpeg2enc/imageplanes.hh @@ -51,6 +51,7 @@ class ImagePlanes int image_data_width, int image_data_height); protected: uint8_t *planes[NUM_PLANES]; + uint8_t *raw_planes[NUM_PLANES]; };