@@ -202,8 +202,6 @@ AvifEncoderNew(PyObject *self_, PyObject *args) {
202202 AvifEncoderObject * self = NULL ;
203203 avifEncoder * encoder = NULL ;
204204
205- printf ("%s:%d AvifEncoderNew\n" , __FILE__ , __LINE__ );
206-
207205 char * subsampling = "4:2:0" ;
208206 int qmin = AVIF_QUANTIZER_BEST_QUALITY ; // =0
209207 int qmax = 10 ; // "High Quality", but not lossless
@@ -348,24 +346,6 @@ AvifEncoderNew(PyObject *self_, PyObject *args) {
348346 _add_codec_specific_options (encoder , advanced );
349347#endif
350348
351- printf (
352- " maxT=%d qmin=%d qmax=%d codec=%d speed=%d yuvRange=%d subsampling=%d "
353- "color_primaries=%d transferCharacteristics=%d matrix_coefficients=%d "
354- "width=%d height=%d depth=%d\n" ,
355- max_threads ,
356- enc_options .qmin ,
357- enc_options .qmax ,
358- (int )enc_options .codec ,
359- enc_options .speed ,
360- (int )enc_options .range ,
361- (int )enc_options .subsampling ,
362- color_primaries ,
363- transfer_characteristics ,
364- matrix_coefficients ,
365- width ,
366- height ,
367- depth );
368-
369349 self -> encoder = encoder ;
370350
371351 avifImage * image = avifImageCreateEmpty ();
@@ -451,8 +431,6 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {
451431 avifImage * image = self -> image ;
452432 avifImage * frame = NULL ;
453433
454- printf ("%s:%d _encoder_add\n" , __FILE__ , __LINE__ );
455-
456434 if (!PyArg_ParseTuple (
457435 args ,
458436 "z#IIIsO" ,
@@ -505,19 +483,18 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {
505483 rgb .depth = self -> image -> depth ;
506484
507485 if (strcmp (mode , "RGBA" ) == 0 ) {
508- printf ("%s:%d mode=%s\n" , __FILE__ , __LINE__ , mode );
509486 rgb .format = AVIF_RGB_FORMAT_RGBA ;
510487 channels = 4 ;
488+ } else if (strcmp (mode , "R16G16B16" ) == 0 ) {
489+ rgb .format = AVIF_RGB_FORMAT_RGB ;
490+ channels = 3 ;
511491 } else {
512- printf ("%s:%d mode=%s\n" , __FILE__ , __LINE__ , mode );
513492 rgb .format = AVIF_RGB_FORMAT_RGB ;
514493 channels = 3 ;
515494 }
516495
517496 avifRGBImageAllocatePixels (& rgb );
518497
519- printf (" rgb.rowBytes=%u rgb.height=%u size=%d\n" , rgb .rowBytes , rgb .height , (int )size );
520-
521498 if (rgb .rowBytes * rgb .height != size ) {
522499 printf ("%s:%d\n" , __FILE__ , __LINE__ );
523500 PyErr_Format (
@@ -575,7 +552,6 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {
575552
576553 uint32_t addImageFlags = AVIF_ADD_IMAGE_FLAG_NONE ;
577554 if (PyObject_IsTrue (is_single_frame )) {
578- printf ("%s:%d\n" , __FILE__ , __LINE__ );
579555 addImageFlags |= AVIF_ADD_IMAGE_FLAG_SINGLE ;
580556 }
581557
@@ -594,15 +570,13 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {
594570 }
595571
596572end :
597- printf ("%s:%d\n" , __FILE__ , __LINE__ );
598573 avifRGBImageFreePixels (& rgb );
599574 if (!is_first_frame ) {
600575 printf ("%s:%d\n" , __FILE__ , __LINE__ );
601576 avifImageDestroy (frame );
602577 }
603578
604579 if (ret == Py_None ) {
605- printf ("%s:%d _encoder_add success. frame_index=%d\n" , __FILE__ , __LINE__ , self -> frame_index );
606580 self -> frame_index ++ ;
607581 Py_RETURN_NONE ;
608582 } else {
@@ -615,8 +589,6 @@ PyObject *
615589_encoder_finish (AvifEncoderObject * self ) {
616590 avifEncoder * encoder = self -> encoder ;
617591
618- printf ("%s:%d _encoder_finish\n" , __FILE__ , __LINE__ );
619-
620592 avifRWData raw = AVIF_DATA_EMPTY ;
621593 avifResult result ;
622594 PyObject * ret = NULL ;
0 commit comments