]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ljpegenc.c
Simplify interleaving code.
[ffmpeg] / libavcodec / ljpegenc.c
index b975345ddda67685d8017cd8837e0e889b337c8a..566723dbc00bf1456d7785301d2d665c6932617a 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 /**
- * @file ljpegenc.c
+ * @file libavcodec/ljpegenc.c
  * lossless JPEG encoder.
  */
 
@@ -56,7 +56,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in
 
     s->header_bits= put_bits_count(&s->pb);
 
-    if(avctx->pix_fmt == PIX_FMT_RGB32){
+    if(avctx->pix_fmt == PIX_FMT_BGRA){
         int x, y, i;
         const int linesize= p->linesize[0];
         uint16_t (*buffer)[4]= (void *) s->rd_scratchpad;
@@ -181,7 +181,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in
     s->picture_number++;
 
     flush_put_bits(&s->pb);
-    return pbBufPtr(&s->pb) - s->pb.buf;
+    return put_bits_ptr(&s->pb) - s->pb.buf;
 //    return (put_bits_count(&f->pb)+7)/8;
 }