Mercurial > libavcodec.hg
comparison qtrle.c @ 7823:4525dcd81357 libavcodec
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!
author | michael |
---|---|
date | Mon, 08 Sep 2008 14:24:59 +0000 |
parents | d1ebbf1e4d50 |
children | 2acf0ae7b041 |
comparison
equal
deleted
inserted
replaced
7822:67cfe4983e6d | 7823:4525dcd81357 |
---|---|
381 static av_cold int qtrle_decode_init(AVCodecContext *avctx) | 381 static av_cold int qtrle_decode_init(AVCodecContext *avctx) |
382 { | 382 { |
383 QtrleContext *s = avctx->priv_data; | 383 QtrleContext *s = avctx->priv_data; |
384 | 384 |
385 s->avctx = avctx; | 385 s->avctx = avctx; |
386 switch (avctx->bits_per_sample) { | 386 switch (avctx->bits_per_coded_sample) { |
387 case 1: | 387 case 1: |
388 case 33: | 388 case 33: |
389 avctx->pix_fmt = PIX_FMT_MONOWHITE; | 389 avctx->pix_fmt = PIX_FMT_MONOWHITE; |
390 break; | 390 break; |
391 | 391 |
410 avctx->pix_fmt = PIX_FMT_RGB32; | 410 avctx->pix_fmt = PIX_FMT_RGB32; |
411 break; | 411 break; |
412 | 412 |
413 default: | 413 default: |
414 av_log (avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n", | 414 av_log (avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n", |
415 avctx->bits_per_sample); | 415 avctx->bits_per_coded_sample); |
416 break; | 416 break; |
417 } | 417 } |
418 | 418 |
419 s->frame.data[0] = NULL; | 419 s->frame.data[0] = NULL; |
420 | 420 |
464 start_line = 0; | 464 start_line = 0; |
465 height = s->avctx->height; | 465 height = s->avctx->height; |
466 } | 466 } |
467 row_ptr = s->frame.linesize[0] * start_line; | 467 row_ptr = s->frame.linesize[0] * start_line; |
468 | 468 |
469 switch (avctx->bits_per_sample) { | 469 switch (avctx->bits_per_coded_sample) { |
470 case 1: | 470 case 1: |
471 case 33: | 471 case 33: |
472 qtrle_decode_1bpp(s, stream_ptr, row_ptr, height); | 472 qtrle_decode_1bpp(s, stream_ptr, row_ptr, height); |
473 break; | 473 break; |
474 | 474 |
502 qtrle_decode_32bpp(s, stream_ptr, row_ptr, height); | 502 qtrle_decode_32bpp(s, stream_ptr, row_ptr, height); |
503 break; | 503 break; |
504 | 504 |
505 default: | 505 default: |
506 av_log (s->avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n", | 506 av_log (s->avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n", |
507 avctx->bits_per_sample); | 507 avctx->bits_per_coded_sample); |
508 break; | 508 break; |
509 } | 509 } |
510 | 510 |
511 if(has_palette) { | 511 if(has_palette) { |
512 /* make the palette available on the way out */ | 512 /* make the palette available on the way out */ |