am7xxx-play: add more informations about how the raw format is handled
[libam7xxx.git] / examples / am7xxx-play.c
index aaf941b..91c7663 100644 (file)
@@ -235,8 +235,8 @@ static int video_output_init(struct video_output_ctx *output_ctx,
         * in particular they won't be 0, this is needed because they are used
         * as divisor somewhere in the encoding process */
        output_codec_ctx->qmin       = output_codec_ctx->qmax = ((100 - (quality - 1)) * FF_QUALITY_SCALE) / 100;
         * in particular they won't be 0, this is needed because they are used
         * as divisor somewhere in the encoding process */
        output_codec_ctx->qmin       = output_codec_ctx->qmax = ((100 - (quality - 1)) * FF_QUALITY_SCALE) / 100;
-       output_codec_ctx->mb_lmin    = output_codec_ctx->lmin = output_codec_ctx->qmin * FF_QP2LAMBDA;
-       output_codec_ctx->mb_lmax    = output_codec_ctx->lmax = output_codec_ctx->qmax * FF_QP2LAMBDA;
+       output_codec_ctx->mb_lmin    = output_codec_ctx->qmin * FF_QP2LAMBDA;
+       output_codec_ctx->mb_lmax    = output_codec_ctx->qmax * FF_QP2LAMBDA;
        output_codec_ctx->flags      |= CODEC_FLAG_QSCALE;
        output_codec_ctx->global_quality = output_codec_ctx->qmin * FF_QP2LAMBDA;
 
        output_codec_ctx->flags      |= CODEC_FLAG_QSCALE;
        output_codec_ctx->global_quality = output_codec_ctx->qmin * FF_QP2LAMBDA;
 
@@ -388,7 +388,11 @@ static int am7xxx_play(const char *input_format_string,
 
                /* if we got the complete frame */
                if (got_picture) {
 
                /* if we got the complete frame */
                if (got_picture) {
-                       /* convert it to YUV */
+                       /* 
+                        * Rescaling the picture also changes its pixel format
+                        * to the raw format supported by the projector if
+                        * this was set in video_output_init()
+                        */
                        sws_scale(sw_scale_ctx,
                                  (const uint8_t * const *)picture_raw->data,
                                  picture_raw->linesize,
                        sws_scale(sw_scale_ctx,
                                  (const uint8_t * const *)picture_raw->data,
                                  picture_raw->linesize,
@@ -548,7 +552,7 @@ static char *get_x_screen_size(const char *input_path)
 static char *get_x_screen_size(const char *input_path)
 {
        (void) input_path;
 static char *get_x_screen_size(const char *input_path)
 {
        (void) input_path;
-       fprintf(stderr, "%s: fallback implementation\n", __func__);
+       fprintf(stderr, "%s: fallback implementation, assuming a vga screen\n", __func__);
        return strdup("vga");
 }
 #endif
        return strdup("vga");
 }
 #endif